开发者

Cameras and Modelview in OpenGL ES (WebGL)

开发者 https://www.devze.com 2023-03-09 04:14 出处:网络
I\'m having a little trouble with my OpenGL transformations -- I have a vertex shader that se开发者_StackOverflowts gl_Position to projection * view * model * vertex. I have code that generates a view

I'm having a little trouble with my OpenGL transformations -- I have a vertex shader that se开发者_StackOverflowts gl_Position to projection * view * model * vertex. I have code that generates a view matrix by inverting the model matrix of a camera in space, but when I set the object the camera is looking at to rotate in space, it seems as if the camera is rotating instead.

What could be causing this?


Apparently I had projection * model * view * vertex instead. Oops!

0

精彩评论

暂无评论...
验证码 换一张
取 消