Пытаюсь сделать окно на SDL и оставить только core profile - скачал замену gl3.h. При попытке собрать ругается, что glClear и glClearColor not declared in this scope. Библиотеки прописаны через qmake:
INCLUDEPATH += -I/usr/local/include/SDL2 -D_REENTRANT
LIBS += -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL2 -lpthread -lGL
#include <iostream>
#include <SDL2/SDL.h>
#include "glcorearb.h"
using namespace std;
int main()
{
SDL_Window *mainwindow;
SDL_GLContext maincontext;
if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
cout << SDL_GetError() << endl;
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 32);
mainwindow = SDL_CreateWindow("tutorial1", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 512, 512, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
if (!mainwindow)
cout << SDL_GetError() << endl;
maincontext = SDL_GL_CreateContext(mainwindow);
SDL_GL_SetSwapInterval(1);
glClearColor ( 1.0, 0.0, 0.0, 1.0 );
glClear ( GL_COLOR_BUFFER_BIT );
SDL_GL_SwapWindow(mainwindow);
SDL_Delay(2000);
SDL_GL_DeleteContext(maincontext);
SDL_DestroyWindow(mainwindow);
SDL_Quit();
return 0;
}