Initial commit.
This commit is contained in:
commit
59c6161fdb
134 changed files with 4751 additions and 0 deletions
5
src/graphics/CMakeLists.txt
Normal file
5
src/graphics/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
list(APPEND graphics_LIB_INCLUDES OpenGlInterface)
|
||||
|
||||
add_library(graphics SHARED ${graphics_LIB_INCLUDES})
|
||||
|
||||
target_link_libraries(graphics PUBLIC GL)
|
20
src/graphics/OpenGlInterface.cpp
Normal file
20
src/graphics/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();
|
||||
}
|
10
src/graphics/OpenGlInterface.h
Normal file
10
src/graphics/OpenGlInterface.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
class OpenGlInterface
|
||||
{
|
||||
public:
|
||||
|
||||
static void draw();
|
||||
};
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue