Hi, I'm new to SFML and OpenGL. I'm learning using the ArcSynthesis website, which uses modern OpenGL 3.3 in their tutorials and uses freeGlut instead of SFML for context.
Anyway, I'm having a problem trying to get SFML to work with the GLsdk. Specifically using the GLsdk's GLload class.
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <SFML/Window/Joystick.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Window.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <glload\gl_3_3.hpp>
#include <SFML/OpenGL.hpp>
#include <SFML/Graphics.hpp>
#include <gl/glut.h>
#include "framework.h"
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
The problem is when I use
#include <glload\gl_3_3.hpp> after
#include <SFML/OpenGL.hpp> (or
#include <SFML/Graphics.hpp>)I get a "Error 1 error C1189: #error : Attempt to include gle after including gl.h" error.
I googled a bit, and learned that order matters in the include statements, and it's usually safest to do
#include <glload\gl_3_3.hpp> first before any other OpenGL includes. So, I switched the order and put it before
#include <SFML/OpenGL.hpp> . After doing that though, now it seems my program doesn't recognize any calls to OpenGL. It gives me ~94 errors all of the form: "error C3861: 'glClear': identifier not found" or "identifier not detected"
What's weird though is
if I comment out#include <glload\gl_3_3.hpp>, the program works! And if I put it back in, the program forgets how to use OpenGL and gives me the "identifier not found" errors. I'd like to be able to use
<glload\gl_3_3.hpp> and SFML. I've been trying to figure it out for hours. :\
I'm working on a laptop (i7 processor) running Windows 7. The IDE's Visual Studio 2012. Radeon HD5730 1GB graphics card. Using SFML 2.0. .. Umm.. I'm not sure what other information you might need. Feel free to ask!
Any help is appreciated.