I didn't create any lights but it seems to me that there is light.
I just noticed that in this pic..
there's a dark portion on this means which means no light hit it

while on this side

this part is lighted and the colors are there which means light has hit it.
But, i didn't create any light. How do i fix this?
Here's the code without the lighting..
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include "DarkGDK.h"
bool initialize();
void DarkGDK ( void )
{
float speed=2;
bool visibility=true;
dbSyncOn ( );
dbSyncRate ( 60 );
while ( LoopGDK ( ) )
{
if (!initialize()) dbText( 0, 0, "Initializing" );
dbXRotateCamera( dbCameraAngleX()+dbMouseMoveY()/5 );
dbYRotateCamera( dbCameraAngleY()+dbMouseMoveX()/5 );
if (dbUpKey()==1) dbMoveCamera( speed );
if (dbDownKey()==1) dbMoveCamera(-speed );
dbPositionMouse( 200, 200 );
dbCenterText ( 200,400,"Loading was successful." );
char msg[250];
sprintf_s( msg, "Triangle Count: %d", dbStatistic(1) );dbCenterText ( 200,100, msg );
sprintf_s( msg, "Camera X: %.3f", dbCameraPositionX() );dbCenterText ( 200,120, msg );
sprintf_s( msg, "Camera Y: %.3f", dbCameraPositionY() );dbCenterText ( 200,140, msg );
sprintf_s( msg, "Camera Z: %.3f", dbCameraPositionZ() );dbCenterText ( 200,160, msg );
if (dbObjectExist(1)) dbText( 200, 180, "Object exists!" );
if (dbEffectExist(1)) dbText( 200, 100, "Effect exists!" );
dbSync ( );
}
return;
}
bool initialize(){
static bool init_finished=false;
if (!init_finished){
dbLoadBitmap( "Cement.png",1);
dbPrint( "Now Loading..." );
dbSync();
dbHideMouse();
dbSetImageColorKey( 0,0,0 );
dbLoadObject( "meow.x",1 );
dbScaleObject( 1, 20, 20, 20 );
dbSetObjectEmissive( 1, dbRgb( 0,0,0 ) );
dbSetObjectSpecular(1,0);
dbPositionObject( 1, 0, 0 , 0 );
dbPositionCamera( 0, 0, 0 );
dbSetCurrentBitmap(0);
init_finished=true;}
else
return true;
return true;
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
I added SetShadowMappingOn(1) and I still see a lighted portion.

NewCode:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include "DarkGDK.h"
bool initialize();
void DarkGDK ( void )
{
float speed=2;
bool visibility=true;
dbSyncOn ( );
dbSyncRate ( 60 );
while ( LoopGDK ( ) )
{
if (!initialize()) dbText( 0, 0, "Initializing" );
dbXRotateCamera( dbCameraAngleX()+dbMouseMoveY()/5 );
dbYRotateCamera( dbCameraAngleY()+dbMouseMoveX()/5 );
if (dbUpKey()==1) dbMoveCamera( speed );
if (dbDownKey()==1) dbMoveCamera(-speed );
dbPositionMouse( 200, 200 );
dbCenterText ( 200,400,"Loading was successful." );
char msg[250];
sprintf_s( msg, "Triangle Count: %d", dbStatistic(1) );dbCenterText ( 200,100, msg );
sprintf_s( msg, "Camera X: %.3f", dbCameraPositionX() );dbCenterText ( 200,120, msg );
sprintf_s( msg, "Camera Y: %.3f", dbCameraPositionY() );dbCenterText ( 200,140, msg );
sprintf_s( msg, "Camera Z: %.3f", dbCameraPositionZ() );dbCenterText ( 200,160, msg );
if (dbObjectExist(1)) dbText( 200, 180, "Object exists!" );
if (dbEffectExist(1)) dbText( 200, 100, "Effect exists!" );
dbSync ( );
}
return;
}
bool initialize(){
static bool init_finished=false;
if (!init_finished){
dbLoadBitmap( "Cement.png",1);
dbPrint( "Now Loading..." );
dbSync();
dbHideMouse();
dbSetImageColorKey( 0,0,0 );
dbLoadObject( "meow.x",1 );
dbScaleObject( 1, 20, 20, 20 );
dbSetObjectEmissive( 1, dbRgb( 0,0,0 ) );
dbSetObjectSpecular(1,0);
dbPositionObject( 1, 0, 0 , 0 );
dbSetShadowShadingOn(1);
dbPositionCamera( 0, 0, 0 );
dbSetCurrentBitmap(0);
init_finished=true;}
else
return true;
return true;
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------
I added a red point light and i get this. There's a white portion that's supposed to be red.
I added a dbRgb(255,255,0) light with 30 range and i get that white portion.
I also noticed that by adding dbSetShadowShadingOn(1) that the triangle count increases from 232 to 2088. Is this natural?
When a person has nothing but a dream, can he dare to dream.