Arm Community
Site
Search
User
Site
Search
User
Support forums
Mobile, Graphics, and Gaming forum
Tips & Tricks: Viewing Transforms
Jump...
Cancel
Locked
Locked
Replies
2 replies
Subscribers
137 subscribers
Views
3728 views
Users
0 members are here
OpenGL ES
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Tips & Tricks: Viewing Transforms
guestposter guestposter
over 12 years ago
Note: This was originally posted on 27th October 2009 at
http://forums.arm.com
How OpenGL ES handles matrices...
When you multiply the position vector with several matrices to achieve transformations such as translation, rotation, scaling or projection, the effect when applying the resulting matrix on a position vector is as if the individual matrix multiplication operations were performed from right to left.
The usual sequence of matrices is, from left to right:
1. Projection matrix
2. View matrix
3. Any number of model transformation matrices, from most global to most local.
You must then multiply the resulting matrix by the vertex position with the matrix on the left.
guestposter guestposter
over 12 years ago
Note: This was originally posted on 27th October 2009 at
http://forums.arm.com
How OpenGL ES handles matrices
It is common practice to present transformation matrices in row major order. However, when storing one or two-dimensional arrays in the C programming language, OpenGL ES assumes matrices are stored in column major order.
When matrices are written as constants, they appear transposed. This applies to constants in an application program in addition to shader programs.
Example of a translation matrix:
[font="Courier New"]float move_matrix[]={
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
x, y, z, 1.0f
};[/font]
equals...
[font="Courier New"]
1 0 0 X
0 1 0 Y
0 0 1 Z
0 0 0 1[/font]
Cancel
Vote up
0
Vote down
Cancel
pabell003 pabell003
over 12 years ago
Note: This was originally posted on 19th November 2009 at
http://forums.arm.com
here is a great info man..........good work.........keep it up man thanks and thanks for the tips.
Cancel
Vote up
0
Vote down
Cancel