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 / Object Draw Order

Author
Message
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 20th Feb 2010 19:22 Edited at: 20th Feb 2010 19:28
Hey,

I am getting a strange problem with the order that my objects are being drawn (image attached).
I was wondering if anyone had come across this before and has a solution.
I can post more source code if necessary but the main points are:

Player.cpp:


Weapon.cpp:


Thanks!

EDIT:
I ran some tests also, it is not my shader, or my models. I have tried with DGDK objects and no shaders/different shaders and it still produces the same result.

Attachments

Login to view attachments
Amnzero
15
Years of Service
User Offline
Joined: 1st Aug 2009
Location:
Posted: 21st Feb 2010 04:37
dbOffsetLimb(player, 2, -5, 40, -35);

Is it possible that the weapon is not positioned correctly, and is sticking out the back of the player?

[url="http://neovance.com/"][/url]
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 21st Feb 2010 17:45
Thanks for the reply Amn,
The weapon is positioned correctly. If I place the camera under the ground, I can see the weapon and player through the ground as well.

I am really out of ideas here, I might have to rebuild the project from the ground and find where this is happening.

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 22nd Feb 2010 11:28
Well, from the lines of code above, there is no special setup for the objects that should change z-draw order.
Perhaps that effect file (dbSetObjectEffect) does something regarding it...

Other than that, the object/textures ID's have something to say in the rendering order.

Not sure if it would help, but this function

void dbSetGlobalObjectCreationMode ( int iMode );

changes the rendering priority from texture Id's (iMode=0) to object Id's (iMode=1, if I'm not wrong). You can play with it.

Also, many talk lately about the DGDK version, so perhaps if you post some compilable sample code, maybe we can try it with the different versions.

Login to post a reply

Server time is: 2024-10-05 16:29:23
Your offset time is: 2024-10-05 16:29:23