OK it turns out it's not actually my code, initially when Laurent suggested me to write a minimal app I did, but it was simply displaying a basic window with a title, nothing else, when I tried getting a sprite on the screen, it also worked, but when closing the program I got the OpenGL errors again. I don't think it's my code, all I have right now is 1 file: main.cpp, this is my code:
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
using namespace std;
int main()
{
sf::RenderWindow winMain(sf::VideoMode(500, 500, 32), "My window.");
sf::Event ev1;
sf::Texture text;
text.loadFromFile("resources\\textlogo.png");
sf::Sprite spr(text);
spr.setPosition(100, 100);
while(winMain.isOpen())
{
while(winMain.pollEvent(ev1))
{
if(ev1.type == sf::Event::Closed) winMain.close();
}
winMain.clear();
winMain.draw(spr);
winMain.display();
}
}
Any other ideas? The code above
does work, it does display a sprite on the screen but it shows 1 error of the OpenGL type for each sprite that I try to draw, and this happens when I close the program, unlike my previous game where all the openGL errors would happen when I was
starting the program. Very odd, I truly have no idea how to fix this
EDIT:I just made a check to see what my current OpenGL driver is, running this code:
sf::RenderWindow window(sf::VideoMode(500, 500, 32), "something");
sf::ContextSettings settings = window.getSettings();
std::cout << settings.majorVersion << "." << settings.minorVersion << std::endl;
The output is: 3.3