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 .NET / Where's my texture?

Author
Message
Uberdroid
17
Years of Service
User Offline
Joined: 6th Apr 2007
Location:
Posted: 9th Jun 2009 19:37
texture = New DarkGDK.Basic2D.Image("media\pics\bricks.tga")

' Create a box, 10x40x10 units in size, and wrap the texture
' onto the cube
BOX = New DarkGDK.Basic3D.Box(10, 40, 10, texture)

In my main loop no matter what I do the box looks like the familiar white/gray untextured blank box.
I've tried different picture format types... nothing works.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 9th Jun 2009 21:32
Uberdroid,

It's possible that your current directory (the EXE bin/debug) folder does not contain your media folder, in which case, you will need to either move the Media folder into your bin/debug folder, or use the File.SetCurrentDirectory to the root folder where Media/pics/bricks.tga is located and try loading the image this way,

The unfortunate thing at the moment is that image loading does not return an error code if it cannot locate the image file. You will need to test for this yourself by using the File.FileExists function.

Hope this helps.

Paul.

Uberdroid
17
Years of Service
User Offline
Joined: 6th Apr 2007
Location:
Posted: 10th Jun 2009 02:35
Thanks that worked! So all your assets have to be in that folder by default unless you change it. Cool...

Login to post a reply

Server time is: 2024-04-25 05:42:57
Your offset time is: 2024-04-25 05:42:57