#define BASICTEX_VERT "shaders/basictex_vert.glsl"
#define BASICTEX_FRAG "shaders/basictex_frag.glsl"
using namespace IPDF;
using namespace std;
#define BASICTEX_VERT "shaders/basictex_vert.glsl"
#define BASICTEX_FRAG "shaders/basictex_frag.glsl"
using namespace IPDF;
using namespace std;
static void opengl_debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* msg, const void *data)
{
// Don't print out gl Errors we generated.
static void opengl_debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* msg, const void *data)
{
// Don't print out gl Errors we generated.
// Spams this message on fglrx, disabling for now because it's damn annoying.
// ERROR: opengl_debug_callback (screen.cpp:21) - OpenGL Error (1011): glObjectLabel failed because (depending on the operation) a referenced binding point is empty; a referenced name is not the name of an object; or the given name is otherwise not valid to this operation (GL_INVALID_VALUE)
}
// Spams this message on fglrx, disabling for now because it's damn annoying.
// ERROR: opengl_debug_callback (screen.cpp:21) - OpenGL Error (1011): glObjectLabel failed because (depending on the operation) a referenced binding point is empty; a referenced name is not the name of an object; or the given name is otherwise not valid to this operation (GL_INVALID_VALUE)
}
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
- Error("We require OpenGL 3.1, but you have version %d.%d!",ogl_GetMajorVersion(), ogl_GetMinorVersion());
+ Error("We require OpenGL 3.3, but you have version %d.%d!",ogl_GetMajorVersion(), ogl_GetMinorVersion());
glGenQueries(1, &m_frame_gpu_timer);
glBeginQuery(GL_TIME_ELAPSED, m_frame_gpu_timer);
glGenQueries(1, &m_frame_gpu_timer);
glBeginQuery(GL_TIME_ELAPSED, m_frame_gpu_timer);
m_last_frame_time = SDL_GetPerformanceCounter() - m_frame_begin_time;
glEndQuery(GL_TIME_ELAPSED);
SDL_GL_SwapWindow(m_window);
m_last_frame_time = SDL_GetPerformanceCounter() - m_frame_begin_time;
glEndQuery(GL_TIME_ELAPSED);
SDL_GL_SwapWindow(m_window);
m_last_frame_gpu_timer = m_frame_gpu_timer;
glGenQueries(1, &m_frame_gpu_timer);
glBeginQuery(GL_TIME_ELAPSED, m_frame_gpu_timer);
m_last_frame_gpu_timer = m_frame_gpu_timer;
glGenQueries(1, &m_frame_gpu_timer);
glBeginQuery(GL_TIME_ELAPSED, m_frame_gpu_timer);