Hello,
Was just writing a small test of rendering with VertexBuffers, but using rendering from a separate thread. It's an environment that mirrors a larger project that I intend to upgrade to SFML 2.5.0. But whilst working on this test I found that just having called the .setActive() function on the RenderWindow class returns me an error saying:
An internal OpenGL call failed in RenderTextureImplFBO.cpp(192).
Expression:
GLEXT_glBindFramebuffer(GLEXT_GL_FRAMEBUFFER, 0)
Error description:
GL_INVALID_OPERATION
The specified operation is not allowed in the current state.
A minimal code example that reproduces the same effect:
#include <iostream>
#include <SFML\Graphics.hpp>
using namespace std;
using namespace sf;
int main(void)
{
RenderWindow rWindow(VideoMode(640, 480), "Hello", Style::Close);
rWindow.setFramerateLimit(60);
rWindow.setActive(false);
rWindow.setActive(true);
while (rWindow.isOpen())
{
Event evnt;
while (rWindow.pollEvent(evnt))
{
if (evnt.type == Event::Closed)
{
rWindow.close();
}
}
}
return 0;
}
The function .setActive() does return true, indicating there was no error. But I was just wondering the error in console was significant?
I'm currently developing with Visual Studio 2017, with the 32-bit release of 2.5.0 for VS2017. I'm working on a Windows 10 x64 machine.