Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Using DirectX Objects in Dark GDK

Author
Message
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 6th Apr 2008 23:36
I was meandering around the software when I came across a command in
Quote: "#include <d3dx9.h> #include "d3dx9shape.h""
to make a torus

Quote: "
//-------------------------------------------------------------------------
// D3DXCreateTorus:
// ----------------
// Creates a mesh containing a torus. The generated torus is centered at
// the origin, and its axis is aligned with the Z-axis.
//
// Parameters:
//
// pDevice The D3D device with which the mesh is going to be used.
// InnerRadius Inner radius of the torus (should be >= 0.0f)
// OuterRadius Outer radius of the torue (should be >= 0.0f)
// Sides Number of sides in a cross-section (must be >= 3)
// Rings Number of rings making up the torus (must be >= 3)
// ppMesh The mesh object which will be created
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
//-------------------------------------------------------------------------
"


Can such a command be used directly to create an object in Dark GDK ?
Would anyone have a code example?

Thanks in Advance

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 7th Apr 2008 14:34
I'm pretty sure it can. But, to add it to the GDK so it will get rendered in between pDevice->BeginScene( ) .... pDevice->EndScene( ), you could add it vertex-by-vertex using the technique that Mike uses in his tutorial for loading custom media at the top of this board.

I have been thinking of ways to get around this so I can use progressive meshes, but none have worked so far.

Much good work is lost for the lack of a little more.

Login to post a reply

Server time is: 2024-11-20 07:31:57
Your offset time is: 2024-11-20 07:31:57