Advertisement Jump to content

Archived

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

McBaine

glGetFloatv() returning -1.#IND0 and 1.#QNAN?!?!

This topic is 5338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m getting some intermitten problem when I try to set a ModelView matrix. After countless hours checking the code, I decided to fall back onto the tried-n-true "printf" debugging. Immediately after computing the composite MV matrix, I check glGetError() which didn''t return any errors. Then I call glGetFloatv( GL_MODELVIEW_MATRIX, m ) where m is float m[16]. Upon inspection, the translation values, seem to be -1.#IND0 and 1.#QNAN! Any idea why this would be happening? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
have you called glLoadIdentity() at least once?

also, check that you arn''t writing/reading past your memory
block for 16 floats.

could you post some code?

Share this post


Link to post
Share on other sites
hello.
When you try to divide with zero or you try to place a bigger value then the variale can handle then you get this values.
check the values you input in the matrix stucture.

Share this post


Link to post
Share on other sites
Actually, it turns out that occassionally, the data coming into the function was crap (i.e. NaN already). So it''s not an OpenGL problem.

Thanks for the responses anyways!

McB

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!