Does anyone know where I can find some example code that
renders imagevision ilImage's into the Motif widgets
created by RapidApp?
Department of Radiology
University of Tennesse Medical Center at Knoxville
IL 3.0 (being OpenGL based) will be fully integrated with RapidApp and
contains a number of ViewKit components. Sorry, we don't have a ship date
RapidApp is based on ViewKit, and the RapidApp on-line book, Chapter 3,Quote:Walker) writes:
> RapidApp doesn't support the Iris GL/Motif drawing area widget. Since
> IL 2.4 only works with Iris GL you are (temporarily) out of luck. IL
> does work with the Iris GL/Motif widget; see the ilmpaste.c++ example
> source for more info.
The README says:
"This directory builds Rotate, a sample application that uses GLX to do
GL rendering in an X window.
VkGLX is a ViewKit component which creates a GlxMDraw widget for GL
rendering. Virtual methods provide hooks for the application for
graphics initialization (ginit), exposure of the component (expose),
resize of the component (resize), and keyboard/pointer events (input).
The question is, could someone at SGI extend this example into something
which makes it practical to use the current GL-based IL with RapidApp?
As Chris mentioned, the ilmpaste.c++ example in 4Dgifts is a good place
to start. I'm not familiar with the VkGLX example you mentioned, but basically,
you setup a callback for ginit, expose and any mouse or widget actions you wish.
It sounds like these callbacks have already been setup and stubbed-out so all
you need to do is fill-in the stubs.
In the ginit callback, you can create ilDisplay or ilViewer and pass the
window to display the image in. In the expose callback you just call the
redraw() method on ilDisplay or ilViewer. Then you setup a callback for
each widget you have or you can setup an input callback to catch X events.
Here is a simple code fragment example from ilmpaste.c++:
n = 0;
XtSetArg(args[n], GlxNglxConfig, glxConfig); n++;
glx = XtCreateManagedWidget("glx", glxMDrawWidgetClass, form, args, n);
XtAddCallback(glx, GlxNginitCallback, ginitCB, (XtPointer)img);
XtAddCallback(glx, GlxNexposeCallback, exposeCB, NULL);
dsp = new ilDisplay(XtDisplay(w), XtWindow(w));
Thanks (Dan too) for the pointers - I'll look these things over some more.Quote:Walker) writes:
> ... I'll forward your request on to our ViewKit/RapidApp expert in the IL
> You might be able to get a little further by looking at the ilmpaste.c++
> source code example in il_dev.sw.gifts.
> RapidApp is based on ViewKit, and the RapidApp on-line book, Chapter 3,
> "Creating Components from External Classes", says "There is a simple
> method for using external classes in RapidApp. ..." After seeing this, I
> browsed around some and found example code for a ViewKit GlxMDraw widget
> The README says:
> "This directory builds Rotate, a sample application that uses GLX to do
> GL rendering in an X window.
> VkGLX is a ViewKit component which creates a GlxMDraw widget for GL
> rendering. Virtual methods provide hooks for the application for
> graphics initialization (ginit), exposure of the component (expose),
> resize of the component (resize), and keyboard/pointer events (input).
> The question is, could someone at SGI extend this example into something
> which makes it practical to use the current GL-based IL with RapidApp?
You might be able to get a little further by looking at the ilmpaste.c++
source code example in il_dev.sw.gifts. This example uses the GlxMDraw
widget in a Motif program. The usage should be similar in ViewKit.
And I have gone so far as to implement an ilViewer in my GL widget
drawing area, successfully.
So far RapidApp has not had a problem with what I did, even though I
made changes in the parts of code that RapidApp would rather I not
tweak. In fact, I have had more trouble getting my function headers
carried along than my code changes! My lessons-learned from that is
to solidify my RapidApp interface as much as possible before I put
a lot of time into hand-tweaking the code.
If you want more details, I'd be pleased to answer questions.
BTW, are you having problems with really large images and ImageVision?
I mean, we have images of size approximately 1M, and I get a segmentation
fault when I try to run the application. If I cut my .TIFF file size down
to about 600K I don't see this problem. We've played with cache size
as much as we can figure out, without success. I'd appreciate any
hints on solving this problem.
I am trying to overlay Motif option menu widgets on a Motif OpenGL
drawing area widget and am having some difficulties...
Basically, I am drawing a wireframe F-14 using OpenGL into a Motif
OpenGL drawing area widget on my SGI Indy. I want to place Motif option
menus over the weapons station locations (on the wireframe F-14
drawing), and have each option menu contain all valid weapons stores for
that station. However, I cannot get the menus to display over the OpenGL
drawing area (the OpenGL F-14 drawing is always displayed, however). My
widget hierarchy is as follows:
Form widget #1
OpenGL drawing area widget
Form widget #2
option menu widget
option menu widget
I have tried several other widget hierarchies as well, such as getting
rid of Form widget #2 and placing the option menus in Form widget #1...
I cannot make the option menus children of the OpenGL drawing area
widget because it is NOT a composite widget and cannot have children...
Do I need to sync the Motif widget display and OpenGL drawing, even
though I'm not using any Xlib drawing commands?
submit a summary of the responses I receive, along with any solution I
Manned Flight Simulator
Naval Air Warfare Center - Aircraft Division
Patuxent River, MD