Add cairo interface.
This commit is contained in:
parent
a03eb9599f
commit
9bcc0ae88e
63 changed files with 1247 additions and 450 deletions
20
src/graphics/opengl/OpenGlInterface.cpp
Normal file
20
src/graphics/opengl/OpenGlInterface.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "OpenGlInterface.h"
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
void OpenGlInterface::draw()
|
||||
{
|
||||
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