Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake-build-debug/
.idea
1 change: 0 additions & 1 deletion CGProject/.idea/.name

This file was deleted.

364 changes: 0 additions & 364 deletions CGProject/.idea/CGProject.iml

This file was deleted.

6 changes: 0 additions & 6 deletions CGProject/.idea/encodings.xml

This file was deleted.

14 changes: 0 additions & 14 deletions CGProject/.idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions CGProject/.idea/modules.xml

This file was deleted.

194 changes: 0 additions & 194 deletions CGProject/.idea/workspace.xml

This file was deleted.

27 changes: 20 additions & 7 deletions CGProject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
cmake_minimum_required(VERSION 3.3)
project(CGProject)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
## OpenGL
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(GLUT REQUIRED)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})

## default
set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")

set(SOURCE_FILES
main.cpp
mtl.cpp
mtl.hpp
obj.cpp
obj.hpp)
main.cpp
glm.cpp
Mtl.cpp
Mtl.h
Obj.cpp
Obj.h)

add_executable(CGProject ${SOURCE_FILES})

add_executable(CGProject ${SOURCE_FILES})
## add linked libraries
TARGET_LINK_LIBRARIES(CGProject ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
5 changes: 5 additions & 0 deletions CGProject/Mtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@
// C Headers
#include <stdio.h>
// OpenGL and GLM Headers
#ifndef __linux
#include <glut/glut.h>
#include <opengl/gl.h>
#else
#include <GL/glut.h>
#include <GL/gl.h>
#endif
//#include "glm.hpp"

using namespace std;
Expand Down
5 changes: 5 additions & 0 deletions CGProject/Mtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
// C Headers
#include <stdio.h>
// OpenGL and GLM Headers
#ifndef __linux
#include <glut/glut.h>
#include <opengl/gl.h>
#else
#include <GL/glut.h>
#include <GL/gl.h>
#endif
//#include "glm.hpp"

using namespace std;
Expand Down
5 changes: 5 additions & 0 deletions CGProject/Obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
// C Headers
#include <stdio.h>
// OpenGL and GLM Headers
#ifndef __linux
#include <glut/glut.h>
#include <opengl/gl.h>
#else
#include <GL/glut.h>
#include <GL/gl.h>
#endif
//#include "glm.hpp"

using namespace std;
Expand Down
5 changes: 5 additions & 0 deletions CGProject/Obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
// C Headers
#include <stdio.h>
// OpenGL and GLM Headers
#ifndef __linux
#include <glut/glut.h>
#include <opengl/gl.h>
#else
#include <GL/glut.h>
#include <GL/gl.h>
#endif
//#include "glm.hpp"

using namespace std;
Expand Down
5 changes: 4 additions & 1 deletion CGProject/glm.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@


/* includes */
#ifndef __linux
#include <opengl/gl.h>

#else
#include <GL/gl.h>
#endif

#ifndef M_PI
#define M_PI 3.14159265
Expand Down
Loading