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.
Well Hardware T&L could be set to true, but it's a d3d term and the flag will be used for some d3d specific things only IMHO. The rest are d3d shader specifications, I don't know how we could map them to OpenGL. Any suggestions?
The D3D things should be false for OpenGL, but the others ...
The EVDF_VERTEX_SHADER_x_y and EVDF_PIXEL_SHADER_x_y are the version suported?
If, then you should "ask" the OpenGL and GLSL for versions ... I think...
I don't know very much about this problem ... those versions are only for D3D?
I don't think you can query OpenGL specifically for these things. GLSL is based on SM 3.0 anyway.
Oddly enough, its possible to query the shader model for GLSL from inside the pixel shader using a built in glsl #define. so one thing you can do is make a dummy shader file that output shader version info into an RTT and read it back to the cpu. Ofcourse thats well beyond the scope of this topic, and I wouldn't recommend something so silly.
For stuff like SM 4.0, you can query for the extension "GL_EXT_geometry_shader4" which would mean that geometry shaders are supported and hence the card should be SM 4.0 compatible.
There may be other extensions that indicate SM 2.0 or SM 3.0 support. We should assume minimum SM 2.0 support if GLSL is supported, because thats the minimum level card that can use GLSL.
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
!driver->queryFeature(video::EVDF_ARB_FRAGMENT_PROGRAM_1))
{
device->getLogger()->log("WARNING: Pixel shaders disabled "\
"because of missing driver/hardware support.");
psFileName = 0;
}
if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&
!driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))
{
device->getLogger()->log("WARNING: Vertex shaders disabled "\
"because of missing driver/hardware support.");
vsFileName = 0;
}
In OpenGL driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) and driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) will always return false!
and one more think ... I think that should be || operator between the two queries ...
So the correct code might be:
That code says if pixel shader 1.1 is not supported and arb fragment program 1 is not supported then display warning.
The only way you get into the error condition is if both ps_11_support and arb_1_support are false. Another thing that may help to make this easier to read is if you remember that (!a && !b) == !(a || b).
No, the queryFeature is driver independent. This time it only checks for something which is constantly false. So we could remove that check, or decide to give the enum values some more general meaning.