Rozwiazanie konfliktow

This commit is contained in:
Artur Ziętkiewicz 2023-02-11 15:05:18 +01:00
commit 4d3b1f67e4
27 changed files with 373 additions and 40 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\sjule\source\repos\GRK_Project\Debug\grk-cw9.exe</FullPath>
<FullPath>C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\Debug\grk-cw9.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />

View File

@ -1,63 +1,121 @@
 main.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
C:\Users\sjule\source\repos\GRK_Project\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123,1): message : see previous definition of 'APIENTRY'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(87,16): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(88,14): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(90,17): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(91,15): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(100,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(101,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(111,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\Collision_System.cpp(115,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(281,30): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(295,17): warning C4101: 'data': unreferenced local variable
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(320,38): warning C4305: '=': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(349,16): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(537,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(545,73): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(545,66): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(560,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(574,98): warning C4305: 'argument': truncation from 'double' to 'T'
 Render_Utils.cpp
TriangleSoup.cpp
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(284,10): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(285,10): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(288,15): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(289,15): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(412,12): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(421,3): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(445,3): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(448,14): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(462,14): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(474,14): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\TriangleSoup.cpp(487,14): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
main.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(87,16): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(88,14): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(90,17): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(91,15): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(100,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(101,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(111,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(115,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(297,30): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(314,17): warning C4101: 'data': unreferenced local variable
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(339,38): warning C4305: '=': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(368,16): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(573,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(581,73): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(581,66): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(596,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(610,98): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(577,68): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(613,68): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(609,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(623,99): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(645,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(659,99): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(626,69): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(662,69): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(718,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(727,108): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(754,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(755,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(756,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(759,31): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(760,25): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(816,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(817,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(818,8): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(821,31): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(822,25): warning C4305: 'initializing': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(928,13): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(937,108): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(735,87): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(945,87): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(735,223): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(756,2): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(854,108): warning C4305: 'argument': truncation from 'double' to 'T'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(945,223): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(966,2): warning C4305: 'argument': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(1066,108): warning C4305: 'argument': truncation from 'double' to 'T'
with
[
T=float
]
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(1118,21): warning C4305: '-=': truncation from 'double' to 'float'
C:\Users\sjule\source\repos\GRK_Project\cw 9\src\ex_9_1.hpp(1120,21): warning C4305: '+=': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(1345,66): warning C4244: '=': conversion from 'double' to 'T', possible loss of data
with
[
T=float
]
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(1362,21): warning C4305: '-=': truncation from 'double' to 'float'
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(1364,21): warning C4305: '+=': truncation from 'double' to 'float'
Generating Code...
SOIL.c
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\SOIL.c(1719,36): warning C4018: '<=': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\SOIL.c(1729,19): warning C4018: '<': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\SOIL.c(1841,6): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
image_DXT.c
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_DXT.c(92,9): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
image_helper.c
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_helper.c(325,1): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_helper.c(366,58): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_helper.c(373,46): warning C4244: '=': conversion from 'float' to 'int', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_helper.c(415,58): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\image_helper.c(422,62): warning C4244: '=': conversion from 'float' to 'int', possible loss of data
stb_image_aug.c
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(177,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(251,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(303,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(1557,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(2394,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(2709,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(2995,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(3209,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(3548,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stb_image_aug.c(3644,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stbi_DDS_aug_c.h(362,19): warning C4018: '>': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stbi_DDS_aug_c.h(366,19): warning C4018: '>': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stbi_DDS_aug_c.h(390,19): warning C4018: '<': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stbi_DDS_aug_c.h(427,19): warning C4018: '<': signed/unsigned mismatch
C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\SOIL\stbi_DDS_aug_c.h(498,14): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
Generating Code...
Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
grk-cw9.vcxproj -> C:\Users\sjule\source\repos\GRK_Project\Debug\grk-cw9.exe
grk-cw9.vcxproj -> C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\Debug\grk-cw9.exe

View File

@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.34.31933:TargetPlatformVersion=10.0.22621.0:
Debug|Win32|C:\Users\sjule\source\repos\GRK_Project\|
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30037:TargetPlatformVersion=10.0.19041.0:
Debug|Win32|C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -73,7 +73,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>

View File

@ -154,5 +154,7 @@
<None Include="shaders\shader_tex_pbr_arm.vert">
<Filter>Shader Files</Filter>
</None>
<None Include="shaders\shader_bubble.frag" />
<None Include="shaders\shader_bubble.vert" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,13 @@
#version 410 core
uniform vec3 objectColor;
uniform vec3 lightDir;
in vec3 interpNormal;
void main()
{
vec3 normal = normalize(interpNormal);
float diffuse = 0.4;
gl_FragColor = vec4(objectColor * diffuse, 1.0);
}

View File

@ -0,0 +1,16 @@
#version 410 core
layout(location = 0) in vec3 vertexPosition;
layout(location = 1) in vec3 vertexNormal;
layout(location = 2) in vec2 vertexTexCoord;
uniform mat4 modelViewProjectionMatrix;
uniform mat4 modelMatrix;
out vec3 interpNormal;
void main()
{
gl_Position = modelViewProjectionMatrix * vec4(vertexPosition, 1.0);
interpNormal = (modelMatrix * vec4(vertexNormal, 0.0)).xyz;
}

View File

@ -241,17 +241,33 @@ GLuint programDepth;
GLuint programSkybox;
GLuint programWater;
GLuint skyboxTexture;
GLuint bubbleTexture0, bubbleTexture1;
GLuint programBubble;
GLuint bubblesColor;
GLuint bubbleTexture;
Core::RenderContext bubbleContext;
Core::Shader_Loader shaderLoader;
Core::RenderContext waterContext;
Core::RenderContext shipContext;
Core::RenderContext sphereContext;
TriangleSoup water;
glm::vec3 sunPos = glm::vec3(-4.740971f, 2.149999f, -0.069280f);
CONST int bubbleQuantity = 2000;
glm::vec3 bubbleLocation[bubbleQuantity];
glm::vec3 bubbleOriginalLocation[bubbleQuantity];
bool bubbleZdir[bubbleQuantity];
bool bubbleXdir[bubbleQuantity];
CONST int bubblenumber = 1;
glm::vec3 bubbleLocationInRoom[bubblenumber];
glm::vec3 bubbleOriginalLocationInRoom[bubblenumber];
bool bubbleZdirInRoom[bubblenumber];
bool bubbleXdirInRoom[bubblenumber];
glm::vec3 sunPos = glm::vec3(-4.740971f, 2.149999f, 0.369280f);
glm::vec3 sunDir = glm::vec3(-0.93633f, 0.351106, 0.003226f);
glm::vec3 sunPos2 = glm::vec3(4.040971f, 2.149999f, -0.739280f);
glm::vec3 sunDir2 = glm::vec3(0.93633f, 0.351106, -0.003226f);
@ -285,6 +301,9 @@ glm::vec3 lightPos = glm::vec3(-8, 4, 2);
float lastTime = -1.f;
float deltaTime = 0.f;
void bubbleManager();
void bubbleManagerInRoom();
unsigned int loadSkybox(std::vector<std::string> faces1)
{
unsigned int textureID;
@ -532,6 +551,23 @@ void drawObjectDepth(Core::RenderContext context, glm::mat4 viewProjectionMatrix
glUniformMatrix4fv(glGetUniformLocation(programDepth, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
Core::DrawContext(context);
}
void drawBubbleColor(Core::RenderContext context, glm::mat4 modelMatrix, glm::vec3 color)
{
GLuint program = bubblesColor;
glUseProgram(program);
glUniform3f(glGetUniformLocation(program, "objectColor"), color.x, color.y, color.z);
glUniform3f(glGetUniformLocation(program, "lightDir"), sunDir.x, sunDir.y, sunDir.z);
glm::mat4 transformation = createPerspectiveMatrix() * createCameraMatrix() * modelMatrix;
glUniformMatrix4fv(glGetUniformLocation(program, "modelViewProjectionMatrix"), 1, GL_FALSE, (float*)&transformation);
glUniformMatrix4fv(glGetUniformLocation(program, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix);
Core::DrawContext(context);
glUseProgram(0);
}
void drawBubble(glm::mat4 transformSphere) {
float time = glfwGetTime();
@ -650,6 +686,7 @@ void renderShadowapSun2() {
drawObjectDepth(models::books1Context, lightVP2, glm::mat4());
drawObjectDepth(models::books2Context, lightVP2, glm::mat4());
drawObjectDepth(models::cactusContext, lightVP2, glm::mat4());
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, WIDTH, HEIGHT);
}
@ -710,6 +747,179 @@ void drawObjectColorWater(Core::RenderContext& context, glm::mat4 modelMatrix, g
water.render();
}
void bubbleMovement(int i) {
float bubbleWobblingDivider = 100;
int x = floor(bubbleLocation[i].x);
int y = floor(bubbleLocation[i].y);
int z = floor(bubbleLocation[i].z);
float bubbleWobbling = 0.0005;
float bubbleDown = 0.05;
//printf(xDir ? "true\n" : "false\n");
//printf(zDir ? "true\n" : "false\n");
if (bubbleLocation[i].x >= bubbleOriginalLocation[i].x + bubbleWobbling * bubbleWobblingDivider) {
bubbleXdir[i] = false;
//printf("herex1\n");
}
else if (bubbleLocation[i].x < bubbleOriginalLocation[i].x - bubbleWobbling * bubbleWobblingDivider) {
bubbleXdir[i] = true;
//printf("herex2\n");
}
if (bubbleLocation[i].z >= bubbleOriginalLocation[i].z + bubbleWobbling * bubbleWobblingDivider) {
bubbleZdir[i] = false;
}
else if (bubbleLocation[i].z < bubbleOriginalLocation[i].z - bubbleWobbling * bubbleWobblingDivider) {
bubbleZdir[i] = true;
}
bubbleZdir[i] = false;
bubbleXdir[i] = false;
if (bubbleXdir[i]) {
bubbleLocation[i].x += bubbleWobbling;
}
else {
bubbleLocation[i].x -= bubbleWobbling;
}
if (bubbleZdir[i]) {
bubbleLocation[i].z += bubbleWobbling;
}
else {
bubbleLocation[i].z -= bubbleWobbling;
}
if (y <= -10.0 ) {
bubbleLocation[i].y = 10.0;
}
if (x <= (-1.0 + 2.9) && x > (-1.0 - 2.9) && z <= (-1.2 + 3.2) && z > (-1.2 - 3.2) && y <= (1.0 + 2.36) ) {
bubbleLocation[i].y = 10.0;
}
bubbleLocation[i].y -= bubbleDown;
}
void bubbleMovementInRoom(int i) {
float bubbleWobblingDivider = 100;
int x = floor(bubbleLocationInRoom[i].x);
int y = floor(bubbleLocationInRoom[i].y);
int z = floor(bubbleLocationInRoom[i].z);
float bubbleWobbling = 0.0005;
float bubbleDown = 0.05;
//printf(xDir ? "true\n" : "false\n");
//printf(zDir ? "true\n" : "false\n");
if (bubbleLocationInRoom[i].x >= bubbleOriginalLocationInRoom[i].x + bubbleWobbling * bubbleWobblingDivider) {
bubbleXdirInRoom[i] = false;
//printf("herex1\n");
}
else if (bubbleLocationInRoom[i].x < bubbleOriginalLocationInRoom[i].x - bubbleWobbling * bubbleWobblingDivider) {
bubbleXdirInRoom[i] = true;
//printf("herex2\n");
}
if (bubbleLocationInRoom[i].z >= bubbleOriginalLocationInRoom[i].z + bubbleWobbling * bubbleWobblingDivider) {
bubbleZdirInRoom[i] = false;
}
else if (bubbleLocationInRoom[i].z < bubbleOriginalLocationInRoom[i].z - bubbleWobbling * bubbleWobblingDivider) {
bubbleZdir[i] = true;
}
bubbleZdirInRoom[i] = false;
bubbleXdirInRoom[i] = false;
if (bubbleXdirInRoom[i]) {
bubbleLocation[i].x += bubbleWobbling;
}
else {
bubbleLocationInRoom[i].x -= bubbleWobbling;
}
if (bubbleZdirInRoom[i]) {
bubbleLocation[i].z += bubbleWobbling;
}
else {
bubbleLocationInRoom[i].z -= bubbleWobbling;
}
//if (y <= -10.0) {
// bubbleLocationInRoom[i].y = 10.0;
//}
//if (x > (-1.0 + 0.5) && x <= (-1.0 - 0.5) && z > (-1.2 + 0.5) && z <= (-1.2 - 0.5) && y > (1.0 + 2.36)) {
//bubbleLocationInRoom[i].y = 4.0;
//}
if (x <= (-1.0 + 2.9) && x > (-1.0 - 2.9) && z <= (-1.2 + 3.2) && z > (-1.2 - 3.2) && y <= (1.0 + 2.36)) {
if (x > (0 + 0.01) || x <= (0 - 0.01) || z > (0 + 0.01) || z <= (0 - 0.01) || y > 2 || y <= 0)
{
bubbleLocationInRoom[i].y = 3;
}
}
bubbleLocationInRoom[i].y -= bubbleDown;
}
void bubbleManager() {
for (int i = 0; i < bubbleQuantity; i++)
{
bubbleMovement(i);
glm::mat4 modelMatrix = glm::translate(bubbleLocation[i]);
// Scaling models
glm::vec3 scale = glm::vec3(0.01, 0.04, 0.02);
modelMatrix = glm::scale(modelMatrix, scale);
//glUseProgram(programTex);
drawObjectTex(bubbleContext, modelMatrix, 0, 0, texture::water);
//drawBubbleColor(bubbleContext, modelMatrix, glm::vec3(.3f, .55f, 0.96f));
// srand(time(NULL));
float MAX_NUM = 20.0;
bubbleLocation[i].x = (((float)rand() / (float)(RAND_MAX)) * MAX_NUM) - MAX_NUM / 2;
bubbleLocation[i].y = (((float)rand() / (float)(RAND_MAX)) * 10) - 5;
bubbleLocation[i].z = (((float)rand() / (float)(RAND_MAX)) * MAX_NUM) - MAX_NUM / 2;
bubbleOriginalLocation[i] = bubbleLocation[i];
bubbleZdir[i] = true;
bubbleXdir[i] = false;
}
}
void bubbleManagerInRoom() {
for (int j = 0;j < bubblenumber; j++) {
bubbleMovementInRoom(j);
glm::mat4 modelMatrix = glm::translate(bubbleLocationInRoom[j]);
// Scaling models
glm::vec3 scale = glm::vec3(0.01, 0.04, 0.02);
modelMatrix = glm::scale(modelMatrix, scale);
//glUseProgram(programTex);
drawObjectTex(bubbleContext, modelMatrix, 0, 0, texture::water);
//drawBubbleColor(bubbleContext, modelMatrix, glm::vec3(.3f, .55f, 0.96f));
// srand(time(NULL));
}
}
void renderScene(GLFWwindow* window)
{
@ -803,7 +1013,6 @@ void renderScene(GLFWwindow* window)
drawObjectTexPBR_ARM(models::c_tableContext, glm::mat4(), texture::c_table_albedo, texture::c_table_normal, texture::c_table_arm);
drawObjectTexPBR_ARM(models::vaseContext, glm::mat4(), texture::vase_albedo, texture::vase_normal, texture::vase_arm);
glUseProgram(programWater);
//drawObjectColorWater(waterContext, glm::translate(glm::mat4(1.0), glm::vec3(0.0, -1.0, 0.0)) * glm::scale(glm::vec3(30.0)), glm::vec3(0.1, 0.1, 0.95), time, texture::water);
drawObjectColorWater(waterContext, glm::translate(glm::mat4(1.0), glm::vec3(0.0f, -1.7f, 0.0f)), glm::vec4(0.1, 0.1, 0.95, 0.5), time, texture::water);
@ -816,6 +1025,9 @@ void renderScene(GLFWwindow* window)
glBindTexture(GL_TEXTURE_2D, depthMap);
Core::DrawContext(models::testContext);*/
bubbleManager();
bubbleManagerInRoom();
glUseProgram(0);
glfwSwapBuffers(window);
}
@ -867,6 +1079,7 @@ void init(GLFWwindow* window)
programTexPBR = shaderLoader.CreateProgram("shaders/shader_tex_pbr.vert", "shaders/shader_tex_pbr.frag");
programTexPBR_ARM = shaderLoader.CreateProgram("shaders/shader_tex_pbr_arm.vert", "shaders/shader_tex_pbr_arm.frag");
programBubble = shaderLoader.CreateProgram("shaders/shader_bubble.vert", "shaders/shader_bubble.frag");
bubblesColor = shaderLoader.CreateProgram("shaders/bubbles_shader_color.vert", "shaders/bubbles_shader_color.frag");
water.readOBJ("./models/plane2.obj");
texture::water = Core::LoadTexture("textures/test.png");
texture::rust = Core::LoadTexture("textures/rust.jpg");
@ -997,7 +1210,7 @@ void init(GLFWwindow* window)
texture::cactus_roughness = Core::LoadTexture("textures/cactus/roughness.png");
texture::cactus_ao = Core::LoadTexture("textures/cactus/ao.png");
texture::cactus_normal = Core::LoadTexture("textures/cactus/normal.png");
loadModelToContext("models/bubble.obj", bubbleContext, false);
loadModelToContext("./models/sphere.obj", sphereContext, false);
loadModelToContext("./models/spaceship.obj", shipContext, false);
//loadModelToContext("./models/bed.obj", models::bedContext, true);
@ -1051,6 +1264,9 @@ void init(GLFWwindow* window)
collisionSystem.calculateSceneBounding();
loadModelToContext("./models/ceramic_vase_01.obj", models::vaseContext, true);
//collisionSystem.calculateSceneBounding();
skyboxTexture = loadSkybox(faces);
//drawSkybox(models::cubeContext, transformation, skyboxTexture);
/*glUseProgram(programSkybox);
@ -1106,6 +1322,34 @@ void processInput(GLFWwindow* window)
texture::screen = Core::LoadTexture("textures/visual.png");
PlaySound(TEXT("sound/ocean.wav"), NULL, SND_ASYNC|SND_LOOP);
}
if (glfwGetKey(window, GLFW_KEY_K) == GLFW_PRESS) {
for (int i = 0; i < bubbleQuantity; i++)
{
// srand(time(NULL));
float MAX_NUM = 20.0;
bubbleLocation[i].x = (((float)rand() / (float)(RAND_MAX)) * MAX_NUM) - MAX_NUM / 2;
bubbleLocation[i].y = (((float)rand() / (float)(RAND_MAX)) * 10) - 5;
bubbleLocation[i].z = (((float)rand() / (float)(RAND_MAX)) * MAX_NUM) - MAX_NUM / 2;
bubbleOriginalLocation[i] = bubbleLocation[i];
bubbleZdir[i] = true;
bubbleXdir[i] = false;
}
}
if (glfwGetKey(window, GLFW_KEY_B) == GLFW_PRESS) {
for (int j = 0; j < bubblenumber;j++) {
bubbleLocationInRoom[j].x = (float)rand() / (float)(RAND_MAX);
bubbleLocationInRoom[j].z = (float)rand() / (float)(RAND_MAX);
bubbleLocationInRoom[j].y = (int)rand() % (int)(3.0 - 2.5 + 1) + 2.5;
bubbleOriginalLocationInRoom[j] = bubbleLocationInRoom[j];
bubbleZdirInRoom[j] = true;
bubbleXdirInRoom[j] = false;
}
}
cameraDir = spaceshipDir;
cameraPos = newSpaceshipPos - 0.5 * spaceshipDir + glm::vec3(0, 1, 0) * 0.2f;