więcej rybek

This commit is contained in:
Tomasz Kaczmarek 2022-02-10 22:20:23 +01:00
parent da65e81fa7
commit 630a603e72
27 changed files with 2545 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<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>
</ProjectOutputs>
<ContentFiles />

View File

@ -1,2 +1,2 @@
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\|

Binary file not shown.

View File

@ -1,4 +1,4 @@
 main.cpp
C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\pliki\src\main.cpp(337,12): warning C4244: "argument": konwersja z "time_t" do "unsigned int", możliwa utrata danych
C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\pliki\src\main.cpp(347,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
projekt.vcxproj -> C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\Debug\grk-cw6.exe

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,13 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl 07___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
map_Kd C:\\Users\\Tomek\\Dropbox\\Komputer\\Desktop\\bigfish.jpg

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl 13___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
map_Kd C:\\Users\\Tomek\\Dropbox\\Komputer\\Desktop\\clownfish.jpg

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ Core::RenderContext fish3Context;
Core::RenderContext fish4Context;
Core::RenderContext fish5Context;
Core::RenderContext fish6Context;
Core::RenderContext bigfishContext;
Core::RenderContext clownfishContext;
Core::RenderContext plant1;
Core::RenderContext plant3;
@ -105,6 +106,7 @@ GLuint textureSubmarine;
GLuint textureFish1;
GLuint textureFish2;
GLuint textureclownFish;
GLuint texturebigFish;
GLuint texturePlant1;
GLuint texturePlant3;
GLuint texturePlant4;
@ -288,8 +290,16 @@ void moveFish()
{
fishMovement = (fishMovement + 1) % 39;
drawObjectTexture(fish1Context, glm::translate(glm::vec3(0, 0, 0)), textureFish1);
//drawObjectTexture(fish1Context,glm::translate(glm::vec3(0,2,2)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 2, (float)fishMovement / (float)360)), textureFish1);
drawObjectTexture(fish2Context, glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 2, (float)fishMovement / (float)360)), textureFish2);
//clownfish
drawObjectTexture(clownfishContext, glm::translate(glm::vec3(-0.1, -1, -0.5)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 2, (float)fishMovement / (float)360)), textureclownFish);
drawObjectTexture(clownfishContext, glm::translate(glm::vec3(0, -1, -0.3)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(0.2, 2, (float)fishMovement / (float)360)), textureclownFish);
drawObjectTexture(clownfishContext, glm::translate(glm::vec3(0.05, -1, -0.2)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(0.5, 2, (float)fishMovement / (float)360)), textureclownFish);
drawObjectTexture(clownfishContext, glm::translate(glm::vec3(0, -0.80, -0.1)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(0.75, 2, (float)fishMovement / (float)360)), textureclownFish);
drawObjectTexture(clownfishContext, glm::translate(glm::vec3(0, -1.2, -0.5)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 2, (float)fishMovement / (float)360)), textureclownFish);
drawObjectTexture(bigfishContext, glm::translate(glm::vec3(1, 0, 2.5)) * glm::rotate(glm::degrees((float)fishMovement / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 2, (float)fishMovement / (float)360)), texturebigFish);
}
void renderScene()
@ -351,7 +361,8 @@ void init()
loadModelToContext("models/teren1.obj", sphereContext);
loadModelToContext("models/fish1.obj", fish1Context);
loadModelToContext("models/fish4.obj", fish2Context);
loadModelToContext("models/fish13.obj", clownfishContext);
loadModelToContext("models/clownfish.obj", clownfishContext);
loadModelToContext("models/bigfish.obj", bigfishContext);
loadModelToContext("models/roslina2.obj", plant1);
loadModelToContext("models/roslina3.obj", plant3);
loadModelToContext("models/smiglo.obj", smiglo);
@ -365,6 +376,7 @@ void init()
textureFish1 = Core::LoadTexture("textures/scale.png");
textureFish2 = Core::LoadTexture("textures/scale2.png");
textureclownFish = Core::LoadTexture("textures/clownfish.png");
texturebigFish = Core::LoadTexture("textures/bigfish.png");
texturePlant1 = Core::LoadTexture("textures/plant.png");
texturePlant3 = Core::LoadTexture("textures/plant3.png");
textureSmiglo = Core::LoadTexture("textures/metal.png");
@ -398,7 +410,7 @@ int main(int argc, char ** argv)
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(200, 0);
glutInitWindowSize(600, 600);
glutCreateWindow("OpenGL Pierwszy Program");
glutCreateWindow("Scena podwodna");
glewInit();
init();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB