mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
Fixed building for OpenGL ES 1.1 platforms
* Added proper extension handling for `glBlendEquation` and related constants (required for OpenGL ES 1.1).
This commit is contained in:
parent
3fa1d0e03d
commit
ff869777a9
@ -62,6 +62,9 @@
|
|||||||
#define GLEXT_glClientActiveTexture glClientActiveTexture
|
#define GLEXT_glClientActiveTexture glClientActiveTexture
|
||||||
#define GLEXT_glActiveTexture glActiveTexture
|
#define GLEXT_glActiveTexture glActiveTexture
|
||||||
#define GLEXT_GL_TEXTURE0 GL_TEXTURE0
|
#define GLEXT_GL_TEXTURE0 GL_TEXTURE0
|
||||||
|
#define GLEXT_glBlendEquation glBlendEquationOES
|
||||||
|
#define GLEXT_GL_FUNC_ADD GL_FUNC_ADD_OES
|
||||||
|
#define GLEXT_GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -96,6 +99,9 @@
|
|||||||
#define GLEXT_glClientActiveTexture glClientActiveTextureARB
|
#define GLEXT_glClientActiveTexture glClientActiveTextureARB
|
||||||
#define GLEXT_glActiveTexture glActiveTextureARB
|
#define GLEXT_glActiveTexture glActiveTextureARB
|
||||||
#define GLEXT_GL_TEXTURE0 GL_TEXTURE0_ARB
|
#define GLEXT_GL_TEXTURE0 GL_TEXTURE0_ARB
|
||||||
|
#define GLEXT_glBlendEquation glBlendEquation
|
||||||
|
#define GLEXT_GL_FUNC_ADD GL_FUNC_ADD
|
||||||
|
#define GLEXT_GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ namespace
|
|||||||
switch (blendEquation)
|
switch (blendEquation)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case sf::BlendMode::Add: return GL_FUNC_ADD;
|
case sf::BlendMode::Add: return GLEXT_GL_FUNC_ADD;
|
||||||
case sf::BlendMode::Subtract: return GL_FUNC_SUBTRACT;
|
case sf::BlendMode::Subtract: return GLEXT_GL_FUNC_SUBTRACT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -442,7 +442,7 @@ void RenderTarget::applyBlendMode(const BlendMode& mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glCheck(glBlendEquation(equationToGlConstant(mode.colorEquation)));
|
glCheck(GLEXT_glBlendEquation(equationToGlConstant(mode.colorEquation)));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_cache.lastBlendMode = mode;
|
m_cache.lastBlendMode = mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user