smiglo i dodatkowe rosliny
@ -2,7 +2,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ProjectOutputs>
|
<ProjectOutputs>
|
||||||
<ProjectOutput>
|
<ProjectOutput>
|
||||||
<FullPath>C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\Debug\grk-cw6.exe</FullPath>
|
<FullPath>C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\Debug\grk-cw6.exe</FullPath>
|
||||||
</ProjectOutput>
|
</ProjectOutput>
|
||||||
</ProjectOutputs>
|
</ProjectOutputs>
|
||||||
<ContentFiles />
|
<ContentFiles />
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.30.30705:TargetPlatformVersion=10.0.19041.0:
|
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.30.30705:TargetPlatformVersion=10.0.19041.0:
|
||||||
Debug|Win32|C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\|
|
Debug|Win32|C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\|
|
||||||
|
@ -1,4 +1 @@
|
|||||||
main.cpp
|
projekt.vcxproj -> C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\Debug\grk-cw6.exe
|
||||||
C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\pliki\src\main.cpp(289,12): warning C4244: "argument": konwersja z "time_t" do "unsigned int", możliwa utrata danych
|
|
||||||
Camera.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
|
|
||||||
projekt.vcxproj -> C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\Debug\grk-cw6.exe
|
|
||||||
|
12
GrafikaProjekt/pliki/models/cave.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl Default_OBJ.001
|
||||||
|
Ns 225.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
11099
GrafikaProjekt/pliki/models/cave.obj
Normal file
13749
GrafikaProjekt/pliki/models/grass.obj
Normal file
2
GrafikaProjekt/pliki/models/roslina1.mtl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 0
|
12
GrafikaProjekt/pliki/models/roslina2.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl 10010_Coral_v1
|
||||||
|
Ns 225.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
12
GrafikaProjekt/pliki/models/roslina4.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl 01_-_Default
|
||||||
|
Ns 225.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
8627
GrafikaProjekt/pliki/models/roslina4.obj
Normal file
22
GrafikaProjekt/pliki/models/roslina5.mtl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 2
|
||||||
|
|
||||||
|
newmtl 20940_Table_Coral_v1
|
||||||
|
Ns 225.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl platform
|
||||||
|
Ns 225.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
135625
GrafikaProjekt/pliki/models/roslina5.obj
Normal file
5334
GrafikaProjekt/pliki/models/smiglo.obj
Normal file
23104
GrafikaProjekt/pliki/models/submarine1.obj
Normal file
@ -30,6 +30,11 @@ Core::RenderContext fish5Context;
|
|||||||
Core::RenderContext fish6Context;
|
Core::RenderContext fish6Context;
|
||||||
Core::RenderContext plant1;
|
Core::RenderContext plant1;
|
||||||
Core::RenderContext plant3;
|
Core::RenderContext plant3;
|
||||||
|
Core::RenderContext plant4;
|
||||||
|
Core::RenderContext plant5;
|
||||||
|
Core::RenderContext smiglo;
|
||||||
|
Core::RenderContext grass;
|
||||||
|
Core::RenderContext cave;
|
||||||
|
|
||||||
float skyboxVertices[] = {
|
float skyboxVertices[] = {
|
||||||
-10.0f, 10.0f, -10.0f,
|
-10.0f, 10.0f, -10.0f,
|
||||||
@ -99,6 +104,9 @@ GLuint textureFish1;
|
|||||||
GLuint textureFish2;
|
GLuint textureFish2;
|
||||||
GLuint texturePlant1;
|
GLuint texturePlant1;
|
||||||
GLuint texturePlant3;
|
GLuint texturePlant3;
|
||||||
|
GLuint texturePlant4;
|
||||||
|
GLuint texturePlant5;
|
||||||
|
GLuint textureSmiglo;
|
||||||
|
|
||||||
|
|
||||||
void keyboard(unsigned char key, int x, int y)
|
void keyboard(unsigned char key, int x, int y)
|
||||||
@ -249,6 +257,11 @@ void renderScene()
|
|||||||
drawObjectTexture(fish1Context, glm::translate(glm::vec3(0, 0, 0)), textureFish1);
|
drawObjectTexture(fish1Context, glm::translate(glm::vec3(0, 0, 0)), textureFish1);
|
||||||
rypa = (rypa + 1) % 360;
|
rypa = (rypa + 1) % 360;
|
||||||
drawObjectTexture(fish2Context, glm::translate(glm::vec3(0.25f, 0, (float)rypa/(float)360)) * glm::rotate(glm::degrees((float)rypa / (float)360), glm::vec3(0, 1, 0)), textureFish2);
|
drawObjectTexture(fish2Context, glm::translate(glm::vec3(0.25f, 0, (float)rypa/(float)360)) * glm::rotate(glm::degrees((float)rypa / (float)360), glm::vec3(0, 1, 0)), textureFish2);
|
||||||
|
drawObjectTexture(smiglo, shipModelMatrix * glm::translate(glm::vec3(0.01, -0.27, -1)) * glm::rotate(glm::degrees((float)rypa / (float)360), glm::vec3(0, 0, 1)), textureSmiglo);
|
||||||
|
drawObjectTexture(grass, glm::translate(glm::vec3(0, 1, 0)), texturePlant3);
|
||||||
|
drawObjectTexture(plant4, glm::translate(glm::vec3(0, 1, 0)), texturePlant4);
|
||||||
|
drawObjectTexture(plant5, glm::translate(glm::vec3(0, 1, 0)), texturePlant5);
|
||||||
|
drawObjectTexture(cave, glm::translate(glm::vec3(0, -0.4, 0)), textureAsteroid);
|
||||||
|
|
||||||
std::ifstream MyReadFile("models/teren1.obj");
|
std::ifstream MyReadFile("models/teren1.obj");
|
||||||
std::string myText;
|
std::string myText;
|
||||||
@ -295,19 +308,27 @@ void init()
|
|||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
programCubemap = shaderLoader.CreateProgram("shaders/shader_cubemap.vert", "shaders/shader_cubemap.frag");
|
programCubemap = shaderLoader.CreateProgram("shaders/shader_cubemap.vert", "shaders/shader_cubemap.frag");
|
||||||
programTexture = shaderLoader.CreateProgram("shaders/shader_tex.vert", "shaders/shader_tex.frag");
|
programTexture = shaderLoader.CreateProgram("shaders/shader_tex.vert", "shaders/shader_tex.frag");
|
||||||
loadModelToContext("models/submarine.obj", shipContext);
|
loadModelToContext("models/submarine1.obj", shipContext);
|
||||||
loadModelToContext("models/teren1.obj", sphereContext);
|
loadModelToContext("models/teren1.obj", sphereContext);
|
||||||
loadModelToContext("models/fish1.obj", fish1Context);
|
loadModelToContext("models/fish1.obj", fish1Context);
|
||||||
loadModelToContext("models/fish4.obj", fish2Context);
|
loadModelToContext("models/fish4.obj", fish2Context);
|
||||||
loadModelToContext("models/roslina1.obj", plant1);
|
loadModelToContext("models/roslina2.obj", plant1);
|
||||||
loadModelToContext("models/roslina3.obj", plant3);
|
loadModelToContext("models/roslina3.obj", plant3);
|
||||||
|
loadModelToContext("models/smiglo.obj", smiglo);
|
||||||
|
loadModelToContext("models/grass.obj", grass);
|
||||||
|
loadModelToContext("models/cave.obj", cave);
|
||||||
|
loadModelToContext("models/roslina4.obj", plant4);
|
||||||
|
loadModelToContext("models/roslina5.obj", plant5);
|
||||||
|
|
||||||
textureAsteroid = Core::LoadTexture("textures/rck_1.png");
|
textureAsteroid = Core::LoadTexture("textures/rock.png");
|
||||||
textureSubmarine = Core::LoadTexture("textures/sub.png");
|
textureSubmarine = Core::LoadTexture("textures/sub1.png");
|
||||||
textureFish1 = Core::LoadTexture("textures/scale.png");
|
textureFish1 = Core::LoadTexture("textures/scale.png");
|
||||||
textureFish2 = Core::LoadTexture("textures/scale2.png");
|
textureFish2 = Core::LoadTexture("textures/scale2.png");
|
||||||
texturePlant1 = Core::LoadTexture("textures/plant.png");
|
texturePlant1 = Core::LoadTexture("textures/plant.png");
|
||||||
texturePlant3 = Core::LoadTexture("textures/plant3.png");
|
texturePlant3 = Core::LoadTexture("textures/plant3.png");
|
||||||
|
textureSmiglo = Core::LoadTexture("textures/metal.png");
|
||||||
|
texturePlant4 = Core::LoadTexture("textures/plant4.png");
|
||||||
|
texturePlant5 = Core::LoadTexture("textures/plant5.png");
|
||||||
cubemapTexture = loadCubemap();
|
cubemapTexture = loadCubemap();
|
||||||
|
|
||||||
glGenVertexArrays(1, &skyboxVAO);
|
glGenVertexArrays(1, &skyboxVAO);
|
||||||
|
BIN
GrafikaProjekt/pliki/textures/metal.png
Normal file
After Width: | Height: | Size: 82 MiB |
Before Width: | Height: | Size: 19 MiB After Width: | Height: | Size: 13 MiB |
BIN
GrafikaProjekt/pliki/textures/plant5.png
Normal file
After Width: | Height: | Size: 599 KiB |
Before Width: | Height: | Size: 147 KiB |
BIN
GrafikaProjekt/pliki/textures/rock.png
Normal file
After Width: | Height: | Size: 54 MiB |
BIN
GrafikaProjekt/pliki/textures/sub1.png
Normal file
After Width: | Height: | Size: 39 MiB |