GL initialization in mixed GLX mode

GL initialization in mixed GLX mode

Post by Raj Shekh » Tue, 12 Apr 1994 08:56:09



Hi,

I am trying to create a GLX window for drawing images.
I am able to create an Application shell and a GLXDraw
widget as its child, but having problems with GL
initialization. The ginitCB routine that I got hold of
from the man pages gives the following compilation error
which I cannot see a way to get rid of.

error: bad argument  3 type for XtAddCallback(): void *(*)(Widget ,
int , GlxDrawCallbackStruct *) ( XtCallbackProc  expected)

If I try to initialize using the GLXwinset() function instead,
nothing seems to happen. The window that I open has writings
from the background.

Any help in the right direction will be greatly appreciated.

Thanks.

- Raj
--
The Ohio State University

 
 
 

GL initialization in mixed GLX mode

Post by Joel Tesl » Wed, 13 Apr 1994 01:00:10



> I am trying to create a GLX window for drawing images.
> I am able to create an Application shell and a GLXDraw
> widget as its child, but having problems with GL
> initialization. The ginitCB routine that I got hold of
> from the man pages gives the following compilation error
> which I cannot see a way to get rid of.

> error: bad argument  3 type for XtAddCallback(): void *(*)(Widget ,
> int , GlxDrawCallbackStruct *) ( XtCallbackProc  expected)

In ANSI C, the callback proc needs to be declared exactly to match the
definitition of an XtCallbackProc (e.g. Widget, XtPointer, XtPointer)
or you will get the error.  An alternative is typecasting your
callback proc to XtCallbackProc.

Quote:> If I try to initialize using the GLXwinset() function instead,
> nothing seems to happen. The window that I open has writings
> from the background.

I'm not sure what you tried to do here.  An alternative to the ginit
callback is to just do your initialization after realizing the widget.
In fact the only real reason to use the ginit callback is if you are
trying to keep all of your GL code localized and don't want even a
hint of it after you realize the widgets.

Joel Tesler

415-390-3048

 
 
 

1. GL/X Mixed Mode Questions

GL X Mixed Mode programming problems:

I am trying to port an existing GL application to use mixed mode
programming (i.e. X11 instead of GL for the windowing and input
calls).  I have almost the whole port completed, but I'm stumped on a
couple of calls.

Does anyone know how to port the following calls?

  - getorigin
  - getgdesc (for querying z buffer extents - GD_ZMAX and GD_ZMIN)
  - getmonitor and setmonitor for checking on and setting stereo mode
  - setvaluator and getvaluator for dial and button boxes.

  note: I know some of this would be easier in OpenGL, but for now I
        need to be in GL.

Also, is there any documentation on how to port GL to mixed mode? I
found a whole on-line book devoted to this for OpenGL, but nothing for
GL.

Thanks,


Interactive Simulations Inc
http://www.intsim.com/~isigen

2. Infinite Grid Reload WWW Page and PANIC

3. Screen mode is like colour mix mode!!

4. Histogram Equalisation problem

5. mixed iris gl and open gl

6. Announce Pad++ Version 0.9

7. Mixing GL, Open GL, Inxentor, and Motif

8. REQ: Stretching Part Of An Image With Paint Shop Pro 7

9. IBM 8514 graphics mode initialization

10. Mixing RGB and colormap in GLX

11. single/double buffer in GLX mode

12. Mixed mode programming