Fix hello_world
This commit is contained in:
parent
4c8461f62a
commit
ec4663e293
3 changed files with 6 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
# Verzeichnisse
|
# Verzeichnisse
|
||||||
Mitschriften/
|
Mitschriften/
|
||||||
build
|
build
|
||||||
|
build-*
|
||||||
|
|
||||||
# Dateien
|
# Dateien
|
||||||
*_Mitschrift.tex
|
*_Mitschrift.tex
|
||||||
|
@ -229,7 +230,7 @@ cmake_install.cmake
|
||||||
install_manifest.txt
|
install_manifest.txt
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
CMakeLists.txt.user
|
CMakeLists.txt.user*
|
||||||
|
|
||||||
# C++
|
# C++
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required (VERSION 3.8)
|
cmake_minimum_required (VERSION 3.8)
|
||||||
|
|
||||||
if ( CMAKE_COMPILER_IS_GNUCC )
|
if (CMAKE_COMPILER_IS_GNU)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
|
@ -17,15 +17,14 @@ void init(int argc, char** argv)
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
gluOrtho2D(0, width, 0, height);
|
gluOrtho2D(0, width, 0, height);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void display(void)
|
void display(void)
|
||||||
{
|
{
|
||||||
const char* myText = "Hello World!";
|
char* myText = "Hello World!";
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
glClear(GL_COLOR);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
glColor3f(1.0, 0.0, 0.0);
|
glColor3f(1.0, 0.0, 0.0);
|
||||||
|
|
||||||
glBegin(GL_POLYGON);
|
glBegin(GL_POLYGON);
|
||||||
|
|
Loading…
Reference in a new issue