Skip to content

Commit ec11a28

Browse files
committed
S12 - Texture
1 parent 97df9b5 commit ec11a28

26 files changed

+2688
-0
lines changed

esempi/serie12/.idea/serie12.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/$CACHE_FILE$

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/deployment.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/dictionaries

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/s11_casa.iml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

s12_casa/CMakeLists.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
project(s12_casa)
2+
3+
cmake_minimum_required(VERSION 3.10)
4+
set(CMAKE_CXX_STANDARD 14)
5+
6+
if(APPLE)
7+
message(INFO ": PLATFORM APPLE")
8+
include_directories("/usr/local/include")
9+
find_package(OpenGL REQUIRED)
10+
include_directories(${OpenGL_INCLUDE_DIRS})
11+
link_directories(${OpenGL_LIBRARY_DIRS})
12+
add_definitions(${OpenGL_DEFINITIONS})
13+
if(NOT OPENGL_FOUND)
14+
message(ERROR " OPENGL not found!")
15+
endif(NOT OPENGL_FOUND)
16+
17+
find_package(GLUT REQUIRED)
18+
include_directories(${GLUT_INCLUDE_DIRS})
19+
link_directories(${GLUT_LIBRARY_DIRS})
20+
add_definitions(${GLUT_DEFINITIONS})
21+
if(NOT GLUT_FOUND)
22+
message(ERROR " GLUT not found!")
23+
endif(NOT GLUT_FOUND)
24+
#endif(APPLE)
25+
#if(UNIX)
26+
# message(INFO ": PLATFORM LINUX")
27+
#
28+
# set(OPENGL_LIBRARY -lGL)
29+
# set(GLUT_LIBRARY -lglut -lGLU)
30+
else()
31+
message(INFO ": PLATFORM WINDOWS")
32+
33+
set(CMAKE_PREFIX_PATH "C:/SUPSI/freeglut")
34+
include_directories("C:/SUPSI/freeglut/include")
35+
include_directories("C:/SUPSI/glew-2.1.0/include")
36+
37+
link_directories("C:/SUPSI/freeglut/lib/x64")
38+
link_directories("C:/SUPSI/glew-2.1.0/lib/release/x64")
39+
40+
set(OPENGL_LIBRARY -lopengl32)
41+
set(GLUT_LIBRARY -lfreeGLUT -lglu32)
42+
set(GLEW_LIBRARIES -lglew32)
43+
44+
endif()
45+
set(REQUIRED_LIBS ${GLUT_LIBRARY} ${GLEW_LIBRARIES} ${OPENGL_LIBRARY})
46+
47+
add_executable(${PROJECT_NAME} RgbImage.cpp light.cpp vertex.cpp camera.cpp draw_utils.cpp house.cpp main.cpp )
48+
target_link_libraries(${PROJECT_NAME} ${REQUIRED_LIBS})
49+
FILE(COPY wall_texture.bmp DESTINATION "${CMAKE_BINARY_DIR}")

s12_casa/README.txt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Autore: Massimo De Santi
2+
Corso: M-I5070P - Grafica PAP 2020
3+
Ambiente:
4+
- Windows 10
5+
- CLion 2019.3.4
6+
- MinGW 64 (x86_64-8.1.0-posix-seh-rt_v6-rev0)
7+
----------------------------------------------
8+
ATTENZIONE: Nel file CMakeLists.txt è definito il percorso di freeglut e glew
9+
Nel mio caso C:/SUPSI/freeglut e C:/SUPSI/glew-2.1.0
10+
Modificare il percorso per puntare al path corretto
11+
12+
Pacchetto:
13+
- src\camera.h
14+
- src\camera.cpp
15+
- src\draw_utils.h
16+
- src\draw_utils.cpp
17+
- src\house.h
18+
- src\house.cpp
19+
- src\light.h
20+
- src\light.cpp
21+
- src\main.h
22+
- src\main.cpp
23+
- src\RgbImage.h
24+
- src\RgbImage.cpp
25+
- src\vertex.h
26+
- src\vertex.cpp
27+
28+
- bin\s11_casa.exe
29+
30+
Funzioni:
31+
32+
*** NEW ***
33+
- Export as bmp (Right Click menu) salva framebuffer in "capture.bmp"
34+
35+
*** OLD ***
36+
- Toggle Clipping Plane (Right Click menu)
37+
- Ligh1 Relative Pos (Right Click menu)
38+
- Ligh1/2 Relative Pos (Right Click menu)
39+
- Ligh1/2 Absolute Pos (Right Click menu)
40+
41+
- Show/Hide Axes (x,X keys / Right Click menu)
42+
- Show/Hide Wireframe (w,W keys / Right Click menu)
43+
- Change Color (c,C / Right Click menu)
44+
- Reset (F12 / Right Click menu)
45+
46+
- House Translate X axis (F1/F2 keys)
47+
- House Translate Y axis (F3/F4 keys)
48+
- House Translate Z axis (F5/F6 keys)
49+
50+
- Auto Rotate House (r,R key / Right Click menu)
51+
- Stop Rotate House (s,S key / Right Click menu)
52+
- Open/Close Door (d,D key / Right Click menu)
53+
54+
- Automatic Draw flag animation
55+
- Show/Hide Wind (Right Click menu)
56+
57+
- Orthographic projection (a,A key / Right Click menu)
58+
- Perspective projection (p,P key / Right Click menu)
59+
60+
- Camera (arrows, PG UP, PG DOWN)
61+
- Check House in Viewing Volume (blocca traslazione o movimento camera se fuori da confini del volume)

0 commit comments

Comments
 (0)