Commit ad28d172 authored by nadro's avatar nadro

- Prepared OpenGL methods related to separate blending for use.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4784 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 995f2bd7
......@@ -67,9 +67,6 @@ COpenGLExtensionHandler::COpenGLExtensionHandler() :
pGlBufferSubDataARB(0), pGlGetBufferSubDataARB(0), pGlMapBufferARB(0), pGlUnmapBufferARB(0),
pGlIsBufferARB(0), pGlGetBufferParameterivARB(0), pGlGetBufferPointervARB(0),
pGlProvokingVertexARB(0), pGlProvokingVertexEXT(0),
pGlColorMaskIndexedEXT(0), pGlEnableIndexedEXT(0), pGlDisableIndexedEXT(0),
pGlBlendFuncIndexedAMD(0), pGlBlendFunciARB(0),
pGlBlendEquationIndexedAMD(0), pGlBlendEquationiARB(0),
pGlProgramParameteriARB(0), pGlProgramParameteriEXT(0),
pGlGenQueriesARB(0), pGlDeleteQueriesARB(0), pGlIsQueryARB(0),
pGlBeginQueryARB(0), pGlEndQueryARB(0), pGlGetQueryivARB(0),
......@@ -78,7 +75,14 @@ COpenGLExtensionHandler::COpenGLExtensionHandler() :
pGlIsOcclusionQueryNV(0), pGlBeginOcclusionQueryNV(0),
pGlEndOcclusionQueryNV(0), pGlGetOcclusionQueryivNV(0),
pGlGetOcclusionQueryuivNV(0),
pGlBlendEquationEXT(0), pGlBlendEquation(0)
// Blend
pGlBlendFuncSeparateEXT(0), pGlBlendFuncSeparate(0),
pGlBlendEquationEXT(0), pGlBlendEquation(0), pGlBlendEquationSeparateEXT(0), pGlBlendEquationSeparate(0),
// Indexed
pGlEnableIndexedEXT(0), pGlDisableIndexedEXT(0),
pGlColorMaskIndexedEXT(0),
pGlBlendFuncIndexedAMD(0), pGlBlendFunciARB(0), pGlBlendFuncSeparateIndexedAMD(0), pGlBlendFuncSeparateiARB(0),
pGlBlendEquationIndexedAMD(0), pGlBlendEquationiARB(0), pGlBlendEquationSeparateIndexedAMD(0), pGlBlendEquationSeparateiARB(0)
#if defined(GLX_SGI_swap_control)
,pGlxSwapIntervalSGI(0)
#endif
......@@ -517,13 +521,6 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
pGlGetBufferPointervARB= (PFNGLGETBUFFERPOINTERVARBPROC) IRR_OGL_LOAD_EXTENSION("glGetBufferPointervARB");
pGlProvokingVertexARB= (PFNGLPROVOKINGVERTEXPROC) IRR_OGL_LOAD_EXTENSION("glProvokingVertex");
pGlProvokingVertexEXT= (PFNGLPROVOKINGVERTEXEXTPROC) IRR_OGL_LOAD_EXTENSION("glProvokingVertexEXT");
pGlColorMaskIndexedEXT= (PFNGLCOLORMASKINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glColorMaskIndexedEXT");
pGlEnableIndexedEXT= (PFNGLENABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glEnableIndexedEXT");
pGlDisableIndexedEXT= (PFNGLDISABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glDisableIndexedEXT");
pGlBlendFuncIndexedAMD= (PFNGLBLENDFUNCINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncIndexedAMD");
pGlBlendFunciARB= (PFNGLBLENDFUNCIPROC) IRR_OGL_LOAD_EXTENSION("glBlendFunciARB");
pGlBlendEquationIndexedAMD= (PFNGLBLENDEQUATIONINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationIndexedAMD");
pGlBlendEquationiARB= (PFNGLBLENDEQUATIONIPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationiARB");
pGlProgramParameteriARB= (PFNGLPROGRAMPARAMETERIARBPROC) IRR_OGL_LOAD_EXTENSION("glProgramParameteriARB");
pGlProgramParameteriEXT= (PFNGLPROGRAMPARAMETERIEXTPROC) IRR_OGL_LOAD_EXTENSION("glProgramParameteriEXT");
......@@ -544,9 +541,26 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
pGlGetOcclusionQueryivNV = (PFNGLGETOCCLUSIONQUERYIVNVPROC) IRR_OGL_LOAD_EXTENSION("glGetOcclusionQueryivNV");
pGlGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC) IRR_OGL_LOAD_EXTENSION("glGetOcclusionQueryuivNV");
// blend equation
// blend
pGlBlendFuncSeparateEXT = (PFNGLBLENDFUNCSEPARATEEXTPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncSeparateEXT");
pGlBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncSeparate");
pGlBlendEquationEXT = (PFNGLBLENDEQUATIONEXTPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationEXT");
pGlBlendEquation = (PFNGLBLENDEQUATIONPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquation");
pGlBlendEquationSeparateEXT = (PFNGLBLENDEQUATIONSEPARATEEXTPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationSeparateEXT");
pGlBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationSeparate");
// indexed
pGlEnableIndexedEXT = (PFNGLENABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glEnableIndexedEXT");
pGlDisableIndexedEXT = (PFNGLDISABLEINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glDisableIndexedEXT");
pGlColorMaskIndexedEXT = (PFNGLCOLORMASKINDEXEDEXTPROC) IRR_OGL_LOAD_EXTENSION("glColorMaskIndexedEXT");
pGlBlendFuncIndexedAMD = (PFNGLBLENDFUNCINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncIndexedAMD");
pGlBlendFunciARB = (PFNGLBLENDFUNCIPROC) IRR_OGL_LOAD_EXTENSION("glBlendFunciARB");
pGlBlendFuncSeparateIndexedAMD = (PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncSeparateIndexedAMD");
pGlBlendFuncSeparateiARB = (PFNGLBLENDFUNCSEPARATEIPROC) IRR_OGL_LOAD_EXTENSION("glBlendFuncSeparateiARB");
pGlBlendEquationIndexedAMD = (PFNGLBLENDEQUATIONINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationIndexedAMD");
pGlBlendEquationiARB = (PFNGLBLENDEQUATIONIPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationiARB");
pGlBlendEquationSeparateIndexedAMD = (PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationSeparateIndexedAMD");
pGlBlendEquationSeparateiARB = (PFNGLBLENDEQUATIONSEPARATEIPROC) IRR_OGL_LOAD_EXTENSION("glBlendEquationSeparateiARB");
// get vsync extension
#if defined(WGL_EXT_swap_control) && !defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
......
......@@ -1220,11 +1220,6 @@ class COpenGLExtensionHandler
void extGlGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
void extGlGetBufferPointerv (GLenum target, GLenum pname, GLvoid **params);
void extGlProvokingVertex(GLenum mode);
void extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
void extGlEnableIndexed(GLenum target, GLuint index);
void extGlDisableIndexed(GLenum target, GLuint index);
void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst);
void extGlBlendEquationIndexed(GLuint buf, GLenum mode);
void extGlProgramParameteri(GLuint program, GLenum pname, GLint value);
// occlusion query
......@@ -1237,12 +1232,22 @@ class COpenGLExtensionHandler
void extGlGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
void extGlGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
// blend
void extGlBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
void extGlBlendEquation(GLenum mode);
// indexed
void extGlEnableIndexed(GLenum target, GLuint index);
void extGlDisableIndexed(GLenum target, GLuint index);
void extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
void extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst);
void extGlBlendFuncSeparateIndexed(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
void extGlBlendEquationIndexed(GLuint buf, GLenum mode);
void extGlBlendEquationSeparateIndexed(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
// generic vsync setting method for several extensions
void extGlSwapInterval(int interval);
// blend operations
void extGlBlendEquation(GLenum mode);
// the global feature array
bool FeatureAvailable[IRR_OpenGL_Feature_Count];
......@@ -1347,13 +1352,6 @@ class COpenGLExtensionHandler
PFNGLGETBUFFERPOINTERVARBPROC pGlGetBufferPointervARB;
PFNGLPROVOKINGVERTEXPROC pGlProvokingVertexARB;
PFNGLPROVOKINGVERTEXEXTPROC pGlProvokingVertexEXT;
PFNGLCOLORMASKINDEXEDEXTPROC pGlColorMaskIndexedEXT;
PFNGLENABLEINDEXEDEXTPROC pGlEnableIndexedEXT;
PFNGLDISABLEINDEXEDEXTPROC pGlDisableIndexedEXT;
PFNGLBLENDFUNCINDEXEDAMDPROC pGlBlendFuncIndexedAMD;
PFNGLBLENDFUNCIPROC pGlBlendFunciARB;
PFNGLBLENDEQUATIONINDEXEDAMDPROC pGlBlendEquationIndexedAMD;
PFNGLBLENDEQUATIONIPROC pGlBlendEquationiARB;
PFNGLPROGRAMPARAMETERIARBPROC pGlProgramParameteriARB;
PFNGLPROGRAMPARAMETERIEXTPROC pGlProgramParameteriEXT;
PFNGLGENQUERIESARBPROC pGlGenQueriesARB;
......@@ -1371,8 +1369,25 @@ class COpenGLExtensionHandler
PFNGLENDOCCLUSIONQUERYNVPROC pGlEndOcclusionQueryNV;
PFNGLGETOCCLUSIONQUERYIVNVPROC pGlGetOcclusionQueryivNV;
PFNGLGETOCCLUSIONQUERYUIVNVPROC pGlGetOcclusionQueryuivNV;
// Blend
PFNGLBLENDFUNCSEPARATEEXTPROC pGlBlendFuncSeparateEXT;
PFNGLBLENDFUNCSEPARATEPROC pGlBlendFuncSeparate;
PFNGLBLENDEQUATIONEXTPROC pGlBlendEquationEXT;
PFNGLBLENDEQUATIONPROC pGlBlendEquation;
PFNGLBLENDEQUATIONSEPARATEEXTPROC pGlBlendEquationSeparateEXT;
PFNGLBLENDEQUATIONSEPARATEPROC pGlBlendEquationSeparate;
// Indexed
PFNGLENABLEINDEXEDEXTPROC pGlEnableIndexedEXT;
PFNGLDISABLEINDEXEDEXTPROC pGlDisableIndexedEXT;
PFNGLCOLORMASKINDEXEDEXTPROC pGlColorMaskIndexedEXT;
PFNGLBLENDFUNCINDEXEDAMDPROC pGlBlendFuncIndexedAMD;
PFNGLBLENDFUNCIPROC pGlBlendFunciARB;
PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC pGlBlendFuncSeparateIndexedAMD;
PFNGLBLENDFUNCSEPARATEIPROC pGlBlendFuncSeparateiARB;
PFNGLBLENDEQUATIONINDEXEDAMDPROC pGlBlendEquationIndexedAMD;
PFNGLBLENDEQUATIONIPROC pGlBlendEquationiARB;
PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC pGlBlendEquationSeparateIndexedAMD;
PFNGLBLENDEQUATIONSEPARATEIPROC pGlBlendEquationSeparateiARB;
#if defined(WGL_EXT_swap_control)
PFNWGLSWAPINTERVALEXTPROC pWglSwapIntervalEXT;
#endif
......@@ -2455,76 +2470,6 @@ inline void COpenGLExtensionHandler::extGlProvokingVertex(GLenum mode)
#endif
}
inline void COpenGLExtensionHandler::extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlColorMaskIndexedEXT)
pGlColorMaskIndexedEXT(buf, r, g, b, a);
#elif defined(GL_EXT_draw_buffers2)
glColorMaskIndexedEXT(buf, r, g, b, a);
#else
os::Printer::log("glColorMaskIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlEnableIndexed(GLenum target, GLuint index)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlEnableIndexedEXT)
pGlEnableIndexedEXT(target, index);
#elif defined(GL_EXT_draw_buffers2)
glEnableIndexedEXT(target, index);
#else
os::Printer::log("glEnableIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlDisableIndexed(GLenum target, GLuint index)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlDisableIndexedEXT)
pGlDisableIndexedEXT(target, index);
#elif defined(GL_EXT_draw_buffers2)
glDisableIndexedEXT(target, index);
#else
os::Printer::log("glDisableIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendFunciARB)
pGlBlendFunciARB(buf, src, dst);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendFuncIndexedAMD)
pGlBlendFuncIndexedAMD(buf, src, dst);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendFunciARB(buf, src, dst);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendFuncIndexedAMD(buf, src, dst);
#else
os::Printer::log("glBlendFuncIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenum mode)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendEquationiARB)
pGlBlendEquationiARB(buf, mode);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendEquationIndexedAMD)
pGlBlendEquationIndexedAMD(buf, mode);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendEquationiARB(buf, mode);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendEquationIndexedAMD(buf, mode);
#else
os::Printer::log("glBlendEquationIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlProgramParameteri(GLuint program, GLenum pname, GLint value)
{
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
......@@ -2671,6 +2616,138 @@ inline void COpenGLExtensionHandler::extGlGetQueryObjectuiv(GLuint id, GLenum pn
#endif
}
inline void COpenGLExtensionHandler::extGlBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlBlendFuncSeparate)
pGlBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
else if (pGlBlendFuncSeparateEXT)
pGlBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
#elif defined(GL_VERSION_1_4)
glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
#elif defined(GL_EXT_blend_func_separate)
glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
#else
os::Printer::log("glBlendFuncSeparate not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendEquation(GLenum mode)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlBlendEquation)
pGlBlendEquation(mode);
else if (pGlBlendEquationEXT)
pGlBlendEquationEXT(mode);
#elif defined(GL_VERSION_1_4)
glBlendEquation(mode);
#elif defined(GL_EXT_blend_minmax)
glBlendEquationEXT(mode);
#else
os::Printer::log("glBlendEquation not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlEnableIndexed(GLenum target, GLuint index)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlEnableIndexedEXT)
pGlEnableIndexedEXT(target, index);
#elif defined(GL_EXT_draw_buffers2)
glEnableIndexedEXT(target, index);
#else
os::Printer::log("glEnableIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlDisableIndexed(GLenum target, GLuint index)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlDisableIndexedEXT)
pGlDisableIndexedEXT(target, index);
#elif defined(GL_EXT_draw_buffers2)
glDisableIndexedEXT(target, index);
#else
os::Printer::log("glDisableIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlColorMaskIndexed(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_EXT_draw_buffers2] && pGlColorMaskIndexedEXT)
pGlColorMaskIndexedEXT(buf, r, g, b, a);
#elif defined(GL_EXT_draw_buffers2)
glColorMaskIndexedEXT(buf, r, g, b, a);
#else
os::Printer::log("glColorMaskIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendFuncIndexed(GLuint buf, GLenum src, GLenum dst)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendFunciARB)
pGlBlendFunciARB(buf, src, dst);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendFuncIndexedAMD)
pGlBlendFuncIndexedAMD(buf, src, dst);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendFunciARB(buf, src, dst);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendFuncIndexedAMD(buf, src, dst);
#else
os::Printer::log("glBlendFuncIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendFuncSeparateIndexed(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendFuncSeparateiARB)
pGlBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendFuncSeparateIndexedAMD)
pGlBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
#else
os::Printer::log("glBlendFuncSeparateIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendEquationIndexed(GLuint buf, GLenum mode)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendEquationiARB)
pGlBlendEquationiARB(buf, mode);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendEquationIndexedAMD)
pGlBlendEquationIndexedAMD(buf, mode);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendEquationiARB(buf, mode);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendEquationIndexedAMD(buf, mode);
#else
os::Printer::log("glBlendEquationIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlBlendEquationSeparateIndexed(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (FeatureAvailable[IRR_ARB_draw_buffers_blend] && pGlBlendEquationSeparateiARB)
pGlBlendEquationSeparateiARB(buf, modeRGB, modeAlpha);
else if (FeatureAvailable[IRR_AMD_draw_buffers_blend] && pGlBlendEquationSeparateIndexedAMD)
pGlBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha);
#elif defined(GL_ARB_draw_buffers_blend)
glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha);
#elif defined(GL_AMD_draw_buffers_blend)
glBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha);
#else
os::Printer::log("glBlendEquationSeparateIndexed not supported", ELL_ERROR);
#endif
}
inline void COpenGLExtensionHandler::extGlSwapInterval(int interval)
{
// we have wglext, so try to use that
......@@ -2712,22 +2789,6 @@ inline void COpenGLExtensionHandler::extGlSwapInterval(int interval)
#endif
}
inline void COpenGLExtensionHandler::extGlBlendEquation(GLenum mode)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
if (pGlBlendEquation)
pGlBlendEquation(mode);
else if (pGlBlendEquationEXT)
pGlBlendEquationEXT(mode);
#elif defined(GL_EXT_blend_minmax) || defined(GL_EXT_blend_subtract) || defined(GL_EXT_blend_logic_op)
glBlendEquationEXT(mode);
#elif defined(GL_VERSION_1_2)
glBlendEquation(mode);
#else
os::Printer::log("glBlendEquation not supported", ELL_ERROR);
#endif
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment