Original Post
Hello,
First, sorry for my bad English..
I have question about GLSL,
I have a HLSL shader, In this shader, I use a World and a WorldViewProj matrices.
In DirectX, I can easily get these Matrices with this codes;
World:
D3DXMatrixIdentity(&World);
View:
D3DXMatrixLookAtLH(&View, &Position, &Target, &Up);
Proj:
D3DXMatrixPerspectiveFovLH( &Proj, D3DX_PI /4, ScreenWidth / ScreenHeight, 1.0f, 1000.0f );
WorldViewProj:
World * View * Proj
I've converted my HLSL shader to GLSL with "HLSL2GLSL" tool.
My shader compiles with no errors. But I need this matrices to use my shader..
And I don't know how to get these Matrices in OpenGL..
I've searched but I couldn't find a solution.
Can anyone tell me how can I get these matrices in OpenGL?
First, sorry for my bad English..
I have question about GLSL,
I have a HLSL shader, In this shader, I use a World and a WorldViewProj matrices.
In DirectX, I can easily get these Matrices with this codes;
World:
D3DXMatrixIdentity(&World);
View:
D3DXMatrixLookAtLH(&View, &Position, &Target, &Up);
Proj:
D3DXMatrixPerspectiveFovLH( &Proj, D3DX_PI /4, ScreenWidth / ScreenHeight, 1.0f, 1000.0f );
WorldViewProj:
World * View * Proj
I've converted my HLSL shader to GLSL with "HLSL2GLSL" tool.
My shader compiles with no errors. But I need this matrices to use my shader..
And I don't know how to get these Matrices in OpenGL..
I've searched but I couldn't find a solution.
Can anyone tell me how can I get these matrices in OpenGL?