Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to use shader in dark gdk

Author
Message
The Dream maker
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location:
Posted: 16th Nov 2008 09:16
I try to use a shader that works in dark basic pro in dark gdk but it doesn't work.


here is my code:


#include "DarkGDK.h"
#include "ShaderData.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 );
dbShaderDataStart ( );

dbMakeObjectSphere(1,100);
dbLoadImage("Media/Fur1.tga",1);
dbScaleObjectTexture(1,1.5,1);
dbTextureObject(1,0,1);
dbLoadEffect("fur.fx",1,0);
if(dbEffectExist(1)){dbSuspendForKey();}
dbSetObjectEffect(1,1);
dbSetObjectTransparency(1,1);

dbMakeVector4 ( 1 );
dbSetVector4 ( 1,0,0,-100, 0 );
dbSetEffectConstantVector ( 1, "LightPosition", 1 );
dbDeleteVector4 ( 1 );

// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
dbTurnObjectRight(1,0.1);
}

// return back to windows
return;
}


if I start the program, the window opens and an error message appears and sais that the programm stoped working.
Swordsman
16
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 16th Nov 2008 13:40
Check all of your file paths are correct and do a step through debug to see if you can isolate the spot, then post it here.
The Dream maker
16
Years of Service
User Offline
Joined: 16th Nov 2008
Location:
Posted: 25th Nov 2008 17:08
Thanks for your answer but i updated Dark GDK and it works now!!!!


Yeaaaah!!!!!!!


this Shader is very good!


it's better than with darkbasicpro!

Login to post a reply

Server time is: 2024-11-25 07:44:52
Your offset time is: 2024-11-25 07:44:52