I'd like to submit here some patches I had to put in sfml in order to build ogre with sfml on android ios macos linux and windows with gl3plus renderer and gles2 renderer and mingw64 compiler. Some patches allow the creation of a es2.0 / 3.0 context.. not sure those are useful tho since sfml is working with gles 1.0 only.. anyway here they are (those patches should not broke actual build)
SFML/Window/EglContext.cpp: line 197.
//const EGLint contextVersion[] = {
// EGL_CONTEXT_CLIENT_VERSION, 1,
// EGL_NONE
//};
//
//EGLContext toShared;
//
//if (shared)
// toShared = shared->m_context;
//else
// toShared = EGL_NO_CONTEXT;
EGLint renderable;
EGLint client_version;
eglGetConfigAttrib(m_display,m_config,EGL_RENDERABLE_TYPE,&renderable);
if(renderable == EGL_OPENGL_ES_BIT)
{
client_version = 1;
}
else if(renderable == EGL_OPENGL_ES2_BIT)
{
client_version = 2;
}
const EGLint contextVersion[] = {
EGL_CONTEXT_CLIENT_VERSION, client_version,
EGL_NONE
};
EGLContext toShared;
if (shared && (client_version != 2))
toShared = shared->m_context;
else
toShared = EGL_NO_CONTEXT;
SFML/Window/EglContext.cpp: line 260.
// Set our video settings constraint
//const EGLint attributes[] = {
// EGL_BUFFER_SIZE, bitsPerPixel,
// EGL_DEPTH_SIZE, settings.depthBits,
// EGL_STENCIL_SIZE, settings.stencilBits,
// EGL_SAMPLE_BUFFERS, settings.antialiasingLevel,
// EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
// EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
// EGL_NONE
//};
EGLint renderable;
if(settings.majorVersion == 1)
{
renderable = EGL_OPENGL_ES_BIT;
}
else if(settings.majorVersion == 2)
{
renderable = EGL_OPENGL_ES2_BIT;
}
const EGLint attributes[] = {
EGL_BUFFER_SIZE, bitsPerPixel,
EGL_DEPTH_SIZE, settings.depthBits,
EGL_STENCIL_SIZE, settings.stencilBits,
EGL_SAMPLE_BUFFERS, ((settings.antialiasingLevel > 0) ? 1 : 0),
EGL_SAMPLES, settings.antialiasingLevel,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
EGL_RENDERABLE_TYPE, renderable,
EGL_NONE
};
SFML/Window/Android/WindowImplAndroid.cpp: line 520.
//case AKEYCODE_DEL : return Keyboard::Delete;
case AKEYCODE_DEL : return Keyboard::BackSpace;
SFML/Window/Android/WindowImplAndroid.cpp: line 614.
if(action == AKEY_EVENT_ACTION_UP)
{
unicode = 0;
}
SFML/Window/iOS/SFAppDelegate.mm: line 269.
if(character == '\b')
{
sf::Event event;
event.type = sf::Event::KeyPressed;
event.key.code = sf::Keyboard::BackSpace;
event.key.alt = false;
event.key.control = false;
event.key.shift = false;
sfWindow->pushEvent(event);
}
else if(character == '\n')
{
sf::Event event;
event.type = sf::Event::KeyPressed;
event.key.code = sf::Keyboard::Return;
event.key.alt = false;
event.key.control = false;
event.key.shift = false;
sfWindow->pushEvent(event);
}
SFML/Window/iOS/SFView.mm: line 104.
//sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
sf::Vector2i position(static_cast<int>(point.x * self.contentScaleFactor), static_cast<int>(point.y * self.contentScaleFactor));
SFML/Window/iOS/SFView.mm: line 124.
//sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
sf::Vector2i position(static_cast<int>(point.x * self.contentScaleFactor), static_cast<int>(point.y * self.contentScaleFactor));
SFML/Window/iOS/SFView.mm: line 145.
//sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
sf::Vector2i position(static_cast<int>(point.x * self.contentScaleFactor), static_cast<int>(point.y * self.contentScaleFactor));
SFML/Window/Win32/JoystickImpl.cpp: line 235.
//ss.str(_T(""));
ss.str(sf::String(""));
SFML/Window/Win32/JoystickImpl.cpp: line 250.
//ss.str(_T(""));
ss.str(sf::String(""));