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 / Why is 'Set Effect Constant Vector Element' not in the Dark GDK version of Dark Shader???

Author
Message
Christopher Reeves
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location: Texas, USA
Posted: 1st Feb 2010 01:54
This command is needed in order for me to set the lighting for the Per Pixel Lighting shader I'm trying to get working in Dark GDK, however, this command is not even available...why?
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 1st Feb 2010 02:34
Can't you just use dbSetEffectConstantVector?

Christopher Reeves
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location: Texas, USA
Posted: 1st Feb 2010 02:59
Those aren't the same commands. The LightPos constant is actually an array of 8 lights, and you have to use the dbSetEffectConstantVectorElement command in order to access each light in the array that is declared in the shader. The documentation tells you to use this command, but it does not exist in the GDK version.
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 1st Feb 2010 10:13
Ah, my bad!

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 1st Feb 2010 11:00
Have you tried to manually add the function definition to the header file?
Sometimes that can be missing...
Christopher Reeves
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location: Texas, USA
Posted: 1st Feb 2010 15:37
Nah I haven't tried that, I'll try it and see what happens.
Christopher Reeves
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location: Texas, USA
Posted: 1st Feb 2010 16:26 Edited at: 1st Feb 2010 16:41
Well I added dbSetEffectConstantVectorElement() to the header file and it seemed to recognize it as a valid command, but then I got a runtime error that said I had to use dbGetObjectEffect(), which apparently returns an int...I then did the code to try to get the lights to work and they still don't...I'm going to go to tech support about this.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 2nd Feb 2010 12:15
I do not completely understand what you explain.
Maybe a parameter has the wrong kind or there is some mistake in the function definition that you added.
I don't have the DarkShader help files at hand, but you could post the related information, as well as the function definition that you used. The same about that error and even some source code.
I don't think that people can help you with the current information, unless they have solved this before, that is.

Login to post a reply

Server time is: 2024-10-01 23:43:42
Your offset time is: 2024-10-01 23:43:42