diff --git a/.vs/grk-cw/FileContentIndex/2716a2bb-8731-4646-8476-d49257aaa85d.vsidx b/.vs/grk-cw/FileContentIndex/2716a2bb-8731-4646-8476-d49257aaa85d.vsidx new file mode 100644 index 0000000..ad1efad Binary files /dev/null and b/.vs/grk-cw/FileContentIndex/2716a2bb-8731-4646-8476-d49257aaa85d.vsidx differ diff --git a/.vs/grk-cw/FileContentIndex/2f2a4ac2-cbbb-4555-b03e-2f9d8ae09752.vsidx b/.vs/grk-cw/FileContentIndex/2f2a4ac2-cbbb-4555-b03e-2f9d8ae09752.vsidx deleted file mode 100644 index e2849e8..0000000 Binary files a/.vs/grk-cw/FileContentIndex/2f2a4ac2-cbbb-4555-b03e-2f9d8ae09752.vsidx and /dev/null differ diff --git a/.vs/grk-cw/FileContentIndex/4c4101ca-eb4e-4a4b-a296-2c4b031131f0.vsidx b/.vs/grk-cw/FileContentIndex/4c4101ca-eb4e-4a4b-a296-2c4b031131f0.vsidx deleted file mode 100644 index b1ee341..0000000 Binary files a/.vs/grk-cw/FileContentIndex/4c4101ca-eb4e-4a4b-a296-2c4b031131f0.vsidx and /dev/null differ diff --git a/.vs/grk-cw/FileContentIndex/51bdc300-b97f-4cd0-b017-ac4c9301f693.vsidx b/.vs/grk-cw/FileContentIndex/51bdc300-b97f-4cd0-b017-ac4c9301f693.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/grk-cw/FileContentIndex/51bdc300-b97f-4cd0-b017-ac4c9301f693.vsidx differ diff --git a/.vs/grk-cw/FileContentIndex/52b0af7d-e6d4-4bd0-ac09-72ea4878c474.vsidx b/.vs/grk-cw/FileContentIndex/52b0af7d-e6d4-4bd0-ac09-72ea4878c474.vsidx new file mode 100644 index 0000000..45e827b Binary files /dev/null and b/.vs/grk-cw/FileContentIndex/52b0af7d-e6d4-4bd0-ac09-72ea4878c474.vsidx differ diff --git a/.vs/grk-cw/FileContentIndex/637d440d-2cd1-4da5-a3f5-1a219a3add20.vsidx b/.vs/grk-cw/FileContentIndex/637d440d-2cd1-4da5-a3f5-1a219a3add20.vsidx new file mode 100644 index 0000000..d393ca7 Binary files /dev/null and b/.vs/grk-cw/FileContentIndex/637d440d-2cd1-4da5-a3f5-1a219a3add20.vsidx differ diff --git a/.vs/grk-cw/FileContentIndex/8222af11-4061-4b44-a199-e24745a40c28.vsidx b/.vs/grk-cw/FileContentIndex/8222af11-4061-4b44-a199-e24745a40c28.vsidx deleted file mode 100644 index e3539ad..0000000 Binary files a/.vs/grk-cw/FileContentIndex/8222af11-4061-4b44-a199-e24745a40c28.vsidx and /dev/null differ diff --git a/.vs/grk-cw/FileContentIndex/93223637-7779-4a0e-8cbe-f39515671d74.vsidx b/.vs/grk-cw/FileContentIndex/93223637-7779-4a0e-8cbe-f39515671d74.vsidx new file mode 100644 index 0000000..b65a1b8 Binary files /dev/null and b/.vs/grk-cw/FileContentIndex/93223637-7779-4a0e-8cbe-f39515671d74.vsidx differ diff --git a/.vs/grk-cw/FileContentIndex/read.lock b/.vs/grk-cw/FileContentIndex/read.lock deleted file mode 100644 index e69de29..0000000 diff --git a/.vs/grk-cw/v17/.suo b/.vs/grk-cw/v17/.suo index fdc2910..6959399 100644 Binary files a/.vs/grk-cw/v17/.suo and b/.vs/grk-cw/v17/.suo differ diff --git a/.vs/grk-cw/v17/Browse.VC.db b/.vs/grk-cw/v17/Browse.VC.db index 77dde8e..124e716 100644 Binary files a/.vs/grk-cw/v17/Browse.VC.db and b/.vs/grk-cw/v17/Browse.VC.db differ diff --git a/.vs/grk-cw/v17/DocumentLayout.json b/.vs/grk-cw/v17/DocumentLayout.json new file mode 100644 index 0000000..c494898 --- /dev/null +++ b/.vs/grk-cw/v17/DocumentLayout.json @@ -0,0 +1,91 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\maksg\\Documents\\Grafika_2024\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\ex_7_1.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|solutionrelative:projekt_grk\\src\\ex_7_1.hpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|solutionrelative:projekt_grk\\shaders\\shader_coin.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.vert||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|solutionrelative:projekt_grk\\shaders\\shader_coin.vert||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310}|projekt_grk\\grk-cw7.vcxproj|solutionrelative:projekt_grk\\src\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 3, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "shader_coin.frag", + "DocumentMoniker": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.frag", + "RelativeDocumentMoniker": "projekt_grk\\shaders\\shader_coin.frag", + "ToolTip": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.frag", + "RelativeToolTip": "projekt_grk\\shaders\\shader_coin.frag", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAaAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-02-26T19:01:49.259Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "shader_coin.vert", + "DocumentMoniker": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.vert", + "RelativeDocumentMoniker": "projekt_grk\\shaders\\shader_coin.vert", + "ToolTip": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\shaders\\shader_coin.vert", + "RelativeToolTip": "projekt_grk\\shaders\\shader_coin.vert", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAiAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-02-26T19:01:39.656Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "ex_7_1.hpp", + "DocumentMoniker": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\ex_7_1.hpp", + "RelativeDocumentMoniker": "projekt_grk\\src\\ex_7_1.hpp", + "ToolTip": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\ex_7_1.hpp", + "RelativeToolTip": "projekt_grk\\src\\ex_7_1.hpp", + "ViewState": "AQIAAPwAAAAAAAAAAAAYwP8AAAAaAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-02-25T17:55:58.673Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "main.cpp", + "DocumentMoniker": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\main.cpp", + "RelativeDocumentMoniker": "projekt_grk\\src\\main.cpp", + "ToolTip": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\src\\main.cpp", + "RelativeToolTip": "projekt_grk\\src\\main.cpp", + "ViewState": "AQIAABcAAAAAAAAAAAAtwCYAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-02-26T20:07:44.538Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/grk-cw/v17/Solution.VC.db b/.vs/grk-cw/v17/Solution.VC.db new file mode 100644 index 0000000..544a94b Binary files /dev/null and b/.vs/grk-cw/v17/Solution.VC.db differ diff --git a/.vs/grk-cw/v17/fileList.bin b/.vs/grk-cw/v17/fileList.bin index 91ef4e8..227b09c 100644 Binary files a/.vs/grk-cw/v17/fileList.bin and b/.vs/grk-cw/v17/fileList.bin differ diff --git a/.vs/grk-cw/v17/ipch/AutoPCH/2bd9856fe7123c35/MAIN.ipch b/.vs/grk-cw/v17/ipch/AutoPCH/2bd9856fe7123c35/MAIN.ipch new file mode 100644 index 0000000..119c63b Binary files /dev/null and b/.vs/grk-cw/v17/ipch/AutoPCH/2bd9856fe7123c35/MAIN.ipch differ diff --git a/.vs/grk-cw/v17/ipch/AutoPCH/b9badb3a383f4bb/SHADER_LOADER.ipch b/.vs/grk-cw/v17/ipch/AutoPCH/b9badb3a383f4bb/SHADER_LOADER.ipch new file mode 100644 index 0000000..b8a2d26 Binary files /dev/null and b/.vs/grk-cw/v17/ipch/AutoPCH/b9badb3a383f4bb/SHADER_LOADER.ipch differ diff --git a/.vs/grk-cw/v17/ipch/AutoPCH/d52e93c2264273a6/EX_7_1.ipch b/.vs/grk-cw/v17/ipch/AutoPCH/d52e93c2264273a6/EX_7_1.ipch new file mode 100644 index 0000000..88c4092 Binary files /dev/null and b/.vs/grk-cw/v17/ipch/AutoPCH/d52e93c2264273a6/EX_7_1.ipch differ diff --git a/Debug/projekt_grk.exe b/Debug/projekt_grk.exe index aa1ebc9..6eba963 100644 Binary files a/Debug/projekt_grk.exe and b/Debug/projekt_grk.exe differ diff --git a/Debug/projekt_grk.pdb b/Debug/projekt_grk.pdb index f1bf540..81c8729 100644 Binary files a/Debug/projekt_grk.pdb and b/Debug/projekt_grk.pdb differ diff --git a/projekt_grk/Debug/Box.obj b/projekt_grk/Debug/Box.obj index a00729f..24be220 100644 Binary files a/projekt_grk/Debug/Box.obj and b/projekt_grk/Debug/Box.obj differ diff --git a/projekt_grk/Debug/Camera.obj b/projekt_grk/Debug/Camera.obj index 41b65e5..bb03d1e 100644 Binary files a/projekt_grk/Debug/Camera.obj and b/projekt_grk/Debug/Camera.obj differ diff --git a/projekt_grk/Debug/Render_Utils.obj b/projekt_grk/Debug/Render_Utils.obj index 5523aa9..501ba91 100644 Binary files a/projekt_grk/Debug/Render_Utils.obj and b/projekt_grk/Debug/Render_Utils.obj differ diff --git a/projekt_grk/Debug/SOIL.obj b/projekt_grk/Debug/SOIL.obj index 4a5bfcf..146dddf 100644 Binary files a/projekt_grk/Debug/SOIL.obj and b/projekt_grk/Debug/SOIL.obj differ diff --git a/projekt_grk/Debug/Shader_Loader.obj b/projekt_grk/Debug/Shader_Loader.obj index d05f4be..254a003 100644 Binary files a/projekt_grk/Debug/Shader_Loader.obj and b/projekt_grk/Debug/Shader_Loader.obj differ diff --git a/projekt_grk/Debug/Texture.obj b/projekt_grk/Debug/Texture.obj index 83a74a1..ac71420 100644 Binary files a/projekt_grk/Debug/Texture.obj and b/projekt_grk/Debug/Texture.obj differ diff --git a/projekt_grk/Debug/grk-cw7.log b/projekt_grk/Debug/grk-cw7.log index 9b90919..1fca036 100644 --- a/projekt_grk/Debug/grk-cw7.log +++ b/projekt_grk/Debug/grk-cw7.log @@ -1,10 +1,19 @@ C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(531,5): warning MSB8028: Katalog pośredni (Debug\) zawiera pliki udostępnione z innego projektu (grk-cw3.vcxproj, grk-cw4.vcxproj, grk-cw5.vcxproj, grk-cw6.vcxproj, grk-cw7.vcxproj). Może to spowodować niepoprawne zachowanie podczas oczyszczania i ponownej kompilacji. main.cpp -C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123,1): message : zobacz poprzednią definicję „APIENTRY” -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\ex_7_1.hpp(91,10): warning C4305: "inicjowanie": obcięcie z "double" do "float" -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\ex_7_1.hpp(174,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\ex_7_1.hpp(192,29): warning C4305: "inicjowanie": obcięcie z "double" do "float" +C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": ponowna definicja makra + (kompilowanie pliku źródłowego „src/main.cpp”) + C:\Users\maksg\Documents\Grafika_2024\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123,1): + zobacz poprzednią definicję „APIENTRY” + +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\ex_7_1.hpp(93,10): warning C4305: "inicjowanie": obcięcie z "double" do "float" + (kompilowanie pliku źródłowego „src/main.cpp”) + +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\ex_7_1.hpp(205,13): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych + (kompilowanie pliku źródłowego „src/main.cpp”) + +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\ex_7_1.hpp(223,29): warning C4305: "inicjowanie": obcięcie z "double" do "float" + (kompilowanie pliku źródłowego „src/main.cpp”) + Box.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO” LINK : warning LNK4098: domyślna biblioteka „MSVCRT” powoduje konflikt z innymi bibliotekami; użyj opcji /NODEFAULTLIB:biblioteka - grk-cw7.vcxproj -> D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\Debug\projekt_grk.exe + grk-cw7.vcxproj -> C:\Users\maksg\Documents\Grafika_2024\Debug\projekt_grk.exe diff --git a/projekt_grk/Debug/image_DXT.obj b/projekt_grk/Debug/image_DXT.obj index 0c483ec..844fd58 100644 Binary files a/projekt_grk/Debug/image_DXT.obj and b/projekt_grk/Debug/image_DXT.obj differ diff --git a/projekt_grk/Debug/image_helper.obj b/projekt_grk/Debug/image_helper.obj index 1a19ce8..5391327 100644 Binary files a/projekt_grk/Debug/image_helper.obj and b/projekt_grk/Debug/image_helper.obj differ diff --git a/projekt_grk/Debug/main.obj b/projekt_grk/Debug/main.obj index 687672e..d1efb27 100644 Binary files a/projekt_grk/Debug/main.obj and b/projekt_grk/Debug/main.obj differ diff --git a/projekt_grk/Debug/projekt_grk.exe.recipe b/projekt_grk/Debug/projekt_grk.exe.recipe index 87c6564..6cd0ef8 100644 --- a/projekt_grk/Debug/projekt_grk.exe.recipe +++ b/projekt_grk/Debug/projekt_grk.exe.recipe @@ -2,7 +2,7 @@ - D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\Debug\projekt_grk.exe + C:\Users\maksg\Documents\Grafika_2024\Debug\projekt_grk.exe diff --git a/projekt_grk/Debug/projekt_grk.tlog/CL.command.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/CL.command.1.tlog index 5b21e6e..1cb1222 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/CL.command.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/CL.command.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/CL.read.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/CL.read.1.tlog index 1bf5792..60765cd 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/CL.read.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/CL.read.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/CL.write.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/CL.write.1.tlog index 4aefcc0..ae4636d 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/CL.write.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/CL.write.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/Cl.items.tlog b/projekt_grk/Debug/projekt_grk.tlog/Cl.items.tlog index 3c40a12..26ef988 100644 --- a/projekt_grk/Debug/projekt_grk.tlog/Cl.items.tlog +++ b/projekt_grk/Debug/projekt_grk.tlog/Cl.items.tlog @@ -1,10 +1,10 @@ -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\Box.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\Box.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\Camera.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\Camera.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\main.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\main.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\Render_Utils.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\Render_Utils.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\Shader_Loader.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\Shader_Loader.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\SOIL\image_DXT.c;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\image_DXT.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\SOIL\image_helper.c;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\image_helper.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\SOIL\SOIL.c;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\SOIL.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\SOIL\stb_image_aug.c;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\stb_image_aug.obj -D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\src\Texture.cpp;D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\projekt_grk\Debug\Texture.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\Box.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\Box.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\Camera.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\Camera.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\main.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\main.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\Render_Utils.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\Render_Utils.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\Shader_Loader.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\Shader_Loader.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\SOIL\image_DXT.c;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\image_DXT.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\SOIL\image_helper.c;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\image_helper.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\SOIL\SOIL.c;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\SOIL.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\SOIL\stb_image_aug.c;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\stb_image_aug.obj +C:\Users\maksg\Documents\Grafika_2024\projekt_grk\src\Texture.cpp;C:\Users\maksg\Documents\Grafika_2024\projekt_grk\Debug\Texture.obj diff --git a/projekt_grk/Debug/projekt_grk.tlog/link.command.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/link.command.1.tlog index fec4027..7a3e5b5 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/link.command.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/link.command.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/link.read.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/link.read.1.tlog index 902691d..39df468 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/link.read.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/link.read.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/link.secondary.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/link.secondary.1.tlog new file mode 100644 index 0000000..5d1ab4c --- /dev/null +++ b/projekt_grk/Debug/projekt_grk.tlog/link.secondary.1.tlog @@ -0,0 +1 @@ +^C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\BOX.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\CAMERA.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\IMAGE_DXT.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\IMAGE_HELPER.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\MAIN.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\RENDER_UTILS.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\SHADER_LOADER.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\SOIL.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\STB_IMAGE_AUG.OBJ|C:\USERS\MAKSG\DOCUMENTS\GRAFIKA_2024\PROJEKT_GRK\DEBUG\TEXTURE.OBJ diff --git a/projekt_grk/Debug/projekt_grk.tlog/link.write.1.tlog b/projekt_grk/Debug/projekt_grk.tlog/link.write.1.tlog index 4824743..4829385 100644 Binary files a/projekt_grk/Debug/projekt_grk.tlog/link.write.1.tlog and b/projekt_grk/Debug/projekt_grk.tlog/link.write.1.tlog differ diff --git a/projekt_grk/Debug/projekt_grk.tlog/projekt_grk.lastbuildstate b/projekt_grk/Debug/projekt_grk.tlog/projekt_grk.lastbuildstate index 76a96e4..c9ed8de 100644 --- a/projekt_grk/Debug/projekt_grk.tlog/projekt_grk.lastbuildstate +++ b/projekt_grk/Debug/projekt_grk.tlog/projekt_grk.lastbuildstate @@ -1,2 +1,2 @@ -PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: -Debug|Win32|D:\STUDIA_sem5\GRAFIKA-PROJEKT\grk\| +PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0: +Debug|Win32|C:\Users\maksg\Documents\Grafika_2024\| diff --git a/projekt_grk/Debug/stb_image_aug.obj b/projekt_grk/Debug/stb_image_aug.obj index 499c830..83c041b 100644 Binary files a/projekt_grk/Debug/stb_image_aug.obj and b/projekt_grk/Debug/stb_image_aug.obj differ diff --git a/projekt_grk/Debug/vc143.idb b/projekt_grk/Debug/vc143.idb index fa08bc6..9683c16 100644 Binary files a/projekt_grk/Debug/vc143.idb and b/projekt_grk/Debug/vc143.idb differ diff --git a/projekt_grk/Debug/vc143.pdb b/projekt_grk/Debug/vc143.pdb index 634d553..3a4b001 100644 Binary files a/projekt_grk/Debug/vc143.pdb and b/projekt_grk/Debug/vc143.pdb differ diff --git a/projekt_grk/grk-cw7.vcxproj b/projekt_grk/grk-cw7.vcxproj index 72055b9..b2cfce9 100644 --- a/projekt_grk/grk-cw7.vcxproj +++ b/projekt_grk/grk-cw7.vcxproj @@ -45,6 +45,8 @@ + + @@ -52,7 +54,7 @@ {F2FC2E8F-CBA6-49D7-8B73-4BFBCB64D310} Win32Proj grk-cw7 - 10.0.22000.0 + 10.0 projekt_grk diff --git a/projekt_grk/grk-cw7.vcxproj.filters b/projekt_grk/grk-cw7.vcxproj.filters index 99bca5a..84d8ca5 100644 --- a/projekt_grk/grk-cw7.vcxproj.filters +++ b/projekt_grk/grk-cw7.vcxproj.filters @@ -121,5 +121,11 @@ Shader Files + + Shader Files + + + Shader Files + \ No newline at end of file diff --git a/projekt_grk/models/.vs/ProjectSettings.json b/projekt_grk/models/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/projekt_grk/models/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/projekt_grk/models/.vs/VSWorkspaceState.json b/projekt_grk/models/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..6b61141 --- /dev/null +++ b/projekt_grk/models/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/projekt_grk/models/.vs/models/FileContentIndex/b1e0686a-7830-4237-8162-3e6519443971.vsidx b/projekt_grk/models/.vs/models/FileContentIndex/b1e0686a-7830-4237-8162-3e6519443971.vsidx new file mode 100644 index 0000000..282846d Binary files /dev/null and b/projekt_grk/models/.vs/models/FileContentIndex/b1e0686a-7830-4237-8162-3e6519443971.vsidx differ diff --git a/projekt_grk/models/.vs/models/v17/.wsuo b/projekt_grk/models/.vs/models/v17/.wsuo new file mode 100644 index 0000000..6891527 Binary files /dev/null and b/projekt_grk/models/.vs/models/v17/.wsuo differ diff --git a/projekt_grk/models/.vs/models/v17/DocumentLayout.json b/projekt_grk/models/.vs/models/v17/DocumentLayout.json new file mode 100644 index 0000000..f9b2c50 --- /dev/null +++ b/projekt_grk/models/.vs/models/v17/DocumentLayout.json @@ -0,0 +1,23 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\maksg\\Documents\\Grafika_2024\\projekt_grk\\models\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/grk-cw/FileContentIndex/7fa595aa-c0ff-437a-a1ba-6fa4fc6f74ba.vsidx b/projekt_grk/models/.vs/slnx.sqlite similarity index 72% rename from .vs/grk-cw/FileContentIndex/7fa595aa-c0ff-437a-a1ba-6fa4fc6f74ba.vsidx rename to projekt_grk/models/.vs/slnx.sqlite index b498eb9..008792b 100644 Binary files a/.vs/grk-cw/FileContentIndex/7fa595aa-c0ff-437a-a1ba-6fa4fc6f74ba.vsidx and b/projekt_grk/models/.vs/slnx.sqlite differ diff --git a/projekt_grk/models/cylinder.mtl b/projekt_grk/models/cylinder.mtl new file mode 100644 index 0000000..763e0ab --- /dev/null +++ b/projekt_grk/models/cylinder.mtl @@ -0,0 +1,2 @@ +# Blender 4.0.2 MTL File: 'None' +# www.blender.org diff --git a/projekt_grk/models/cylinder.obj b/projekt_grk/models/cylinder.obj new file mode 100644 index 0000000..e906a3f --- /dev/null +++ b/projekt_grk/models/cylinder.obj @@ -0,0 +1,267 @@ +# Blender 4.0.2 +# www.blender.org +mtllib cylinder.mtl +o Cylinder +v 0.000000 1.000000 -0.200000 +v 0.000000 1.000000 0.200000 +v 0.195090 0.980785 -0.200000 +v 0.195090 0.980785 0.200000 +v 0.382683 0.923880 -0.200000 +v 0.382683 0.923880 0.200000 +v 0.555570 0.831470 -0.200000 +v 0.555570 0.831470 0.200000 +v 0.707107 0.707107 -0.200000 +v 0.707107 0.707107 0.200000 +v 0.831470 0.555570 -0.200000 +v 0.831470 0.555570 0.200000 +v 0.923880 0.382683 -0.200000 +v 0.923880 0.382683 0.200000 +v 0.980785 0.195090 -0.200000 +v 0.980785 0.195090 0.200000 +v 1.000000 0.000000 -0.200000 +v 1.000000 -0.000000 0.200000 +v 0.980785 -0.195090 -0.200000 +v 0.980785 -0.195090 0.200000 +v 0.923880 -0.382683 -0.200000 +v 0.923880 -0.382683 0.200000 +v 0.831470 -0.555570 -0.200000 +v 0.831470 -0.555570 0.200000 +v 0.707107 -0.707107 -0.200000 +v 0.707107 -0.707107 0.200000 +v 0.555570 -0.831470 -0.200000 +v 0.555570 -0.831470 0.200000 +v 0.382683 -0.923880 -0.200000 +v 0.382683 -0.923880 0.200000 +v 0.195090 -0.980785 -0.200000 +v 0.195090 -0.980785 0.200000 +v 0.000000 -1.000000 -0.200000 +v 0.000000 -1.000000 0.200000 +v -0.195090 -0.980785 -0.200000 +v -0.195090 -0.980785 0.200000 +v -0.382683 -0.923880 -0.200000 +v -0.382683 -0.923880 0.200000 +v -0.555570 -0.831470 -0.200000 +v -0.555570 -0.831470 0.200000 +v -0.707107 -0.707107 -0.200000 +v -0.707107 -0.707107 0.200000 +v -0.831470 -0.555570 -0.200000 +v -0.831470 -0.555570 0.200000 +v -0.923880 -0.382683 -0.200000 +v -0.923880 -0.382683 0.200000 +v -0.980785 -0.195090 -0.200000 +v -0.980785 -0.195090 0.200000 +v -1.000000 0.000000 -0.200000 +v -1.000000 -0.000000 0.200000 +v -0.980785 0.195090 -0.200000 +v -0.980785 0.195090 0.200000 +v -0.923880 0.382683 -0.200000 +v -0.923880 0.382683 0.200000 +v -0.831470 0.555570 -0.200000 +v -0.831470 0.555570 0.200000 +v -0.707107 0.707107 -0.200000 +v -0.707107 0.707107 0.200000 +v -0.555570 0.831470 -0.200000 +v -0.555570 0.831470 0.200000 +v -0.382683 0.923880 -0.200000 +v -0.382683 0.923880 0.200000 +v -0.195090 0.980785 -0.200000 +v -0.195090 0.980785 0.200000 +vn 0.0980 0.9952 -0.0000 +vn 0.2903 0.9569 -0.0000 +vn 0.4714 0.8819 -0.0000 +vn 0.6344 0.7730 -0.0000 +vn 0.7730 0.6344 -0.0000 +vn 0.8819 0.4714 -0.0000 +vn 0.9569 0.2903 -0.0000 +vn 0.9952 0.0980 -0.0000 +vn 0.9952 -0.0980 -0.0000 +vn 0.9569 -0.2903 -0.0000 +vn 0.8819 -0.4714 -0.0000 +vn 0.7730 -0.6344 -0.0000 +vn 0.6344 -0.7730 -0.0000 +vn 0.4714 -0.8819 -0.0000 +vn 0.2903 -0.9569 -0.0000 +vn 0.0980 -0.9952 -0.0000 +vn -0.0980 -0.9952 -0.0000 +vn -0.2903 -0.9569 -0.0000 +vn -0.4714 -0.8819 -0.0000 +vn -0.6344 -0.7730 -0.0000 +vn -0.7730 -0.6344 -0.0000 +vn -0.8819 -0.4714 -0.0000 +vn -0.9569 -0.2903 -0.0000 +vn -0.9952 -0.0980 -0.0000 +vn -0.9952 0.0980 -0.0000 +vn -0.9569 0.2903 -0.0000 +vn -0.8819 0.4714 -0.0000 +vn -0.7730 0.6344 -0.0000 +vn -0.6344 0.7730 -0.0000 +vn -0.4714 0.8819 -0.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.2903 0.9569 -0.0000 +vn -0.0980 0.9952 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.968750 1.000000 +vt 0.968750 0.500000 +vt 0.937500 1.000000 +vt 0.937500 0.500000 +vt 0.906250 1.000000 +vt 0.906250 0.500000 +vt 0.875000 1.000000 +vt 0.875000 0.500000 +vt 0.843750 1.000000 +vt 0.843750 0.500000 +vt 0.812500 1.000000 +vt 0.812500 0.500000 +vt 0.781250 1.000000 +vt 0.781250 0.500000 +vt 0.750000 1.000000 +vt 0.750000 0.500000 +vt 0.718750 1.000000 +vt 0.718750 0.500000 +vt 0.687500 1.000000 +vt 0.687500 0.500000 +vt 0.656250 1.000000 +vt 0.656250 0.500000 +vt 0.625000 1.000000 +vt 0.625000 0.500000 +vt 0.593750 1.000000 +vt 0.593750 0.500000 +vt 0.562500 1.000000 +vt 0.562500 0.500000 +vt 0.531250 1.000000 +vt 0.531250 0.500000 +vt 0.500000 1.000000 +vt 0.500000 0.500000 +vt 0.468750 1.000000 +vt 0.468750 0.500000 +vt 0.437500 1.000000 +vt 0.437500 0.500000 +vt 0.406250 1.000000 +vt 0.406250 0.500000 +vt 0.375000 1.000000 +vt 0.375000 0.500000 +vt 0.343750 1.000000 +vt 0.343750 0.500000 +vt 0.312500 1.000000 +vt 0.312500 0.500000 +vt 0.281250 1.000000 +vt 0.281250 0.500000 +vt 0.250000 1.000000 +vt 0.250000 0.500000 +vt 0.218750 1.000000 +vt 0.218750 0.500000 +vt 0.187500 1.000000 +vt 0.187500 0.500000 +vt 0.156250 1.000000 +vt 0.156250 0.500000 +vt 0.125000 1.000000 +vt 0.125000 0.500000 +vt 0.093750 1.000000 +vt 0.093750 0.500000 +vt 0.062500 1.000000 +vt 0.062500 0.500000 +vt 0.296822 0.485388 +vt 0.250000 0.490000 +vt 0.203178 0.485388 +vt 0.158156 0.471731 +vt 0.116663 0.449553 +vt 0.080294 0.419706 +vt 0.050447 0.383337 +vt 0.028269 0.341844 +vt 0.014612 0.296822 +vt 0.010000 0.250000 +vt 0.014612 0.203178 +vt 0.028269 0.158156 +vt 0.050447 0.116663 +vt 0.080294 0.080294 +vt 0.116663 0.050447 +vt 0.158156 0.028269 +vt 0.203178 0.014612 +vt 0.250000 0.010000 +vt 0.296822 0.014612 +vt 0.341844 0.028269 +vt 0.383337 0.050447 +vt 0.419706 0.080294 +vt 0.449553 0.116663 +vt 0.471731 0.158156 +vt 0.485388 0.203178 +vt 0.490000 0.250000 +vt 0.485388 0.296822 +vt 0.471731 0.341844 +vt 0.449553 0.383337 +vt 0.419706 0.419706 +vt 0.383337 0.449553 +vt 0.341844 0.471731 +vt 0.031250 1.000000 +vt 0.031250 0.500000 +vt 0.000000 1.000000 +vt 0.000000 0.500000 +vt 0.750000 0.490000 +vt 0.796822 0.485388 +vt 0.841844 0.471731 +vt 0.883337 0.449553 +vt 0.919706 0.419706 +vt 0.949553 0.383337 +vt 0.971731 0.341844 +vt 0.985388 0.296822 +vt 0.990000 0.250000 +vt 0.985388 0.203178 +vt 0.971731 0.158156 +vt 0.949553 0.116663 +vt 0.919706 0.080294 +vt 0.883337 0.050447 +vt 0.841844 0.028269 +vt 0.796822 0.014612 +vt 0.750000 0.010000 +vt 0.703178 0.014612 +vt 0.658156 0.028269 +vt 0.616663 0.050447 +vt 0.580294 0.080294 +vt 0.550447 0.116663 +vt 0.528269 0.158156 +vt 0.514612 0.203178 +vt 0.510000 0.250000 +vt 0.514612 0.296822 +vt 0.528269 0.341844 +vt 0.550447 0.383337 +vt 0.580294 0.419706 +vt 0.616663 0.449553 +vt 0.658156 0.471731 +vt 0.703178 0.485388 +s 0 +f 1/1/1 2/2/1 4/3/1 3/4/1 +f 3/4/2 4/3/2 6/5/2 5/6/2 +f 5/6/3 6/5/3 8/7/3 7/8/3 +f 7/8/4 8/7/4 10/9/4 9/10/4 +f 9/10/5 10/9/5 12/11/5 11/12/5 +f 11/12/6 12/11/6 14/13/6 13/14/6 +f 13/14/7 14/13/7 16/15/7 15/16/7 +f 15/16/8 16/15/8 18/17/8 17/18/8 +f 17/18/9 18/17/9 20/19/9 19/20/9 +f 19/20/10 20/19/10 22/21/10 21/22/10 +f 21/22/11 22/21/11 24/23/11 23/24/11 +f 23/24/12 24/23/12 26/25/12 25/26/12 +f 25/26/13 26/25/13 28/27/13 27/28/13 +f 27/28/14 28/27/14 30/29/14 29/30/14 +f 29/30/15 30/29/15 32/31/15 31/32/15 +f 31/32/16 32/31/16 34/33/16 33/34/16 +f 33/34/17 34/33/17 36/35/17 35/36/17 +f 35/36/18 36/35/18 38/37/18 37/38/18 +f 37/38/19 38/37/19 40/39/19 39/40/19 +f 39/40/20 40/39/20 42/41/20 41/42/20 +f 41/42/21 42/41/21 44/43/21 43/44/21 +f 43/44/22 44/43/22 46/45/22 45/46/22 +f 45/46/23 46/45/23 48/47/23 47/48/23 +f 47/48/24 48/47/24 50/49/24 49/50/24 +f 49/50/25 50/49/25 52/51/25 51/52/25 +f 51/52/26 52/51/26 54/53/26 53/54/26 +f 53/54/27 54/53/27 56/55/27 55/56/27 +f 55/56/28 56/55/28 58/57/28 57/58/28 +f 57/58/29 58/57/29 60/59/29 59/60/29 +f 59/60/30 60/59/30 62/61/30 61/62/30 +f 4/63/31 2/64/31 64/65/31 62/66/31 60/67/31 58/68/31 56/69/31 54/70/31 52/71/31 50/72/31 48/73/31 46/74/31 44/75/31 42/76/31 40/77/31 38/78/31 36/79/31 34/80/31 32/81/31 30/82/31 28/83/31 26/84/31 24/85/31 22/86/31 20/87/31 18/88/31 16/89/31 14/90/31 12/91/31 10/92/31 8/93/31 6/94/31 +f 61/62/32 62/61/32 64/95/32 63/96/32 +f 63/96/33 64/95/33 2/97/33 1/98/33 +f 1/99/34 3/100/34 5/101/34 7/102/34 9/103/34 11/104/34 13/105/34 15/106/34 17/107/34 19/108/34 21/109/34 23/110/34 25/111/34 27/112/34 29/113/34 31/114/34 33/115/34 35/116/34 37/117/34 39/118/34 41/119/34 43/120/34 45/121/34 47/122/34 49/123/34 51/124/34 53/125/34 55/126/34 57/127/34 59/128/34 61/129/34 63/130/34 diff --git a/projekt_grk/models/sphere.mtl b/projekt_grk/models/sphere.mtl new file mode 100644 index 0000000..763e0ab --- /dev/null +++ b/projekt_grk/models/sphere.mtl @@ -0,0 +1,2 @@ +# Blender 4.0.2 MTL File: 'None' +# www.blender.org diff --git a/projekt_grk/shaders/shader_coin.frag b/projekt_grk/shaders/shader_coin.frag new file mode 100644 index 0000000..cc8c617 --- /dev/null +++ b/projekt_grk/shaders/shader_coin.frag @@ -0,0 +1,20 @@ +#version 430 core + +in vec3 FragPos; +in vec3 Normal; + +out vec4 FragColor; + +uniform vec3 color; + +void main() +{ + vec3 lightColor = vec3(1.0, 1.0, 1.0); + vec3 lightDir = normalize(vec3(1.0, 1.0, 1.0)); + + float diff = max(dot(normalize(Normal), lightDir), 0.0); + vec3 diffuse = diff * lightColor; + + FragColor = vec4(color * diffuse, 1.0); +} + diff --git a/projekt_grk/shaders/shader_coin.vert b/projekt_grk/shaders/shader_coin.vert new file mode 100644 index 0000000..5cb152f --- /dev/null +++ b/projekt_grk/shaders/shader_coin.vert @@ -0,0 +1,20 @@ +#version 430 core + +layout(location = 0) in vec3 vertexPosition; +layout(location = 1) in vec3 vertexNormal; +layout(location = 2) in vec2 vertexTexCoord; + +uniform mat4 transformation; +uniform mat4 modelMatrix; + +out vec3 FragPos; +out vec3 Normal; + +void main() +{ + vec4 rotatedPosition = modelMatrix * vec4(vertexPosition, 1.0); + gl_Position = transformation * rotatedPosition; + Normal = mat3(transpose(inverse(transformation))) * vertexNormal; + FragPos = rotatedPosition.xyz; +} + diff --git a/projekt_grk/src/ex_7_1.hpp b/projekt_grk/src/ex_7_1.hpp index 0f1fc77..e87dfda 100644 --- a/projekt_grk/src/ex_7_1.hpp +++ b/projekt_grk/src/ex_7_1.hpp @@ -51,11 +51,13 @@ GLuint programTex; GLuint programEarth; GLuint programProcTex; GLuint programSkyBox; +GLuint programCoin; Core::Shader_Loader shaderLoader; Core::RenderContext shipContext; Core::RenderContext sphereContext; Core::RenderContext cubeContext; +Core::RenderContext cylinderContext; glm::vec3 cameraPos = glm::vec3(-4.f, 0, 0); glm::vec3 cameraDir = glm::vec3(1.f, 0.f, 0.f); @@ -131,6 +133,35 @@ void drawObjectTexture(Core::RenderContext& context, glm::mat4 modelMatrix, GLui Core::DrawContext(context); } +void drawCylinder(Core::RenderContext& context, glm::mat4 modelMatrix, float height, float radius, glm::vec3 color) { + GLuint prog = programCoin; + glUseProgram(prog); + + // Rotate the modelMatrix to make the cylinder vertically oriented + + modelMatrix = glm::rotate(modelMatrix, glm::radians(-90.0f), glm::vec3(1, 0, 0)); // Rotate around x-axis + modelMatrix = glm::scale(modelMatrix, glm::vec3(radius, height, radius)); // Scale + + // Calculate model-view-projection matrix + glm::mat4 viewProjectionMatrix = createPerspectiveMatrix() * createCameraMatrix(); + glm::mat4 transformation = viewProjectionMatrix * modelMatrix; + + // Set transformation matrices in the shader + glUniformMatrix4fv(glGetUniformLocation(prog, "transformation"), 1, GL_FALSE, (float*)&transformation); + glUniformMatrix4fv(glGetUniformLocation(prog, "modelMatrix"), 1, GL_FALSE, (float*)&modelMatrix); + + // Set color and light position in the shader + glUniform3f(glGetUniformLocation(prog, "color"), color.x, color.y, color.z); + glUniform3f(glGetUniformLocation(prog, "lightPos"), 0, 0, 0); + + // Draw the cylinder + Core::DrawContext(context); +} + + + + + void drawSun(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint textureID) { @@ -242,9 +273,13 @@ void renderScene(GLFWwindow* window) drawObjectSkyBox(cubeContext, glm::translate(cameraPos)); //sun + drawSun(sphereContext, glm::mat4(), texture::sun); - //rendering all the planets + float cylinderHeight = 1.0f; + float cylinderRadius = 1.0f; + drawCylinder(cylinderContext, glm::translate(glm::vec3(5.0f, 0.0f, 0.0f)), cylinderHeight, cylinderRadius, glm::vec3(1.0f, 1.0f, 0.0f)); + renderPlanets(); @@ -296,10 +331,12 @@ void init(GLFWwindow* window) programProcTex = shaderLoader.CreateProgram("shaders/shader_5_1_tex.vert", "shaders/shader_5_1_tex.frag"); programSun = shaderLoader.CreateProgram("shaders/shader_5_sun.vert", "shaders/shader_5_sun.frag"); programSkyBox = shaderLoader.CreateProgram("shaders/shader_skybox.vert", "shaders/shader_skybox.frag"); + programCoin = shaderLoader.CreateProgram("shaders/shader_coin.vert", "shaders/shader_coin.frag"); loadModelToContext("./models/sphere.obj", sphereContext); loadModelToContext("./models/spaceship.obj", shipContext); loadModelToContext("./models/cube.obj", cubeContext); + loadModelToContext("./models/cylinder.obj", cylinderContext); texture::mercury = Core::LoadTexture("textures/mercury/mercury.jpg"); texture::venus = Core::LoadTexture("textures/venus/venus.jpg");