Jump to content

  • Log In with Google      Sign In   
  • Create Account

Danny Boy

Member Since 08 Jun 2006
Offline Last Active Oct 15 2012 07:47 PM

Posts I've Made

In Topic: Lighting a Mesh with texture and Material.

12 December 2006 - 09:07 AM

Thank you very much.... this is the problem.
This is the details I miss.

In Topic: Array of ID3DXMesh (dynamic allocation)

03 December 2006 - 09:04 AM

Hi ! Thank you for the hint. I got other problem like...

DAMAGE: after normal block (#103)

It seems to be difficult to debug this kind of error but my code
seems ridiculously easy.

The following works...
ID3DXMesh* m_pMeshPointers[1600];

use of m_pMeshPointers .. OK

and delete for each i like this...

for( i = 0; i < m_PuzzleLevel.nbPuzzlePiece; i++)
SAFE_RELEASE( m_pMeshPointers[i] );

#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }

The following does not work... must be the same except that is is dynamic (I use new keyword and delete ).

ID3DXMesh** m_pMeshPointers; // Declaration
m_pMeshPointers = new ID3DXMesh*[ m_PuzzleLevel.nbPuzzlePiece ]; // Construction

use of m_pMeshPointers .. OK

SAFE_RELEASE( m_pMeshPointers[i] ); // Deletion

where m_PuzzleLevel.nbPuzzlePiece is a value readed elsewhere at run time and value is smaller than 1600.

Thanks !

In Topic: D3DXCreateMesh (NumVertices and NumFaces) optimization.

30 August 2006 - 01:34 PM

Ok thanks !

In Topic: D3DXCreateMesh (NumVertices and NumFaces) optimization.

30 August 2006 - 09:29 AM

Good explanation. So for a square, I don't count the diagonal as a vertice.
There are 4 edges (vertices) and not 5 (2 triangles = 6 lines but I remove the middle line that both triangle share).

So, A vertice is a EDGE look like if I draw a square (4 edges).
So, for an hexagone (6 triangles), I have only 6 vertices !
It is not 18 (3x6) or 12 if I draw 6 triangles.

So for an hexagone, NumFaces = 6 (6 triangles) and NumVertices = 6.
So I need to count the number of "true edge" on my MESH.

Can you approve ?

Thank you !

In Topic: Free font engine

29 August 2006 - 01:59 AM

Thank you all guys.

I did check the freefont organization... interesting.
I came back with ID3DXFont and I saw that Microsoft puts one
beautiful sample in the SDK. I did some modification in my code
and now it works like I want, I use any font I want.

I had problem with ID3DXCreateFontIndirect and I don't know why.
Instead, I use ID3DXCreateFont and it works fine.

Thank you again.