for some reason, the model for my skybox isn't appearing.
i load the same way i load the model for the ship, but only the ship appears.
here's the code.
// Dark GDK - The Game Creators - www.thegamecreators.com
// whenever using Dark GDK you must ensure you include the header file
#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" );
//load the skybox (or spacebox)
dbLoadImage ("space.jpg",1);
dbLoadObject ("space.x", 1 );
dbSetObjectLight ( 1, 0 );
dbScaleObject ( 1, 5000, 5000, 5000 );
//load the space ship
dbLoadObject ( "ship1.x", 2 );
dbSetObjectLight( 2, 1 );
dbScaleObject (2, 100.0f, 100.0f, 100.0f);
// position the camera
dbPositionCamera( 0, 0, 0 );
//allow the camera to see everything
dbSetCameraRange(1.0f, 30000.0f);
// camera variables
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// our main loop
while ( LoopGDK ( ) )
{
// move the camera using the arrow keys
dbControlCameraUsingArrowKeys ( 0, 1.0f, 0.5f );
// create a rotation axis based on mouse movement
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
//position ship in front of camera
//dbPositionObject(1, 434, 42, -517);
//lock the camera onto the ship
dbLockObjectOn(2);
// rotate camera if necessary
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
That, and how do i texture the models? i don't understand the iMode, and iMipGeneration arguments. can someone go into detail with that please?
i really appreciate it.
-- from my island, aloha wau 'ia 'oe --