Hi all,
I'm completely new to DGDK / DB.
I've made a very basic level, with textures, and exported it as a X file (directx 9).
When I double click on that X file, directx viewer loads and displays it correctly.
I then wanted to "play" with my level using Dark GDK.
I opened the "Game level" solution, replaced the "universe.dbo" by "test.x", copied my model "test.x" and its textures in the media folder where is actually "universe.dbo" ...
I then have built the solution and executed the program.
Only the skybox appears on the screen but not my level, that's the problem
Here's my code :
#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
// switch to the media directory, load our world
// and turn lighting off
SetCurrentDirectory ( "media" );
//dbLoadObject ( "universe.dbo", 1 );
dbLoadObject("test.x",1);
dbPositionObject(1,0.0,0.5,0.0);
dbSetObjectLight( 1, 1 );
// load a model for our sky
dbLoadObject ( "skybox2.x", 2 );
dbSetObjectLight ( 2, 0 );
dbSetObjectTexture ( 2, 3, 2 );
dbScaleObject ( 2, 5000, 5000, 5000 );
// position the camera
dbPositionCamera ( 434, 42, -517 );
// camera variables
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// our main loop
while ( LoopGDK ( ) )
{
// move the camera using the arrow keys
dbControlCameraUsingArrowKeys ( 0, 5.0f, 0.3f );
// create a rotation axis based on mouse movement
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
// rotate camera
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
What could cause my model not to show up ?
Could it be its position, its scale, the camera position ... ?
I'm a bit lost, I've read and tried many things with no luck at all.
Any help, ideas ?