opengl and xlib drawing
i donno if this one is placed corretly here but it''s linux based so i might get more help here than in the opengl sub forum.
i''m currently on a game engine which allows doing windowing. for this purpose i use two kinds of windows: a render window which uses opengl (it''s exchangable, can be dx too, but for linux i need ogl in first place) and works fine and conventional windows where you can draw simple stuff like lines, rectangles and blit bitmaps into it (to allow nifty onscreen windows and stuff).
the problem: i can''t render using xlib functions (like XDrawLine) into the backbuffer to draw this window. i always end up in the visible frontbuffer which leads to flickering like hell (sure, it''s over-swapped each frame).
anybody knows how i can use common Xlib functions to draw into the backbuffer? i know in DX you can do this but how about OGL and linux?
Roland Plüss (The Dragon)
=- Turn Imagination Into Reality -=
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
I''d imagine you''d do something like
render to a pixmap using X11
create a OpenGL texture based on the pixmap data
create a quad on the screen, render the texture to it.
Alternatively, you could use GL''s own 2-d rendering stuff. I''m a GL noob, so I''m not sure whether or not oyu can do both at the same time...
render to a pixmap using X11
create a OpenGL texture based on the pixmap data
create a quad on the screen, render the texture to it.
Alternatively, you could use GL''s own 2-d rendering stuff. I''m a GL noob, so I''m not sure whether or not oyu can do both at the same time...
what exactly are those 2-D drawing capabilites that OGL has? I only noticed once a Rectangle draw function but this is kinda simplistic.
in fact it would appreciate it if i could stay in OGL completly while drawing the 2-D like windows. a turn-around using pixmaps and system memory could be time consuming.
in fact it would appreciate it if i could stay in OGL completly while drawing the 2-D like windows. a turn-around using pixmaps and system memory could be time consuming.
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement