Cleaning for opengl rendering prep.
This commit is contained in:
parent
402f381d10
commit
7c6a92f4ec
58 changed files with 570 additions and 533 deletions
26
src/graphics/opengl/OpenGlPainter.cpp
Normal file
26
src/graphics/opengl/OpenGlPainter.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "OpenGlPainter.h"
|
||||
|
||||
#include "DrawingContext.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
void OpenGlPainter::paint(DrawingContext* context)
|
||||
{
|
||||
glClearColor(0.4, 0.4, 0.4, 0.4);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glColor3f(1.0, 1.0, 1.0);
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
glVertex3f(-0.7, 0.7, 0);
|
||||
glVertex3f(0.7, 0.7, 0);
|
||||
glVertex3f(0, -1, 0);
|
||||
glEnd();
|
||||
|
||||
glFlush();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue