somboon

04-23-2010, 01:09 AM

How can I determine if a transformation matrix will change the vertex order of front -facing polygon ?

I know that using minus/inverse scale matrix is not a good idea.

but in my project (2.5D fighting like street fighter 4) the selected view of character model will alway facing the camera

The character model and there animation are define as a right-facing so in order to render left-facing player I have to apply scaling matrix with -1 in x axis. (using my own matrix system similiar to OpenGL fixed function)

The problem is doing so will reverse the order of front facing polygon and I have to call glFrontFace(GL_CW); in order to render correct result.

Are there any way to find out from the final transformation matrix if the matrix will change the vertex order of frontfacing polygon so that I can call glFrontFace(GL_CW) in the right situation ?

I know that using minus/inverse scale matrix is not a good idea.

but in my project (2.5D fighting like street fighter 4) the selected view of character model will alway facing the camera

The character model and there animation are define as a right-facing so in order to render left-facing player I have to apply scaling matrix with -1 in x axis. (using my own matrix system similiar to OpenGL fixed function)

The problem is doing so will reverse the order of front facing polygon and I have to call glFrontFace(GL_CW); in order to render correct result.

Are there any way to find out from the final transformation matrix if the matrix will change the vertex order of frontfacing polygon so that I can call glFrontFace(GL_CW) in the right situation ?