Fast rendering with OpenGL 1.1 - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Fast rendering with OpenGL 1.1 (/thread-10485.html)
Fast rendering with OpenGL 1.1 - dotbianry - Dec 17, 2012 08:47 AM
Can someone recommend me a way to render a texture on screen that is faster than glDrawArrays and glVertex2f that will work on OpenGL 1.1.
Every example and documentation that I found doesn't work with OpenGL 1.1
RE: Fast rendering with OpenGL 1.1 - ThemsAllTook - Dec 17, 2012 09:16 AM
Depends. Are you taking about desktop GL 1.1, or ES 1.1? What sort of environment are you coding for where you're restricted to 1.1 (of either flavor)?
To answer your question directly, you might be able to use display lists (glNewList, glCallList, etc.) if you're in desktop GL 1.1 without ARB_vertex_buffer_object. If you're in ES 1.1 and/or have ARB_vertex_buffer_object, you can create a VBO and use glDrawElements. In both of these cases, your vertex data is stored on the GPU, so you won't be transferring it from RAM like you would with call to glDrawArrays.
That said, are you sure your bottleneck is the draw call you're using? Since you're saying "render a texture on screen", it sounds like you don't have many vertices (maybe just one quad), and you just want to blit something to the display. In that case, fill rate is probably your bottleneck by far, and changing the way you submit your vertices won't actually help.
RE: Fast rendering with OpenGL 1.1 - Skorche - Dec 17, 2012 09:33 AM
I have a hard time believing that you mean OpenGL (non-ES) 1.1, since that is 15 years out of date. Yet OpenGL ES 1.1 doesn't have glVertex2f(). I sort of doubt OS X supported anything less than 1.3 ever. Do you just mean like pre-shader OpenGL?
As ThemsAllTook mentioned though, you really can't draw a texture faster than glDrawArrays. Submitting the geometry, no matter how you do it is trivial for a single quad compared to the actual draw call cost or the fillrate.
RE: Fast rendering with OpenGL 1.1 - dotbianry - Dec 18, 2012 03:22 AM
The drivers of my video card a GeForceFX 5200 supports Open GL 1.1 and GL_EXT_bgra from 1.2,I'm using only desktop OpenGL , on Windows.
I'm trying to use render to texture,an array in RAM with RGB values of an image at the resolution 1024x768 and I'm displaying that on a 2D viewport.
I just tried display lists and it's still lagging.
Is there any other way of doing it?
RE: Fast rendering with OpenGL 1.1 - dotbianry - Dec 18, 2012 03:58 AM
I updated the video driver and now works smooth.