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 / DarkGDK Rendering Problems NEED HELP! [C++]

Author
Message
Marc Alexander Reed
13
Years of Service
User Offline
Joined: 27th Jul 2011
Location:
Posted: 27th Jul 2011 15:27
Hey guys. This is my first time on the forum and using DGDK really. I'm starting work on a 3D FPS using DGDK and for some reason when I execute my program it just draws the FPS but not the cube I told it to.

Code:


Thanks in advance.

C++ Game Engine Developer.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 27th Jul 2011 19:51
Zero is not a valid ID number for any object. Change it to one and the cube will be displayed.



Two more observations, maybe it helps:

Any code you write after the closing bracket of the while(LoopGDK()) {} block will never be executed, so your exit() function will not be called. You can test this by putting a message box or a breakpoint into the program. A possible solution is to modify the loop like this:




In the init() function you position the camera and immediately create an object. By default, when you create or load a new object, the camera is auto-positioned and tilted to look at it, so the initial positioning is not needed. If you want to switch off this behaviour (e.g. to improve performance when creating lots of objects), use dbAutoCamOff().
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 27th Jul 2011 19:52
Welcome to the forum and I hope you will have fun with Dark GDK!

Login to post a reply

Server time is: 2024-11-19 08:36:09
Your offset time is: 2024-11-19 08:36:09