Can someone please explain to me what does these macros mean ?
#define GL_MODELVIEW_MATRIX 0x0BA6
#define GL_PROJECTION_MATRIX 0x0BA7
They were defined automatically by C++.
I mean GL_MODELVIEW_MATRIX and GL_PROJECTION_MATRIX are both matrices but these values don’t seem to be matrices values.
Are they adresses ?
They are constants (two among hundreds similar ones) that can be passed to certain OpenGL functions to tell those functions which OpenGL matrix stack you want to manipulate.
In your other thread you wanted to get the current value on the top of the OpenGL modelview matrix stack and used the function
glGetFloatv. That function can be used to retrieve all kinds of information from OpenGL, so you need a way to tell it what information you want.
First of all, thank you.
So If I want to retrieve the values of the matrix, I should specify that using some other functions other than glGetFloatv ? Since it doesn’t not return values or should I specify it in the glGetFloatv itself?
I tried this : qDebug() << “…” << *m; and I got this value: 0.894427 but I can’t tell if it’s the first or last value of the array.
For this case
qDebug() << "..." << *m; is equivalent to
qDebug() << "..." << m; - hopefully that answers your second question?
It seems to me your problem is not retrieving the modelview matrix from OpenGL, but understanding how
operator<<(std::ostream&, float*) works/is used. Perhaps you are more familiar with how the
printf family of functions work in C, in that case perhaps stick to those? In any case I’m afraid this is getting increasingly off-topic for an OpenGL forum.
You’re right, this is getting increasingly off-topic for an OpenGL forum but I succeded in printing the values of m so thank you.
However I’m facing a little problem related to the modelview view matrix. I’m not sure if I should share it here or in another forum ?
It’s an OpenGL/Qt related question.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.