1
Graphics / VBO, RenderWindow, FPS Drop
« on: January 11, 2011, 07:27:21 pm »
I downloaded gDEBugger (which is amazing btw) and used it to debug my app.
My theory is that by using extension functions from your global context, it's not working for the window context, and by doing the VBO stuff first, it avoids using the window context. Or possibly it does work but makes the draws slower for some reason. I did some research and found this:
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node396.html
Also something similar here:
http://msdn.microsoft.com/en-us/library/dd374390.aspx
So my question is, does the global context have a different pixel format type? Could this be related to my problem?
Going to give up on this problem for a while and accept that I have to create the VBOs first.
My theory is that by using extension functions from your global context, it's not working for the window context, and by doing the VBO stuff first, it avoids using the window context. Or possibly it does work but makes the draws slower for some reason. I did some research and found this:
Quote
Be careful because the function returned by wglGetProcAddress is only guaranteed to work for the pixel format type of the OpenGL rendering context that was current when wglGetProcAddress was called. If you have multiple contexts created for different pixel formats, then keeping a single function addresses in a global variable as shown above may create problems. You may need to maintain distinct function addresses on a per-pixel format basis. Specifically, the Microsoft documentation for wglGetProcAddress warns:
The [Microsoft] OpenGL library supports multiple implementations of its functions. Extension functions supported in one rendering context are not necessarily available in a separate rendering context. Thus, for a given rendering context in an application, use the function addresses returned by the wglGetProcAddress function only.
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node396.html
Also something similar here:
http://msdn.microsoft.com/en-us/library/dd374390.aspx
So my question is, does the global context have a different pixel format type? Could this be related to my problem?
Going to give up on this problem for a while and accept that I have to create the VBOs first.