Jump to content

  • Log In with Google      Sign In   
  • Create Account


cHimura

Member Since 12 Oct 2009
Offline Last Active May 14 2013 08:10 PM

Posts I've Made

In Topic: Problem with World - View - Projection

06 April 2013 - 07:35 PM

Hi,

 

I solved the problem! :)

 

I had the view matrix wrong! The components of the last vector was positive and the correct values are negative.

 

And the correct Perspective Matrix for the OpenGL is this:

pOut->m[0][0] = xScale; pOut->m[0][1] = 0.0f;   pOut->m[0][2] =  0.0f;           pOut->m[0][3] =  0.0f;
pOut->m[1][0] = 0.0f;   pOut->m[1][1] = yScale; pOut->m[1][2] =  0.0f;           pOut->m[1][3] =  0.0f;
pOut->m[2][0] = 0.0f;   pOut->m[2][1] = 0.0f;   pOut->m[2][2] = (zf+zn)/(zn-zf); pOut->m[2][3] = -1.0f;
pOut->m[3][0] = 0.0f;   pOut->m[3][1] = 0.0f;   pOut->m[3][2] = 2*zf*zn/(zn-zf); pOut->m[3][3] =  0.0f;

 

Thanks everyone!!


In Topic: Problem with World - View - Projection

03 April 2013 - 12:37 AM

Hi,

Thanks for your answer everyone.

I checked a lot matrices but anything works for me.

In this page http://maniacdev.com/2009/05/opengl-gluperspective-function-in-iphone-opengl-es/ the perspective matrix is different to the other http://www.songho.ca/opengl/gl_matrix.html

I don't understand why :(

Anyway I'll check that with more detail.

Thanks!!

In Topic: Problem with World - View - Projection

30 March 2013 - 06:50 PM

Thank you for your answer.

I'll check that

In Topic: Cloning animated skinned X Mesh

05 February 2012 - 12:59 AM

Hi,

With the same function CloneMesh() you can clone it. You must clone it on the method CreateMeshContainer on your ID3DXAllocateHierarchy implements.

In Topic: root NULL in D3DXLoadMeshHierarchyFromX

05 February 2012 - 12:47 AM

Hi programci_84,

Yes I'm sure that the file has no problem.

The values returns by D3DXLoadMeshHierarchyFromX() are:
root = NULL and animationController = NULL

The ID3DXAllocateHierarchy instance creates the frames and the 2 meshes but I don't understand why the root is null.

Thanks

PARTNERS