Jump to content
  • Advertisement
Sign in to follow this  
texel3d

OpenGL GLSL Matrices

This topic is 3469 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

hi, i try to use my own matrix in GLSL, instead of OpenGL Matrix. I have a created C++ functions which create the same matrices as OpenGL. When i use glGetFloatv( GL_MODELVIEW_MATRIX, fvMatrix ) my matrix is exactely the same as fvMatrix in the Visual C++ debugger. The same thing with glGetFloatv( GL_PROJECTION_MATRIX, fvMatrix ). But when i sent my matrices to the shader, it deosn't render properly. mat4 matWorldViewProj = gl_ProjectionMatrix * gl_ModelViewMatrix; // Works mat4 matWorldViewProj = g_myMatrixProjection * g_myMatrixModelView; // does not Works Are the Projection and ModelView matrices from OpenGL (C++) modified before to be available in the GLSL shader ? When i sent to the shader the matrices i get from glGetFloatv. I have the same problem. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Ok it works now.
I have to use "false" in glUniformMatrix4fv.
It didn't work before for other reasons.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!