Check for draw indirect support

This commit is contained in:
Vincent Lejeune 2014-09-02 18:02:56 +02:00
parent 96c2c8c6b7
commit 3cea173ee2
3 changed files with 14 additions and 0 deletions

View File

@ -132,6 +132,7 @@ extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
#define Base_Instance_Support
#define Buffer_Storage
#define Multi_Draw_Indirect
#define Draw_Indirect
#endif

View File

@ -490,6 +490,7 @@ void IrrDriver::initDevice()
hasVSLayer = false;
hasBaseInstance = false;
hasBuffserStorage = false;
hasDrawIndirect = false;
// Default false value for hasVSLayer if --no-graphics argument is used
if (!ProfileWorld::isNoGraphics())
{
@ -508,6 +509,12 @@ void IrrDriver::initDevice()
hasBaseInstance = true;
Log::info("GLDriver", "ARB Instance enabled");
}
#endif
#ifdef Draw_Indirect
if (hasGLExtension("GL_ARB_draw_indirect")) {
hasDrawIndirect = true;
Log::info("GLDriver", "ARB Draw Indirect enabled");
}
#endif
}

View File

@ -200,6 +200,7 @@ private:
int GLMajorVersion, GLMinorVersion;
bool hasVSLayer;
bool hasBaseInstance;
bool hasDrawIndirect;
bool hasBuffserStorage;
bool m_need_ubo_workaround;
bool m_need_rh_workaround;
@ -306,6 +307,11 @@ public:
return hasBaseInstance;
}
bool hasARB_draw_indirect() const
{
return hasDrawIndirect;
}
bool hasVSLayerExtension() const
{
return hasVSLayer;