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 / dbRenderDynamicCubeMap usage help, is it broken ?

Author
Message
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 30th Jul 2009 16:21
This command - dbRenderDynamicCubeMap - is part of the shaderdata.h header file (and its .lib counterpart).

It is supposed to work in conjunction with the commands :

dbMakeDynamicCubeMap
dbApplyCubeMapToObject

... the problem is that when the dbRenderDynamicCubeMap command is reached in the program, an exception is thrown. It will do this regardless of the setup, regardless of whether the make/apply commands have been called before it or not, and regardless of the camera you tell it to use, either -1 for the temp cam, or an already made camera, or a camera that isnt made.... none of the arguments that you pass it make any difference if it crashes or not either.

The Render part of those 3 commands is needed to be able to use them, as it allows to to render the dynamic cubemap to the rendertarget at a certain position, while the make and apply commands work perfectly well, the cubemap looks a little crappy as you have no control over it.

Has anybody had an issue with this command before ? (or even used it ? )
Is there some kind of specific setup required to use the command, beyond making/applying the cubemap with the above commands ?

Whether it ends up working or not isnt critical, but its something I wouldnt mind having working if I can. Any help is greatly appreciated

If it ain't broke.... DONT FIX IT !!!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Jul 2009 16:53
Well, this does nothing (haven't look into dbMakeDynamicCubeMap etc. usage), but it doesn't crash either:



As an obvious question, have you called dbShaderDataStart?

Also in the sample I've included a couple of lines to include Sparky's Collision functions. Now I have a linkage error if those lines are un-commented. It says:



And so, this would mean that Dark Shader libraries and Sparky's Collision libraries have a conflict, and we should notify. Please give it a try.

Other than that, it would be nice if you got it working and post a little example. Dynamic cube maps could be great for many uses. I have thought about making a skysphere with it, that would allow many scenary tricks.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 30th Jul 2009 17:41 Edited at: 30th Jul 2009 17:45
yep, i called shaderdatastart, and included the library manually and in the header to see if it made a difference.

I tried to reload the shaderdispalypointer the same as you did i see, in multiple places(even in the loop before the render command was called) ...

the make and apply commands dont crash it, but you are right, they dont do anything... i played with reflection shading with them, but they still didnt do anything except make it look skewed from not being rendered

as soon as a call to dbRenderDynamicCubeMap is made with correct parameters it crashes the program, at the command itself with an exception memory violation, or in crt.c just after a showwindow command inside a winapi block..

I did play with paramters and I noticed that it crashed at the command, when it had its parameters set correctly and to use a use made camera(cam1), but it crashed in crt.c when it was told to use the temp cam(-1) with the correct object and position etc...

I did also get it to run without crashing with the render command in, it still did nothing though as the only way i could do that was to pass it object 0, temp cam(-1) and position x, y, z to 0. I guessing it didnt crash then as GDK saw it had an invalid object and skipped processing whatever is crashing it.

EDIT : the funny thing with when it did run though, was that the camera was all screwed up, I had dbControlCameraUsingArrowKeys just to be able to navigate in my test quickly, and it kind of reversed everything, like the controls were inside out, and skewed at the same time(bak was forward and a little left, forward was bak and a little right, left was forward and right, right was back and left, the right and left stopped turning the camera as they should and moved it instead aswell, im thinking this may be a bug of some kind)

If I do end up sorting it somehow ill post back, thanx for the reply morcilla

If it ain't broke.... DONT FIX IT !!!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 30th Jul 2009 18:17
Here is some code that shows the render command not working as it should, its demonstrated in a similar manner in darkshader.



Its messy code I know, its heavily commented and has alot of the various things I was trying left in as comments. Basically, if you uncomment dbRenderDynamicCubeMap() and pass it object 1, the program crashes, regardless of the camera you pass it or the position.

ps. this program has a skybox, as something for the cubemap to reflect, any skybox will work, im sure ya got one somewhere

If it ain't broke.... DONT FIX IT !!!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Jul 2009 19:11
Well, I uncommented everything, and I didn't get a crash:



The cube looks plain however. Don't know what should be exactly the desired result, I suppose it should mimic the skybox texture. Perhaps we are not using it like it should, but no crashes. Oh I'm not using DGDK 7.3, I use DGDK November08 when with VS2008.

I've included dbCubeMapAvailable and dbMipCubeMapAvailable checks to see if you got hardware support.

Side note: No worries about the SC libraries incompatibility with Dark Shader?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 31st Jul 2009 00:51
Oh sorry, i didnt check sparky's yet, ill do that today(was early AM when I posted this lol)..

The above wont crash until you call the dbRenderDynamicCubeMap command like this (its being passed object 0 atm, which can never exist, so GDK doesnt even process the command, passing it object 1, the correct object, will make it crash) :

dbRenderDynamicCubeMap(1, -1, 0, 0, 0); : 1 = object ID ,-1 = temp cam

My hardware supports all the featuers present, its a core2 3.2g 2gig ddr2-800, nvidia 9800gt 512mb... runs winxp sp3, vs08 pro ed. sp1 - ive tried with GDK 16-11-07, novemver08 and 7.3 and its the same with em all(becuase the shaderdata.h and .lib are the libraries where the commands are and its not changing between versions if u have a look at it, it isnt even included in nov08 or 7.3's ZIP files)

I think it is one of 2 things, either there is some kind of obscure, undocumented setup that it required to get it working(please help TGC if this is the case) OR it is just a hosed command. Either way, I think ill put together a demo and post on the bug forums a little later when I get some time.

If it ain't broke.... DONT FIX IT !!!
KirDael
15
Years of Service
User Offline
Joined: 22nd Jan 2009
Location:
Posted: 9th Aug 2009 20:28
Hi, i've got the same Problem...

i haven't Sparky's collision but it crashes anyway when i call dbRenderDynamicCubeMap()...

but In DBPro it works fine! what the..!? need help!

Login to post a reply

Server time is: 2024-11-20 17:41:40
Your offset time is: 2024-11-20 17:41:40