I'm quite a noob at DarkGDK. I found out how to load a world, but the textures won't show up. The world is just all grey.
[code]
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadObject ( "World.x", 1 );
dbPositionCamera ( 25, 100, 100 );
dbLoopObject ( 1 );
dbSetObjectSpeed ( 1, 4000 );
while ( LoopGDK ( ) )
{
dbSync ( );
}
return;
}
[/code]
I've been using 3D world studio to create this .X file. But even when I include the .stf files with the .x file, it still doesn't load them.
Is there somthin missing here? Am I doing somthing wrong?? Should I just use a different program???
[url]http://img85.imageshack.us/img85/203/65681852.png[/url]
[code]
set display mode 800,600,32
sync on
sync rate 60
load object "media\world.x",1
load bitmap "your texture path",1
texture object 1,1
position camera 25,100,100
do
sync
loop
[/code]
Heres some example DBPro code that can help you out also make you sure your .X files are in the same folder as your world textures.Also it is agood idea to check out the TGC forums ;)
Btw forgot DarkBasic can't read .stf file.YOu need to assign new texures with the extensions like .tga .dds .jpg .I recommend .dds for better speeds.
[QUOTE=midlet_guy;20869124][code]
set display mode 800,600,32
sync on
sync rate 60
load object "media\world.x",1
load bitmap "your texture path",1
texture object 1,1
position camera 25,100,100
do
sync
loop
[/code]
Heres some example DBPro code that can help you out also make you sure your .X files are in the same folder as your world textures.Also it is agood idea to check out the TGC forums ;)
Btw forgot DarkBasic can't read .stf file.YOu need to assign new texures with the extensions like .tga .dds .jpg .I recommend .dds for better speeds.[/QUOTE]
Now with that code init, It won't even load the model.
World studio works with .vtf, .stf and many others. So where can I find a converter to change these textures into a .dds?
New Code:
[code]
#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 );
dbLoadObject ( "World.x", 1 );
dbLoadBitmap("Brick_Small04.jpg", 1);
dbTextureObject(1, 1);
dbPositionCamera ( 25, 100, 100 );
dbLoopObject ( 1 );
dbSetObjectSpeed ( 1, 4530 );
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
// return back to windows
return;
}
[/code]
that was just DBPro code.
But the main thing is that .STF are made for the Leadwerks engine not for DarkBasic
[QUOTE=midlet_guy;20870988]that was just DBPro code.
But the main thing is that .STF are made for the Leadwerks engine not for DarkBasic[/QUOTE]
I'm quite aware of that, just the model won't show up now.
Even when I use .dss, I can't tell if it's working or not because the window is just black.
make sure you exported your model with normal .jpg or .dds textures also check if the modeland the textures are in the same folder
[QUOTE=midlet_guy;20878382]make sure you exported your model with normal .jpg or .dds textures also check if the modeland the textures are in the same folder[/QUOTE]
My screen still stays black. Nothing has changed at all
try the set ambient light command.
Your case is very strange
Still, the window is just black.
I might have placed the camera in the wrong place?
Try placing camera at 0,0,0
Also is the your model only black ? Or just the whole view ?
The entire view is black, The model won't show up.
Looks like this > [url]http://img28.imageshack.us/i/asaj.png/[/url]
Well i recommend to post in the TGC forums.
[QUOTE=midlet_guy;20891806]Well i recommend to post in the TGC forums.[/QUOTE]
Well, on this machine C++ compiler has been acting like a bitch. It kept freezing, rebooting my machine. I tried it on my laptop, and the model came out fine.
Sorry, you need to Log In to post a reply to this thread.