Hello,
I have noticed that I don't get the same matrix I pushed !!
Does anybody have an idea ?
Thank you
Here is the code I am using:
#include <assert.h>
Hello,
I have noticed that I don't get the same matrix I pushed !!
Does anybody have an idea ?
Thank you
Here is the code I am using:
#include <assert.h>
Is it widely different?
glPush/PopMatrix() should just be a memcpy() call internally
From reading your code, I can see nothing wrong. Your results are puzzling
I'm not entirely sure why you would expect anything with GPU to be double-precision though..
The drivers will just convert everything to float, but there is nothing in your code that shouldn't return the same values both times
Although, try using glGetFloatv instead, just to see if it's a precision issue
I probably should mention that using == with floating point numbers, with few exceptions (one being this case), is generally dangerous :)
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
I am Sorry.
It was my mistake :
I had one glPushMatrix in excess elsewhere in the code. So at the end of each frame, I had a matrix forgotten in the stack.
and at the 32nd frame, the matrix poped no longer corresponded to the one immediately pushed.
I guess openGL should signal the overflow in the matrix stack by a crash or a warning, rather than poping an incorrect matrix.
Thank you for your answer and your time