mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Added a new capability to check for PrimitiveID support (#3154)
This commit is contained in:
@@ -1853,7 +1853,12 @@ namespace bgfx
|
||||
const bool hasFragCoord = !bx::strFind(input, "gl_FragCoord").isEmpty() || profile->id >= 400;
|
||||
const bool hasFragDepth = !bx::strFind(input, "gl_FragDepth").isEmpty();
|
||||
const bool hasFrontFacing = !bx::strFind(input, "gl_FrontFacing").isEmpty();
|
||||
const bool hasPrimitiveId = !bx::strFind(input, "gl_PrimitiveID").isEmpty();
|
||||
const bool hasPrimitiveId = !bx::strFind(input, "gl_PrimitiveID").isEmpty() && BGFX_CAPS_PRIMITIVE_ID;
|
||||
|
||||
if (!hasPrimitiveId)
|
||||
{
|
||||
preprocessor.writef("#define gl_PrimitiveID 0\n");
|
||||
}
|
||||
|
||||
bool hasFragData[8] = {};
|
||||
uint32_t numFragData = 0;
|
||||
|
||||
Reference in New Issue
Block a user