There is making viewport matrix using glGetFloatv(GL_MODELVIEW_MATRIX, modelviewMatrix); But how to set model to world matrix like glGetflatv?
Asked
Active
Viewed 168 times
1 Answers
2
The code example you gave is getting the current value of the model view matrix which represents the transformation from model space to world space. This code does not affect the viewport which is set using glviewport(x,y,width,height). Assuming you are using fixed function OpenGL as indicated by your use of GL_MODELVIEW_MATRIX, then you can manipulate the modelview matrix using the built in functions or by loading your own matrix. See this related question for more details on setting the modelview matrix: How to update opengl modelview matrix with my own 4x4 matrix?.

Community
- 1
- 1

user3256930
- 1,123
- 7
- 12