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 and DarkShader LightPos Array

Author
Message
Bongorula
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Rendsburg/ Germany
Posted: 26th Mar 2007 13:12
Hello,

i am new to DarkGDk, but i already have some experience with DirectX and OpenGL.

I have recently bought Dark Shader - it´s a cool program, but i have problems to use the shaders with the GDK.

I can use shaders,that do not require light variables like the Halo-Shader and i can change to Ambient Color for a shader via the "AmbientColor" variable and the dbSetEffectConstantVector function.

I have problems with the LightPos and LightColor-Arrays. Although i have read the DarkShader-Docu, which states how to send data to the arrays in DBPro, i cant find any hint on how to address any element in the "LightPos" or "LightColor"-Arrays. Because of this i cant use any pixel-shader or Bumps-Shaders, which was one of my main reasons to buy DarkShader.

Can anyone help me, please?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Mar 2007 19:47
That's a good point, it looks like the functions haven't been exposed in the header but they exist in the lib.

You can add the following functions to the header (or your code) if you want to use them:



and an example of how you might use it:



There's no 'db' prefix on them yet, an update to GDK may add this.
Bongorula
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Rendsburg/ Germany
Posted: 29th Mar 2007 21:24
Bump Mapping at last !

Thank you very much for your help.
Bongorula
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Rendsburg/ Germany
Posted: 30th Mar 2007 00:18
Hmmm, i have put the three functions into the header, but i get the following message from the linker:

GameApp.obj : error LNK2019: unresolved external symbol "void __cdecl ReleaseEffectPointer(void)" (?ReleaseEffectPointer@@YAXXZ) referenced in function "private: void __thiscall CGameApp::LoadModels(void)" (?LoadModels@CGameApp@@AAEXXZ)
GameApp.obj : error LNK2019: unresolved external symbol "void __cdecl SetEffectConstantVectorElement(unsigned long,int,int)" (?SetEffectConstantVectorElement@@YAXKHH@Z) referenced in function "private: void __thiscall CGameApp::LoadModels(void)" (?LoadModels@CGameApp@@AAEXXZ)
GameApp.obj : error LNK2019: unresolved external symbol "int __cdecl GetObjectEffect(int,int)" (?GetObjectEffect@@YAHHH@Z) ref

This means, that the libraries do not contain the proper functions, doesnt it? I have tried the 100207 and 120307 Updates,but it doesnt work. I use Visual c++ Express.
Bongorula
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Rendsburg/ Germany
Posted: 6th Apr 2007 14:08
I have found the functions in the ShaderData-Library, but Lights still dont work. When i put PerPixel-Shaders on my objects, they appear just black. I think i just have to wait for an update.

Login to post a reply

Server time is: 2024-11-19 12:43:35
Your offset time is: 2024-11-19 12:43:35