Archived

This topic is now archived and is closed to further replies.

Eternal

VBOs and my GF2MX -> crashes

Recommended Posts

Eternal    1639
I just tried to implement VBOs into my "engine", which led to crashes as soon as i tried to use it. I fiddled around with it for a bit and wrote a simple test-app to verify it was not caused by something else in my game-code (which seemed to work flawlessly before). In my engine all that gets called now before creating the VBO is window creation, OGL initialization and a few other non-complex initialization things. Now it seems like I cant allocate more than _43kb_ of memory using VBOs. Even less if i compile in release mode, although I can''t see why this would be the case. And I always thought it would fall back to AGP mem and not simply crash, if it can''t allocate enough VRAM, was I wrong ? It does not matter how many VBOs I create. As soon as the combined size touches 44kb my app crashes. I tried installing the newest detonator release, did not help either. I don''t reach any rendering code and don''t set any wrong/unneccessary GL states. Hmm, I get the function pointers to the extensions through GLee, but I guess if anything went wrong there I should not be able to get any memory at all. My code for VBO setup looks like this:
			glGenBuffersARB( 1, &(m_VBOVertices) );				
			glBindBufferARB( GL_ARRAY_BUFFER_ARB, m_VBOVertices );			
			glBufferDataARB( GL_ARRAY_BUFFER_ARB, buffer_size, m_vertices, GL_STATIC_DRAW_ARB );
Any ideas ? Or any advice which mistakes somewhere else could lead to this behaviour ?

Share this post


Link to post
Share on other sites
Dark Rain    157
Might want to check if the pointer to your vertices or some such are valid. It does sound like you''re having memory problems.

Hell, it could be a memory leak in a completly unrelated part of your code that make this part crash. I had such a problem before ^_^.

Share this post


Link to post
Share on other sites
Eternal    1639
Thanks, was indeed caused by having some garbage inside my vertex-data. Works great now. I still wonder how it even could work with standard VAs and produce the right visual results.

Share this post


Link to post
Share on other sites