Capn_Fish
Member
- Joined
- Oct 12, 2008
- Messages
- 200
I'm having a good deal of trouble understanding how the whole shader and matrix things work in OGLES. I get that shaders replaced the fixed functions of OpenGL, but I guess I don't exactly know what that means. I guess I'd like some examples of what shaders are commonly used for (not code examples, just something to the effect of "If FOO, use a shader to do BAR") as well as a general definition.
On a related (directly, so far as I can gather) topic, how exactly does the matrix stuff work in OGLES? In OpenGL, you can us glOrtho to set the Matrix "resolution"/size, but I haven't really seen anything to that effect yet.
Also, the whole matrix transformation thing is being confusing. In OGL, you just rotated/translated the "local" coordinate system, drew, then reverted back to the original one. I haven't really figured out how that works in OGLES.
I think all of that stuff is related, but I don't have a good enough grasp of them to know for sure. :blink:
I have the OGLES VM code examples to look at, but they all use a "PVR Shell," which seems to be made for demos, and obfuscates the actual OGLES stuff. I also have the Gold Book code examples (and the book itself), but they use a util lib that does a similar thing (yes I have tried to look at the source for that, but it makes it quite difficult to learn, all of the going between source files, etc.).
Thanks in advance. I'm hoping that once this stuff is cleared up, everything should become a good deal easier (I feel like I'm missing some obvious stuff), and I won't have to ask TOO many more questions.
EDIT: I'm talking about OGLES 2.0, FWIW
On a related (directly, so far as I can gather) topic, how exactly does the matrix stuff work in OGLES? In OpenGL, you can us glOrtho to set the Matrix "resolution"/size, but I haven't really seen anything to that effect yet.
Also, the whole matrix transformation thing is being confusing. In OGL, you just rotated/translated the "local" coordinate system, drew, then reverted back to the original one. I haven't really figured out how that works in OGLES.
I think all of that stuff is related, but I don't have a good enough grasp of them to know for sure. :blink:
I have the OGLES VM code examples to look at, but they all use a "PVR Shell," which seems to be made for demos, and obfuscates the actual OGLES stuff. I also have the Gold Book code examples (and the book itself), but they use a util lib that does a similar thing (yes I have tried to look at the source for that, but it makes it quite difficult to learn, all of the going between source files, etc.).
Thanks in advance. I'm hoping that once this stuff is cleared up, everything should become a good deal easier (I feel like I'm missing some obvious stuff), and I won't have to ask TOO many more questions.
EDIT: I'm talking about OGLES 2.0, FWIW