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 / Dark Shader + DGDK

Author
Message
Mister Fuzzy
13
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 9th Aug 2012 22:33
I recently made a shader for my game, and I loaded it into Dark Shader to see how it looked. It looks fine, so I try using the thing in my game and all I get is a black object. I applied dynamic textures to the object ( it's default detail map and a dynamic background capture texture via dbSetCameraToImage(blarg) )... It can't be my graphic shader version (Win7 uses Shader Version 4.0 by default, AND it looked alright in Dark Shader)... What is going on? My shader is basically a mix of the default heathaze.fx and colored_glass2.fx...

ALIEN(S)!!!!!!!!1!! (and sausages)
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 10th Aug 2012 00:39
The vertex / matrix transferring functions doesn't work.

You can get around this by manually exporting the functions needed to create and set DBPro's built-in vectors / matrices as referred by indices and the shader finctions taking those indices as parameters.

As for shader version 4 I was under the impression that isn't available in DirectX 9?


PS: if you don't mind uploading your shader I can test it like described above (I already have some classes set up doing that) in case it still won't work (I have some issues with Evolved's shaders still but I've managed to get some simple homebrewed things running at least).


"Why do programmers get Halloween and Christmas mixed up?"
Mister Fuzzy
13
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 10th Aug 2012 01:28 Edited at: 10th Aug 2012 01:35
Quote: "The vertex / matrix transferring functions doesn't work."
Why is DGDK so broken...
Quote: "You can get around this by manually exporting the functions needed to create and set DBPro's built-in vectors / matrices as referred by indices and the shader functions taking those indices as parameters."
Ermm.... I'm sorry, I don't quite follow. This is the first time I've ever needed a shader in a game (before, simple transparency was good enough. 2D "shaders" that I've written before never required vectors/matrices, so I was kinda hoping that I wouldn't need to do mess with those... I'm not saying I can't, I just prefer not to.

Quote: "if you don't mind uploading your shader"
Yeah, I would, but I can't get it exported properly. DarkShader keeps crashing... It crashes frequently - no fault of my shader, it just doesn't like my computer...

Does DGDK handle shaders differently than DBPro? I used the example utilization of a shader with dynamic textures from the Dark Shader documentation (but modified it to work with C++, of course). The documentation told me to do this:



Does this not work for DGDK?

ALIEN(S)!!!!!!!!1!! (and sausages)
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 10th Aug 2012 02:14
Ah, if you don't need to use vectors or matrices I think the built in functionality should work.

DarkGDK 2 is still pretty buggy; if a small enough snippet like that works in DBPro and not in DarkGDK chances are good that one of the GDK functions doesn't work.

Be mindful that certain functions have had their parameters rearranged from DarkGDK 1, which is probably what any documentation refers to, so you might want to look into that.
This is most likely your issue there; your dbTextureObject calls doesn't match what I guess they intend to achieve; the new parameter list is
.
Try changing your code so it fits that and see if it'll work.

Otherwise one common problem with the GDK2 wrapper functions is a small error in the dll function it calls, ie. a missed letter in the mangled function name. You can open the corresponding dll with a text editor and search for the name stated in the wrapper function, if it doesn't exist theres a good chance everything will work if you just replace it with the proper name.


Quote: "DarkShader keeps crashing... It crashes frequently"

It does that for me all the time as well, but since when have things been allowed to be too easy?


"Why do programmers get Halloween and Christmas mixed up?"
Mister Fuzzy
13
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 10th Aug 2012 22:26
Quote: "DarkGDK 2 is still pretty buggy"
...And that's why I still use DGDK1.0 (Well, XNA now.. But whatever). I don't think that the new DGDK2.0 parameter would be all too friendly with DGDK1.0. Someone really needs to make a seperate forum for DGDK2.0...

It's been fun: So long, TGC!
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 11th Aug 2012 06:21
Quote: "Someone really needs to make a seperate forum for DGDK2.0"

It's still DarkGDK, so that won't happen. It's simply a large version upgrade that changes the interface and some underlying functionality of DarkGDK that for the most part is for the best.

Login to post a reply

Server time is: 2024-03-28 22:18:42
Your offset time is: 2024-03-28 22:18:42