rypa sie rusza
This commit is contained in:
parent
6d88acb98d
commit
da65e81fa7
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.
@ -2,7 +2,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ProjectOutputs>
|
<ProjectOutputs>
|
||||||
<ProjectOutput>
|
<ProjectOutput>
|
||||||
<FullPath>C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\Debug\grk-cw6.exe</FullPath>
|
<FullPath>C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\Debug\grk-cw6.exe</FullPath>
|
||||||
</ProjectOutput>
|
</ProjectOutput>
|
||||||
</ProjectOutputs>
|
</ProjectOutputs>
|
||||||
<ContentFiles />
|
<ContentFiles />
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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\Tomek\source\repos\Grafika\GrafikaProjekt\|
|
Debug|Win32|C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
main.cpp
|
main.cpp
|
||||||
C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\pliki\src\main.cpp(329,12): warning C4244: "argument": konwersja z "time_t" do "unsigned int", możliwa utrata danych
|
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
|
||||||
Camera.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
|
Camera.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
|
||||||
projekt.vcxproj -> C:\Users\Tomek\source\repos\Grafika\GrafikaProjekt\Debug\grk-cw6.exe
|
projekt.vcxproj -> C:\Users\luksli\Desktop\GrafikaProjekt\GrafikaProjekt\Debug\grk-cw6.exe
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -83,13 +83,13 @@ float skyboxVertices[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
glm::vec3 cameraPos = glm::vec3(0, 0, 5);
|
glm::vec3 cameraPos = glm::vec3(0, 0, 5);
|
||||||
glm::vec3 cameraDir; // Wektor "do przodu" kamery
|
glm::vec3 cameraDir;
|
||||||
glm::vec3 cameraSide; // Wektor "w bok" kamery
|
glm::vec3 cameraSide;
|
||||||
glm::vec3 cameraUp;
|
glm::vec3 cameraUp;
|
||||||
float cameraAngle = 0;
|
float cameraAngle = 0;
|
||||||
|
|
||||||
int lastMouseX, lastMouseY, mouseX, mouseY;
|
int lastMouseX, lastMouseY, mouseX, mouseY;
|
||||||
int rypa = 0;
|
int fishMovement = 0;
|
||||||
unsigned int cubemapTexture;
|
unsigned int cubemapTexture;
|
||||||
|
|
||||||
glm::mat4 cameraMatrix, perspectiveMatrix;
|
glm::mat4 cameraMatrix, perspectiveMatrix;
|
||||||
@ -284,6 +284,14 @@ void createRockFlora()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void moveFish()
|
||||||
|
{
|
||||||
|
fishMovement = (fishMovement + 1) % 39;
|
||||||
|
|
||||||
|
drawObjectTexture(fish1Context, glm::translate(glm::vec3(0, 0, 0)), 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);
|
||||||
|
}
|
||||||
|
|
||||||
void renderScene()
|
void renderScene()
|
||||||
{
|
{
|
||||||
// Aktualizacja macierzy widoku i rzutowania
|
// Aktualizacja macierzy widoku i rzutowania
|
||||||
@ -301,14 +309,12 @@ void renderScene()
|
|||||||
|
|
||||||
drawObjectTexture(shipContext, shipModelMatrix, textureSubmarine);
|
drawObjectTexture(shipContext, shipModelMatrix, textureSubmarine);
|
||||||
drawObjectTexture(sphereContext, glm::translate(glm::vec3(0, -1.2, 0)), textureAsteroid);
|
drawObjectTexture(sphereContext, glm::translate(glm::vec3(0, -1.2, 0)), textureAsteroid);
|
||||||
drawObjectTexture(fish1Context, glm::translate(glm::vec3(0, 0, 0)), textureFish1);
|
drawObjectTexture(smiglo, shipModelMatrix * glm::translate(glm::vec3(0, -0.3, -1)) * glm::rotate(glm::degrees((float)fishMovement), glm::vec3(0, 0, 1)), textureSmiglo);
|
||||||
rypa = (rypa + 1) % 360;
|
|
||||||
drawObjectTexture(fish2Context, glm::rotate(glm::degrees((float)rypa / (float)360), glm::vec3(0, -1, 0)) * glm::translate(glm::vec3(1, 0, (float)rypa/(float)360)), textureFish2);
|
|
||||||
drawObjectTexture(smiglo, shipModelMatrix * glm::translate(glm::vec3(0, -0.3, -1)) * glm::rotate(glm::degrees((float)rypa), glm::vec3(0, 0, 1)), textureSmiglo);
|
|
||||||
drawObjectTexture(cave, glm::translate(glm::vec3(0, -0.6, 0)), textureAsteroid);
|
drawObjectTexture(cave, glm::translate(glm::vec3(0, -0.6, 0)), textureAsteroid);
|
||||||
|
|
||||||
createFlora();
|
createFlora();
|
||||||
createRockFlora();
|
createRockFlora();
|
||||||
|
moveFish();
|
||||||
|
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user