PDA

View Full Version : OpenGL Capability to Create Bitmap Buffer in 2D



Mercury
12-29-2009, 12:46 PM
Hell Everyone and thank you for attention .

i have a question about opengl and its capabilities . i am working on a monitoring system , that requires to showing some 2D gauges on the display and i want to create this by OpenGL under linux .

the job requires some OOP features , and to reach this i want to know , does OpenGL Have Capability To Create a Buffer( bitmap ) on RAM and draw some lines and circles and also some other bitmaps on that Buffer ?!

in better words , i want to know can OpenGL flush its output to a buffer ?!

after that , finally combine a set of such buffers ( each buffer for a gauge ) into a another big buffer ( the whole of display ) and show that buffer in VGA output .

Does OpenGL has such capability ?!

Regards.

Mercury
12-30-2009, 02:16 AM
Any Idea ?! is this very Advanced Question .

ZbuffeR
12-30-2009, 05:48 AM
can OpenGL flush its output to a buffer
Yes.
I guess your question is so strangely worded that no one had a clear idea of how to help you.

BionicBytes
12-30-2009, 08:33 AM
in a simple answer yes!
Since you want to control each gauge separately, I suggest you render each one to a separate off-screen frame buffer (each framebuffer is like a separate GL window - with it's own texture).
Once you have drawn each gauge to its FBO (framebuffer object), you can then get hold of the texture which is the actual buffer holding the data. These textures can be applied onto the main screen in any way you like, and also you can persist them to disk with a little work.

V-man
12-31-2009, 09:33 AM
I guess what you want to do is either render to the. back buffer or render to an offscreen buffer (FBO) and then use glReadPixels. For the FBO stuff, look in the Wiki in the extensions section.

Mercury
01-07-2010, 01:32 PM
thanks for answer , i found better solution for my problem .

Mercury
01-07-2010, 01:33 PM
thanks for answer , i found better solution for my problem .