#### Archived

This topic is now archived and is closed to further replies.

# problem with glt and matrix transformation

This topic is 5905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I want to have a part of my transformation matrix in glt matrix format so that I will be able to do excact picking in a polygon. When I tested thing, things did not work out the way I though them to. I started testing a bit and the matrix transformations does not seem do do the same thing in glt and openGL Here are two snippets of code that after what I can understand should do the same. This is not the case though, can somebody help me out here?
mapTransMatrix.identity();
mapTransMatrix = matrixRotate(Vector(1.0f,0.0f,0.0f),90.0f) *mapTransMatrix;
mapTransMatrix *= matrixScale(Vector(m_mapSize.x,m_mapSize.y,-Z_SCALE_FACTOR));
mapTransMatrix.glMultMatrix();

The second one is done with only with opengl:
glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
glScalef(m_mapSize.x,m_mapSize.y,-Z_SCALE_FACTOR);

From what I can see these two ways of updating the model view should be equal, but when I try compare the results, they it is not equal. Why is that? Utopico

1. 1
2. 2
Rutin
20
3. 3
khawk
16
4. 4
A4L
14
5. 5

• 11
• 16
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633756
• Total Posts
3013707
×