Ensuring cubemaps are going to work.

Blitz3D Forums/Blitz3D Programming/Ensuring cubemaps are going to work.

Damien Sturdy(Posted 2008) [#1]
Hi guys,

Bored at work here, decided to play with ye-olde B3D.

I noticed the DriverCaps function sometimes returns true when in fact the hardware cannot cope with it.

The function I added to the code archives,

http://www.blitzbasic.com/codearcs/codearcs.php?code=2187

actually renders a cubemap and tests the output. if the texture after adding the render does not match the backbuffer, then the cubemap texture did not update correctly and cubemaps are not going to work. the function returns false if this test fails, or if DriverCaps says the system cannot do cubemaps.

These methods combined means those of you still playing in this area can use cubemaps properly where supported.

If they do not work then you can of course chose to use a spheremap :-)


jfk EO-11110(Posted 2008) [#2]
Thanks for sharing. This is one of those "don't miss to add it to the next project" thing. There should be some kind of section for maximum compatibility tricks.


Damien Sturdy(Posted 2008) [#3]
I figured it'd be useful for people using it in the future. Was toying with my prototype today at work and the caps function returned that it supported cubemaps, yet all it could do was draw random noise on the texture!