Hey all, I seem to be having a problem with Shaders. I coded up a test program to check out this Shader I made in FX Composer by Nvidia. When I apply the Shader, my object disappears here is my code, come someone help me out?
// Dark GDK - The Game Creators - www.thegamecreators.com
// Coded by Firos 12
// This program simulates a glow effect for a 3d Object,
// which constantly rotates after being placed in the main loop.
// Header Files
#include "DarkGDK.h"
#include "ShaderData.h"
// Main Entry point
void DarkGDK ( void )
{
// Activate Sync and set the maximun rate to 60
dbSyncOn ( );
dbSyncRate ( 60 );
// Turn the Backdrop on
dbBackdropOn ( );
// Prepare Shaders
dbShaderDataStart ( );
// Create a sphere (Spheres are perfect for testing Textures and Effects)
dbMakeObjectSphere ( 1, 20, 30, 30 );
dbColorObject ( 1, dbRGB ( 255, 0, 0) );
// Load in a Texture and Apply it to the Sphere
dbLoadImage ( "Media/bunker.bmp", 1 );
dbTextureObject ( 1, 1 );
dbScaleObjectTexture ( 1, 5, 5 );
// Load the Glow effect
// dbLoadEffect ( "Media/Post_glow.fx", 1, 0 );
// dbSetObjectEffect ( 1, 1 );
// Create a Light for the scene
dbMakeLight ( 1 );
dbSetDirectionalLight ( 1, 50, 10, 50 );
// Main loop
while ( LoopGDK ( ) )
{
// Rotate the sphere continuosly
dbTurnObjectLeft ( 1, 0.1f );
// Update the screen
dbSync ( );
}
// Return back to windows
return;
}