View Full Version : nvidia overlay using GLX

10-04-2002, 04:34 AM
I'm trying to figure out how to use an overlay plane. I'm running:

Redhat 7.3 and the Linux kernel 2.4.18-10
NVidia Quadro4 video card
XFree86 4.2.0
GLX 4.0.2-1.0.3123

I'm new to openGL so what I'm trying to do may be flawed.
Here is the sequence:

dpy= XOpenDisplay()
- reports major=1, minor=2

main_visual= glxChooseVisual()
main_context= glXCreateContext(dpy,overlay_visual,0.GL_TRUE)
overlay_visual= glxChooseVisual() with GLX_LEVEL = 1
overlay_context= glXCreateContext(dpy,overlay_visual,0.GL_TRUE)
win= XCreateWindow() using the main visual's screen, depth, and visual

glXMakeCurrent(dpy,win,main_context) to access the main plane
- Drawing commands for main plane go here

glXMakeCurrent(dpy,win,overlay_context) to access the overlay plane
- At this point I get a "BadMatch" error which I think is because the overlay
context was created with overlay_visual and win was created with
main_visual. What am I doing wrong? Do I need to create two windows?

One thing that is interesting, "xprop -root" displays the
SERVER_OVERLAY_VISUALS, but glxinfo doesn't display
anything about overlays.

10-08-2002, 06:00 AM
i think glx just give you some general info about your system.

you may check your renderer under opengl (glGetString( GL_RENDERER))

i hope that helps you

10-08-2002, 11:05 AM
Make sure that overlays are enabled in
your XF86Config:

Option "Overlay" "on"

By default overlays are turned off.
Note that this is a true color overlay.