Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ProjectiveTextureMapping
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WooHyungChoi
ProjectiveTextureMapping
Commits
ad1d77a5
Commit
ad1d77a5
authored
5 years ago
by
백상수
Browse files
Options
Downloads
Patches
Plain Diff
add 4 scene and modify camera operation
parent
e64cbce6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
LearnOpenGL/Source.cpp
+364
-42
364 additions, 42 deletions
LearnOpenGL/Source.cpp
with
364 additions
and
42 deletions
LearnOpenGL/Source.cpp
+
364
−
42
View file @
ad1d77a5
...
@@ -4,18 +4,27 @@
...
@@ -4,18 +4,27 @@
#include
"OpenGLWrapper.h"
#include
"OpenGLWrapper.h"
void
framebuffer_size_callback
(
GLFWwindow
*
window
,
int
width
,
int
height
);
void
framebuffer_size_callback
(
GLFWwindow
*
window
,
int
width
,
int
height
);
void
mouse_btn_callBack
(
GLFWwindow
*
window
,
int
btn
,
int
action
,
int
mods
);
void
mouse_callback
(
GLFWwindow
*
window
,
double
xpos
,
double
ypos
);
void
mouse_callback
(
GLFWwindow
*
window
,
double
xpos
,
double
ypos
);
void
scroll_callback
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
);
void
scroll_callback
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
);
void
processInput
(
GLFWwindow
*
window
);
void
processInput
(
GLFWwindow
*
window
);
void
Scene1
(
GLFWwindow
*
window
);
void
Scene2
(
GLFWwindow
*
window
);
void
Scene3
(
GLFWwindow
*
window
);
void
Scene4
(
GLFWwindow
*
window
);
// settings
// settings
const
unsigned
int
SCR_WIDTH
=
800
;
const
unsigned
int
SCR_WIDTH
=
1024
;
const
unsigned
int
SCR_HEIGHT
=
600
;
const
unsigned
int
SCR_HEIGHT
=
768
;
// camera
// camera
Camera
camera
(
glm
::
vec3
(
0.0
f
,
0.0
f
,
50.0
f
));
Camera
camera
(
glm
::
vec3
(
0.0
f
,
0.0
f
,
50.0
f
));
Camera
projector
(
glm
::
vec3
(
0.0
f
,
0.0
f
,
50.0
f
));
double
lastX
=
SCR_WIDTH
/
2.0
f
;
double
lastX
=
SCR_WIDTH
/
2.0
f
;
double
lastY
=
SCR_HEIGHT
/
2.0
f
;
double
lastY
=
SCR_HEIGHT
/
2.0
f
;
double
decalX
=
SCR_WIDTH
/
2.0
f
;
double
decalY
=
SCR_HEIGHT
/
2.0
f
;
bool
firstMouse
=
true
;
bool
firstMouse
=
true
;
// timing
// timing
...
@@ -27,6 +36,11 @@ glm::vec3 lightPos(1.2f, 20.0f, 2.0f);
...
@@ -27,6 +36,11 @@ glm::vec3 lightPos(1.2f, 20.0f, 2.0f);
int
main
()
int
main
()
{
{
int
scene_num
;
std
::
cout
<<
"1: teapot, 2: human, 3: humvee, 4: house"
<<
std
::
endl
;
std
::
cout
<<
"select scene (1-4): "
;
std
::
cin
>>
scene_num
;
glfwInit
();
glfwInit
();
glfwWindowHint
(
GLFW_CONTEXT_VERSION_MAJOR
,
3
);
glfwWindowHint
(
GLFW_CONTEXT_VERSION_MAJOR
,
3
);
glfwWindowHint
(
GLFW_CONTEXT_VERSION_MINOR
,
3
);
glfwWindowHint
(
GLFW_CONTEXT_VERSION_MINOR
,
3
);
...
@@ -52,6 +66,92 @@ int main()
...
@@ -52,6 +66,92 @@ int main()
glEnable
(
GL_DEPTH_TEST
);
glEnable
(
GL_DEPTH_TEST
);
if
(
scene_num
==
1
)
Scene1
(
window
);
if
(
scene_num
==
2
)
Scene2
(
window
);
if
(
scene_num
==
3
)
Scene3
(
window
);
if
(
scene_num
==
4
)
Scene4
(
window
);
glfwTerminate
();
return
0
;
}
// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
// ---------------------------------------------------------------------------------------------------------
void
processInput
(
GLFWwindow
*
window
)
{
if
(
glfwGetKey
(
window
,
GLFW_KEY_ESCAPE
)
==
GLFW_PRESS
)
glfwSetWindowShouldClose
(
window
,
true
);
if
(
glfwGetKey
(
window
,
GLFW_KEY_W
)
==
GLFW_PRESS
)
camera
.
ProcessKeyboard
(
FORWARD
,
deltaTime
);
if
(
glfwGetKey
(
window
,
GLFW_KEY_S
)
==
GLFW_PRESS
)
camera
.
ProcessKeyboard
(
BACKWARD
,
deltaTime
);
if
(
glfwGetKey
(
window
,
GLFW_KEY_A
)
==
GLFW_PRESS
)
camera
.
ProcessKeyboard
(
LEFT
,
deltaTime
);
if
(
glfwGetKey
(
window
,
GLFW_KEY_D
)
==
GLFW_PRESS
)
camera
.
ProcessKeyboard
(
RIGHT
,
deltaTime
);
}
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
// ---------------------------------------------------------------------------------------------
void
framebuffer_size_callback
(
GLFWwindow
*
window
,
int
width
,
int
height
)
{
// make sure the viewport matches the new window dimensions; note that width and
// height will be significantly larger than specified on retina displays.
glViewport
(
0
,
0
,
width
,
height
);
}
void
mouse_btn_callBack
(
GLFWwindow
*
window
,
int
btn
,
int
action
,
int
mods
)
{
if
(
btn
==
GLFW_MOUSE_BUTTON_1
&&
action
==
GLFW_PRESS
)
{
glfwGetCursorPos
(
window
,
&
lastX
,
&
lastY
);
}
if
(
btn
==
GLFW_MOUSE_BUTTON_2
&&
action
==
GLFW_PRESS
)
{
glfwGetCursorPos
(
window
,
&
decalX
,
&
decalX
);
}
}
void
mouse_callback
(
GLFWwindow
*
window
,
double
xpos
,
double
ypos
)
{
// left click and drag: move camera
if
(
glfwGetMouseButton
(
window
,
GLFW_MOUSE_BUTTON_1
))
{
int
width
,
height
;
glfwGetWindowSize
(
window
,
&
width
,
&
height
);
double
xoffset
=
((
xpos
-
lastX
)
/
(
height
)
*
180
);
double
yoffset
=
((
lastY
-
ypos
)
/
(
width
)
*
180
);
lastX
=
xpos
;
lastY
=
ypos
;
camera
.
ProcessMouseMovement
(
xoffset
,
yoffset
);
}
// right click and drag: move projector image
else
if
(
glfwGetMouseButton
(
window
,
GLFW_MOUSE_BUTTON_2
))
{
int
width
,
height
;
glfwGetWindowSize
(
window
,
&
width
,
&
height
);
double
xoffset
=
((
xpos
-
decalX
)
/
(
height
)
*
180
);
double
yoffset
=
((
decalY
-
ypos
)
/
(
width
)
*
180
);
decalX
=
xpos
;
decalY
=
ypos
;
projector
.
ProcessMouseMovement
(
xoffset
,
yoffset
);
}
}
void
scroll_callback
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
)
{
camera
.
ProcessMouseScroll
(
yoffset
);
}
void
Scene1
(
GLFWwindow
*
window
)
{
auto
cam_programID
=
build_program
(
"Camera"
);
auto
cam_programID
=
build_program
(
"Camera"
);
auto
lighting
=
build_program
(
"Lighting_Specular"
);
auto
lighting
=
build_program
(
"Lighting_Specular"
);
auto
lamp
=
build_program
(
"Lighting_Lamp"
);
auto
lamp
=
build_program
(
"Lighting_Lamp"
);
...
@@ -67,7 +167,7 @@ int main()
...
@@ -67,7 +167,7 @@ int main()
auto
white
=
load_texture
(
"white.png"
);
auto
white
=
load_texture
(
"white.png"
);
auto
transparent
=
load_texture
(
"transparent.png"
);
auto
transparent
=
load_texture
(
"transparent.png"
);
auto
wall
=
load_image
(
"
wall.jp
g"
,
ImageType
::
CLAMP
);
auto
wall
=
load_image
(
"
smileface.pn
g"
,
ImageType
::
CLAMP
);
auto
wall_tex
=
load_image
(
"wall.jpg"
,
ImageType
::
REPEAT
);
auto
wall_tex
=
load_image
(
"wall.jpg"
,
ImageType
::
REPEAT
);
auto
container_diffuse
=
load_texture
(
"container2.png"
);
auto
container_diffuse
=
load_texture
(
"container2.png"
);
auto
container_specular
=
load_texture
(
"container2_specular.png"
);
auto
container_specular
=
load_texture
(
"container2_specular.png"
);
...
@@ -153,66 +253,288 @@ int main()
...
@@ -153,66 +253,288 @@ int main()
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
{
{
teapot
->
projective_render
(
camera
);
teapot
->
projective_render
(
camera
,
projector
);
cube1
->
render
(
camera
);
cube1
->
render
(
camera
);
cube2
->
render
(
camera
);
cube2
->
render
(
camera
);
cube3
->
render
(
camera
);
cube3
->
render
(
camera
);
plane
->
projective_render
(
camera
);
plane
->
projective_render
(
camera
,
projector
);
cube4
->
render
(
camera
);
cube4
->
render
(
camera
);
}
}
glfwSwapBuffers
(
window
);
glfwSwapBuffers
(
window
);
glfwPollEvents
();
glfwPollEvents
();
}
}
}
glfwTerminate
();
void
Scene2
(
GLFWwindow
*
window
)
return
0
;
{
auto
cam_programID
=
build_program
(
"Camera"
);
auto
lightmap
=
build_program
(
"Lighting_Maps"
);
auto
projector_shader
=
build_program
(
"Projector"
);
auto
cube
=
make_mesh
(
"cube.obj"
);
auto
transparent
=
load_texture
(
"transparent.png"
);
auto
human_diffuse
=
load_texture
(
"Body_Colour.jpg"
);
auto
human_tattoo
=
load_image
(
"tattoo.png"
,
ImageType
::
CLAMP
);
//auto wall_diffuse = load_texture("store.png");
//auto wall_specular = load_texture("storeNM.png");
auto
floor_diffuse
=
load_texture
(
"concrete_light.jpg"
);
auto
cube_diffuse
=
load_texture
(
"container2.png"
);
auto
cube_specular
=
load_texture
(
"container2_specular.png"
);
auto
wall
=
load_image
(
"tattoo.png"
,
ImageType
::
CLAMP
);
auto
wall_tex
=
load_image
(
"store.png"
,
ImageType
::
REPEAT
);
auto
humanMaterial
=
new
Material
(
projector_shader
,
human_diffuse
,
human_tattoo
);
auto
wallMaterial
=
new
Material
(
projector_shader
,
wall_tex
,
wall
);
auto
floorMaterial
=
new
Material
(
lightmap
,
floor_diffuse
,
transparent
);
auto
cubeMaterial
=
new
Material
(
lightmap
,
cube_diffuse
,
cube_specular
);
auto
human
=
make_render_object
(
make_mesh
(
"human.obj"
));
{
auto
transform
=
human
->
get_transform
();
transform
->
set_scale
(
glm
::
vec3
(
12
,
12
,
12
));
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
15.2
f
,
-
30.0
f
));
}
{
human
->
set_material
(
humanMaterial
);
}
}
// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
auto
floor
=
make_render_object
(
cube
);
// ---------------------------------------------------------------------------------------------------------
void
processInput
(
GLFWwindow
*
window
)
{
{
if
(
glfwGetKey
(
window
,
GLFW_KEY_ESCAPE
)
==
GLFW_PRESS
)
auto
transform
=
floor
->
get_transform
();
glfwSetWindowShouldClose
(
window
,
true
);
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
20.0
f
,
-
40.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
50
,
30
,
0.5
));
}
{
floor
->
set_material
(
floorMaterial
);
}
if
(
glfwGetKey
(
window
,
GLFW_KEY_W
)
==
GLFW_PRESS
)
auto
wall_1
=
make_render_object
(
cube
);
camera
.
ProcessKeyboard
(
FORWARD
,
deltaTime
);
{
if
(
glfwGetKey
(
window
,
GLFW_KEY_S
)
==
GLFW_PRESS
)
auto
transform
=
wall_1
->
get_transform
();
camera
.
ProcessKeyboard
(
BACKWARD
,
deltaTime
);
transform
->
set_translate
(
glm
::
vec3
(
25.0
f
,
0.0
f
,
-
70.0
f
));
if
(
glfwGetKey
(
window
,
GLFW_KEY_A
)
==
GLFW_PRESS
)
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
camera
.
ProcessKeyboard
(
LEFT
,
deltaTime
);
transform
->
set_scale
(
glm
::
vec3
(
25
,
0.5
,
20
));
if
(
glfwGetKey
(
window
,
GLFW_KEY_D
)
==
GLFW_PRESS
)
camera
.
ProcessKeyboard
(
RIGHT
,
deltaTime
);
}
}
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
// ---------------------------------------------------------------------------------------------
void
framebuffer_size_callback
(
GLFWwindow
*
window
,
int
width
,
int
height
)
{
{
// make sure the viewport matches the new window dimensions; note that width and
wall_1
->
set_material
(
wallMaterial
);
// height will be significantly larger than specified on retina displays.
glViewport
(
0
,
0
,
width
,
height
);
}
}
void
mouse_callback
(
GLFWwindow
*
window
,
double
xpos
,
double
ypos
)
auto
wall_2
=
make_render_object
(
cube
);
{
{
if
(
firstMouse
)
auto
transform
=
wall_2
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
-
25.0
f
,
0.0
f
,
-
70.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
25
,
0.5
,
20
));
}
{
{
lastX
=
xpos
;
wall_2
->
set_material
(
wallMaterial
);
lastY
=
ypos
;
firstMouse
=
false
;
}
}
double
xoffset
=
xpos
-
lastX
;
auto
table_bot
=
make_render_object
(
cube
);
double
yoffset
=
lastY
-
ypos
;
// reversed since y-coordinates go from bottom to top
{
auto
transform
=
table_bot
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
0
,
-
17.5
,
-
30
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
-
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
5
,
5
,
2
));
}
{
table_bot
->
set_material
(
cubeMaterial
);
}
lastX
=
xpos
;
auto
table_top
=
make_render_object
(
cube
);
lastY
=
ypos
;
{
auto
transform
=
table_top
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
0
,
-
15.5
,
-
30
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
6
,
6
,
0.5
));
}
{
table_top
->
set_material
(
cubeMaterial
);
}
camera
.
ProcessMouseMovement
(
xoffset
,
yoffset
);
while
(
!
glfwWindowShouldClose
(
window
))
{
double
currentFrame
=
glfwGetTime
();
deltaTime
=
currentFrame
-
lastFrame
;
lastFrame
=
currentFrame
;
processInput
(
window
);
glClearColor
(
0.2
f
,
0.3
f
,
0.3
f
,
1.0
f
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
{
human
->
projective_render
(
camera
,
projector
);
floor
->
render
(
camera
);
wall_1
->
projective_render
(
camera
,
projector
);
wall_2
->
projective_render
(
camera
,
projector
);
table_bot
->
render
(
camera
);
table_top
->
render
(
camera
);
}
}
void
scroll_callback
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
)
glfwSwapBuffers
(
window
);
glfwPollEvents
();
}
}
void
Scene3
(
GLFWwindow
*
window
)
{
{
camera
.
ProcessMouseScroll
(
yoffset
);
auto
cam_programID
=
build_program
(
"Camera"
);
auto
lightmap
=
build_program
(
"Lighting_Maps"
);
auto
projector_shader
=
build_program
(
"Projector"
);
auto
cube
=
make_mesh
(
"cube.obj"
);
auto
transparent
=
load_texture
(
"transparent.png"
);
auto
humvee_diffuse
=
load_texture
(
"Tex_0023_1.png"
);
auto
humvee_specular
=
load_texture
(
"Tex_0025_1.png"
);
auto
floor_diffuse
=
load_texture
(
"concrete_light.jpg"
);
auto
wall_diffuse
=
load_texture
(
"foundation_brown_brick.jpg"
);
auto
wall_specular
=
load_texture
(
"foundation_brown_brick_spec.jpg"
);
auto
projImage
=
load_image
(
"bulletholes.png"
,
ImageType
::
CLAMP
);
auto
wall_tex
=
load_image
(
"foundation_brown_brick.jpg"
,
ImageType
::
REPEAT
);
auto
humveeMaterial
=
new
Material
(
projector_shader
,
humvee_diffuse
,
projImage
);
auto
floorMaterial
=
new
Material
(
lightmap
,
floor_diffuse
,
transparent
);
auto
wallMaterial
=
new
Material
(
projector_shader
,
wall_tex
,
projImage
);
auto
humvee
=
make_render_object
(
make_mesh
(
"humvee.obj"
));
{
auto
transform
=
humvee
->
get_transform
();
transform
->
set_scale
(
glm
::
vec3
(
0.1
,
0.1
,
0.1
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
90.0
f
));
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
19.0
f
,
-
35.0
f
));
humvee
->
set_material
(
humveeMaterial
);
}
auto
floor
=
make_render_object
(
cube
);
{
auto
transform
=
floor
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
20.0
f
,
-
40.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
50
,
30
,
0.5
));
}
{
floor
->
set_material
(
floorMaterial
);
}
auto
wall_1
=
make_render_object
(
cube
);
{
auto
transform
=
wall_1
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
25.0
f
,
0.0
f
,
-
70.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
25
,
0.5
,
20
));
}
{
wall_1
->
set_material
(
wallMaterial
);
}
auto
wall_2
=
make_render_object
(
cube
);
{
auto
transform
=
wall_2
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
-
25.0
f
,
0.0
f
,
-
70.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
25
,
0.5
,
20
));
}
{
wall_2
->
set_material
(
wallMaterial
);
}
while
(
!
glfwWindowShouldClose
(
window
))
{
double
currentFrame
=
glfwGetTime
();
deltaTime
=
currentFrame
-
lastFrame
;
lastFrame
=
currentFrame
;
processInput
(
window
);
glClearColor
(
0.2
f
,
0.3
f
,
0.3
f
,
1.0
f
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
{
humvee
->
projective_render
(
camera
,
projector
);
floor
->
render
(
camera
);
wall_1
->
projective_render
(
camera
,
projector
);
wall_2
->
projective_render
(
camera
,
projector
);
}
glfwSwapBuffers
(
window
);
glfwPollEvents
();
}
}
void
Scene4
(
GLFWwindow
*
window
)
{
auto
cam_programID
=
build_program
(
"Camera"
);
auto
lightmap
=
build_program
(
"Lighting_Maps"
);
auto
projector_shader
=
build_program
(
"Projector"
);
auto
cube
=
make_mesh
(
"cube.obj"
);
auto
transparent
=
load_texture
(
"transparent.png"
);
auto
building_diffuse
=
load_texture
(
"house.png"
);
auto
building_specular
=
load_texture
(
"house_specular.png"
);
auto
projImage
=
load_image
(
"graffiti.png"
,
ImageType
::
CLAMP
);
auto
floor_diffuse
=
load_image
(
"grass_ground.jpg"
,
ImageType
::
REPEAT
);
auto
buildingMaterial
=
new
Material
(
projector_shader
,
building_diffuse
,
projImage
);
auto
floorMaterial
=
new
Material
(
projector_shader
,
floor_diffuse
,
projImage
);
auto
building
=
make_render_object
(
make_mesh
(
"House.obj"
));
{
auto
transform
=
building
->
get_transform
();
transform
->
set_scale
(
glm
::
vec3
(
0.05
,
0.05
,
0.05
));
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
19.5
f
,
-
35.0
f
));
}
{
building
->
set_material
(
buildingMaterial
);
}
auto
floor
=
make_render_object
(
cube
);
{
auto
transform
=
floor
->
get_transform
();
transform
->
set_translate
(
glm
::
vec3
(
0.0
f
,
-
20.0
f
,
-
40.0
f
));
transform
->
set_rotate
(
glm
::
vec3
(
-
90.0
f
,
0.0
f
,
0.0
f
));
transform
->
set_scale
(
glm
::
vec3
(
50
,
30
,
0.5
));
}
{
floor
->
set_material
(
floorMaterial
);
}
while
(
!
glfwWindowShouldClose
(
window
))
{
double
currentFrame
=
glfwGetTime
();
deltaTime
=
currentFrame
-
lastFrame
;
lastFrame
=
currentFrame
;
processInput
(
window
);
glClearColor
(
0.2
f
,
0.3
f
,
0.3
f
,
1.0
f
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
{
building
->
projective_render
(
camera
,
projector
);
floor
->
projective_render
(
camera
,
projector
);
}
glfwSwapBuffers
(
window
);
glfwPollEvents
();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment