changed plants

This commit is contained in:
OutsiderAK 2022-02-11 10:34:24 +01:00
parent 33d04e79f6
commit 13f1200958
40 changed files with 48 additions and 21 deletions

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\Adam\Desktop\graf\grafika\Debug\grk-cw2.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

BIN
cw 6/Debug/PhysxObject.obj Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\Adam\Desktop\graf\grafika\Debug\grk-cw6.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

Binary file not shown.

Binary file not shown.

View File

@ -32,7 +32,7 @@ Core::RenderContext sphereContext;
Core::RenderContext groundContext;
Core::RenderContext plantContext;
Core::RenderContext plant2Context;
Core::RenderContext geyserContext;
@ -74,7 +74,7 @@ float prevY = 0;
int score = 0;
int prevTimeDEBUG;
GLuint orcaTexture, orcaNormal, plantTexture, plantTextureNormal, groundTexture, groundNormal;
GLuint orcaTexture, orcaNormal, plantTexture, plant2TextureNormal, plant2Texture, groundTexture, groundNormal;
static PxFilterFlags simulationFilterShader(PxFilterObjectAttributes attributes0,
PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1,
@ -472,20 +472,22 @@ void drawFish(float time)
}
void drawSeaweed() {
//drawObjectTexture(plantContext, glm::translate(glm::vec3(2, -8, 4)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(9, -8, 6)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(1, -8, 0)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(-7, -6, 5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(-5, -6, -5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(-1, -8, 9)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(2, -7, 6)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(10, -7, 5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(-4, -7, 9)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTexture(plantContext, glm::translate(glm::vec3(1, -7, 9)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
//drawObjectTextureWithNormal(plantContext, glm::translate(glm::vec3(8, -6, 8)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture, plantTextureNormal);
//drawObjectTextureWithNormal(plantContext, glm::translate(glm::vec3(0, -6, 0)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture, plantTextureNormal);
drawObjectTexture(plantContext, glm::translate(glm::vec3(0, -6, 2)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(0, -6, 2)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.5f)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(2, -3, 4)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(9, -3, 6)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(1, -3, 0)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(-7, -3, 5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(-5, -3, -5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(-1, -3, 9)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(2, -4, 6)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(10, -3, 5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTexture(plantContext, glm::translate(glm::vec3(-4, -3, 9)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(2)), plantTexture);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(3.8 , -4, -1)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(-1.06, -4.09, 3.29)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(-0.8, -3.99, -2.5)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(-2.76, -4.29, -8.24)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(4.5, -4.19, -7.59)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(7.38, -3.89, -4.59)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
drawObjectTextureWithNormal(plant2Context, glm::translate(glm::vec3(-3.01, -2.4, -6.8)) * glm::rotate(glm::radians(0.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.07f)), plant2Texture, plant2TextureNormal);
}
@ -524,7 +526,7 @@ void renderScene()
handleAllParticleSources(cameraPos, programParticles, cameraSide, cameraVertical, cameraMatrix, perspectiveMatrix);
drawFish(time);
drawObjectTextureWithNormal(renderables.back().context, renderables.back().physicsTransform * renderables.back().localTransform, renderables.back().textureId, renderables.back().normalId);
drawObjectTextureWithNormal(groundContext, glm::translate(glm::vec3(0, 2, 0)) * glm::rotate(glm::radians(-90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(50)), groundTexture, groundNormal);
drawObjectTextureWithNormal(groundContext, glm::translate(glm::vec3(0, 5, 0)) * glm::rotate(glm::radians(-90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(50)), groundTexture, groundNormal);
drawSeaweed();
@ -581,8 +583,11 @@ void init()
loadModelToContext("models/terobj.obj", groundContext);
loadModelToContext("models/plant1.obj", plantContext);
loadModelToContext("models/plant2.obj", plant2Context);
plantTexture = Core::LoadTexture("textures/plant1.png");
plantTextureNormal = Core::LoadTexture("textures/plant2_normal.jpg");
plant2Texture = Core::LoadTexture("textures/plant2.jpg");
plant2TextureNormal = Core::LoadTexture("textures/plant2_normal.jpg");
orcaTexture = Core::LoadTexture("textures/Orca_Diffuse.jpg");
orcaNormal = Core::LoadTexture("textures/orca_normal.jpg");
@ -593,9 +598,9 @@ void init()
initBubbles(150);
initFish(150);
initParticles();
addParticleSource(glm::vec3(0, -7, 0), 300.0f, 1.0f);
addParticleSource(glm::vec3(4, -6.5, 2), 200.0f, 0.5f);
addParticleSource(glm::vec3(10, -6.5, 4), 200.0f, 0.5f);
addParticleSource(glm::vec3(0, -4, 0), 300.0f, 1.0f);
addParticleSource(glm::vec3(4, -3.5, 2), 200.0f, 0.5f);
addParticleSource(glm::vec3(10, -3.5, 4), 200.0f, 0.5f);
initRenderables();
initPhysicsScene();
}

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.