30 lines
571 B
C++
30 lines
571 B
C++
#include <iostream>
|
|
#include <opengl-playground/sdlmainwindow.hpp>
|
|
#include <epoxy/gl.h>
|
|
|
|
#define WINDOW_WIDTH 800
|
|
#define WINDOW_HEIGHT 640
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
(void)argc;
|
|
(void)argv;
|
|
MainWindow *window;
|
|
|
|
window = new SdlMainWindow(WINDOW_WIDTH, WINDOW_HEIGHT);
|
|
|
|
window->show();
|
|
window->activateGlContext();
|
|
|
|
/* Clear the image and set the background to a nice gray */
|
|
glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
|
|
glClearColor(0.1f, 0.1f, 0.1f, 0.f);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
|
window->swapBuffer();
|
|
|
|
SDL_Delay(5000);
|
|
|
|
delete window;
|
|
}
|