I've been messing around with DGDK for about a week now and decided I'd get comfortable with the 3D functions before I trap myself in 2D dev, however, I've run into a problem when trying to apply a texture to my model, it simply stays white.
heres my code:
// Dark GDK - The Game Creators - www.thegamecreators.com
#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
//Initialize Lights
dbMakeLight(1);
dbPositionLight(1, 4, 3, 0);
//Initialize Player
dbLoadImage("PlayerBlueDot.bmp", 1);
dbLoadObject("PlayerExport.x", 1);
dbScaleObject(1, 1, 1, 1);
dbSetShadowShadingOn(1);
dbPositionObject(1, 0, 0, 0);
dbTextureObject(1, 1);
//Initialize cameras
dbMakeCamera(1);
dbSetCurrentCamera(1);
dbPositionCamera(1, 0,0,-10);
//Used for angling the camera
int cameraAngleY=0;
int cameraAngleX=0;
while(LoopGDK())
{
if(dbUpKey())
{
dbMoveCamera(0.2);
if(dbObjectCollision(1, 0)!=0)
{
dbMoveCamera(-0.2);
}
}
if(dbDownKey())
{
dbMoveCamera(-0.2);
if(dbObjectCollision(1, 0)!=0)
{
dbMoveCamera(0.2);
}
}
if(dbLeftKey())
{
dbMoveCameraLeft(1, 0.2);
if(dbObjectCollision(1, 0)!=0)
{
dbMoveCameraLeft(1, -0.2);
}
}
if(dbRightKey())
{
dbMoveCameraRight(1, 0.2);
if(dbObjectCollision(1, 0)!=0)
{
dbMoveCameraRight(1, -0.2);
}
}
//Angles camera
cameraAngleX += dbMouseMoveY()/5;
dbXRotateCamera(cameraAngleX);
cameraAngleY += dbMouseMoveX()/5;
dbYRotateCamera(cameraAngleY);
dbSync ( );
}
dbDeleteObject(1);
dbDeleteImage(1);
dbDeleteLight(1);
dbDeleteCamera(1);
return;
}
sorry if I'm becoming the forum pest, but I really have been wanting to do some game dev for a while now and really want to learn.
edit:
I have searched the forum, but none of the solutions helped (I looked at every result).