Well here is my code, it`s simple and so to be sure i will not make a mistake i copied the lines from tutorials(lol) but still same problem
#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 );
dbSetDir ( "media" );
dbLoadObject("sandcity3d0.3ds",1);
dbSetObjectLight ( 1, 0 );
// load a model for our sky
dbLoadObject ( "skybox03.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 ( ) )
{
// update the screen
dbControlCameraUsingArrowKeys(0,2,2);
// 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 );
dbSync ( );
}
// return back to windows
return;
}
The folder ierarchy is:
Project
| |
Debug Media
I`ve moved the exe file in the folder Project but still it gives me an error and the program closes.
Here is the error that vc++ gives me:
First-chance exception at 0x005dbeb5 in Dark GDK - Game2.exe: 0xC0000005: Access violation reading location 0x22040028.
Unhandled exception at 0x005dbeb5 in Dark GDK - Game2.exe: 0xC0000005: Access violation reading location 0x22040028.
Also had exported the level into two more formats that 3dgs supports ase and 3ds(3d max) both unfortunately didn't load, but the window stayed up with no error just a blank screen and program freezed. Tried also moving the exe in the Project folder.