Stencil buffer disabled !?!?!

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Acki

Stencil buffer disabled !?!?!

Post by Acki »

When I start the SpecialFX demo there are no shadows...
In the DOS window this log appears:

{Engine}
{System}
{Renderer}
Depth-stencil format is not compatible with display format, disabling stencil buffer.
{DefaultFont}
{Loading Meshes}
...

What's the reason of this ???
It's the normal demo, no changes where made !!!

CU
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Did it work with earlier Engine versions before? What gfx-adapter do you have? Maybe it isn't capable of using the stencil buffer. It could help switching to fullscreen-mode.
Acki

Post by Acki »

Well, with Irrlicht 4.2 it works (I think)...
With Irrlicht 5 I have some more problems:
When I turn on the flag for lightning, the modell appears bright (not as bright as when lightning turned off, but it's bright and no lights are in the map) !!!
And a problem I have in 4.2 and 5:
GetActiveCamera in the event receiver doesn't work (the prog crashes) !!!
I have to change the demos by creating an camera object whitch I can send the commands (like in the QuakeMap demo)...
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Your program might crash, because since 0.4.2, you'll get events during creation of the device. So you device-pointer is zero. Don't call getActiveCamera() if device is Null.
About the brigthness: Is it a .3ds model? Change the emissive light color. Or if not: What rendering device are you using?
Acki

Post by Acki »

Yes, I'm using 3DS files.
I tired DX8 and DX9.
With DX8 there are texture probs (I saw the same prob in an other thread).

What do you mean, where should I change the emmisive color, in Irrlicht (I don't think so) or in 3ds max ???
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Try to change it in irrlicht, like in the (new) special effects tutorial.
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

I have a ATI radeon 7200, and in directX 8.1 and 9.0, irrlicht says there is no stencilbuffer support, while it works just fine in openGL(ver 5.0), I've looked trough the source a bit, but I can only guess that directx gives wrong info about my video card, Maybe I will try to compile the source without the line that checks this, and see if my card goes up in smoke

when I know, ill keep you informed
Acki

Post by Acki »

Phunk wrote:when I know, ill keep you informed
Yes, the same prob with me !!!
Please check this (I have no idear where to look for this) !!! :)

I have a GForce 2 with DX9 installed and tried it with EDT_DIRECTX8 and EDT_DIRECTX9.

If I use DX with 16 bit color, I get this message:
Depth-stencil format is not compatible with display format, disabling stencil buffer.

If I use DX with 32 bit color, I get this message:
Device does not support stencilbuffer, disabling stencil buffer.

If I use OpenGL, it seems to work correctly (no error messages)...

CU
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Thanks for that report, I'll take a look at that.
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

hmm, just compiled the irrlicht source with
if (StencilBuffer &&
(!(Caps.StencilCaps & D3DSTENCILCAPS_DECR) ||
!(Caps.StencilCaps & D3DSTENCILCAPS_INCR) ||
!(Caps.StencilCaps & D3DSTENCILCAPS_KEEP)))
{
os::Printer::log("!Device not able to use stencil buffer, disabling stencil buffer.", ELL_WARNING);
//StencilBuffer = false;
}
(just commented out StencilBuffer = false;)

and then the stencilbuffer works on my card, while the check should imply that it doesn't, does anybody know why?
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

further tests shows that this line is where dx gives an error:
!(Caps.StencilCaps & D3DSTENCILCAPS_INCR)
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hm, but this line should be right, or did I misunderstand the d3d doc? hm.
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

I think that its just DX and my (kind of)card that have the conflict, not your engine. cause then more people should have this problem right?
greets Robin
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

Post by Serg Nechaeff »

version 0.5
*** DirectX9:

Fullscreen:
Device does not support stencilbuffer, disabling stencil buffer.

Windowed :
OK

*** DirectX8

Fullscreen:
Device does not support stencilbuffer, disabling stencil buffer.

Windowed:
Ok

*** OpenGL

Fullscreen:
Ok

Windowed:
Ok
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
crazedlunatic
Posts: 7
Joined: Mon Mar 08, 2004 7:17 pm

Disabled Stencil Buffer

Post by crazedlunatic »

I am having the same problem. Oddly enough it seems to work in windowed mode but NOT fullscreen for me. I am using an nForce2 IGP chipset, so basically a lower grade GeForce4 MX. It is spec'd with a 32-bit stencil-buffer as one of its features as well. I just want to see it work in fullscreen mode since that's better and faster for games and actually has vsync, etc..
Post Reply