mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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_glActiveTexture glActiveTexture
|
||||
#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
|
||||
|
||||
@ -96,6 +99,9 @@
|
||||
#define GLEXT_glClientActiveTexture glClientActiveTextureARB
|
||||
#define GLEXT_glActiveTexture glActiveTextureARB
|
||||
#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
|
||||
|
||||
|
@ -63,8 +63,8 @@ namespace
|
||||
switch (blendEquation)
|
||||
{
|
||||
default:
|
||||
case sf::BlendMode::Add: return GL_FUNC_ADD;
|
||||
case sf::BlendMode::Subtract: return GL_FUNC_SUBTRACT;
|
||||
case sf::BlendMode::Add: return GLEXT_GL_FUNC_ADD;
|
||||
case sf::BlendMode::Subtract: return GLEXT_GL_FUNC_SUBTRACT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -442,7 +442,7 @@ void RenderTarget::applyBlendMode(const BlendMode& mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
glCheck(glBlendEquation(equationToGlConstant(mode.colorEquation)));
|
||||
glCheck(GLEXT_glBlendEquation(equationToGlConstant(mode.colorEquation)));
|
||||
}
|
||||
|
||||
m_cache.lastBlendMode = mode;
|
||||
|
Loading…
Reference in New Issue
Block a user