Bug in shader creation?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
mightypanda
Posts: 8
Joined: Wed Oct 06, 2004 2:04 pm
Location: Bologna, Italy
Contact:

Bug in shader creation?

Post by mightypanda »

Maybe i found an Irrlicht 0.10.0 bug..
I modified the Shader example providing a a pixel-only hlsl shader and putting vertex shader file and procedure name to NULL.
Everything right but at rendertime i get an exception in this routine because the VSConstantsTable is NULL.

Code: Select all

bool CD3D9HLSLMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype)
{
	VSConstantsTable->SetDefaults(pID3DDevice);
	return CD3D9ShaderMaterialRenderer::OnRender(service, vtxtype);
}
Problems goes away easily wrapping that line with:

Code: Select all

if (VSConstantsTable) VSConstantsTable->SetDefaults(pID3DDevice);
Bug or error on my side?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, my error. Sorry. Thanks for posting!
Post Reply