diff --git a/grk/cw 6/src/Planet.hpp b/grk/cw 6/src/Planet.hpp index 00e183d..52a2d21 100644 --- a/grk/cw 6/src/Planet.hpp +++ b/grk/cw 6/src/Planet.hpp @@ -28,13 +28,14 @@ Core::Shader_Loader shaderLoader; Core::RenderContext sphereContext; Core::RenderContext cubeContext; -const char* const planetTexPaths[] = { "./textures/planets/mercury.png", "./textures/planets/venus.jpg", "./textures/planets/earth.jpg", "./textures/planets/mars.jpg", +const char* const planetTexPaths[] = { "./textures/planets/rocky.jpg", "./textures/planets/mercury.png", "./textures/planets/venus.jpg", "./textures/planets/earth.jpg", "./textures/planets/mars.jpg", "./textures/planets/jupiter.jpg", "./textures/planets/saturn.jpg", "./textures/planets/uranus.jpg", "./textures/planets/neptune.jpg", "./textures/planets/icy.png", "./textures/planets/volcanic.png", "./textures/planets/desert.png", "./textures/planets/tropical.png", "./textures/planets/toxic.jpg", "./textures/planets/swamp.png", "./textures/planets/savannah.png", "./textures/planets/alpine.png", "./textures/planets/ceres.jpg", "./textures/planets/eris.jpg", "./textures/planets/haumea.jpg", "./textures/planets/makemake.jpg" }; int planetTexIndex = 80; GLuint planetTex; +GLuint planetRock; glm::vec3 planetPos = glm::vec3(0.f, 0.f, 0.f); float planetSize = 0.005f; @@ -353,10 +354,12 @@ void renderScene(GLFWwindow* window) { glm::mat4 planetRotate = glm::rotate(time * planetRot, glm::vec3(0, 1, 0)); glm::mat4 planetTranslate = glm::translate(planetPos); - if (lightingCheck) + /*if (lightingCheck) drawPlanetPbr(sphereContext, planetTranslate * planetRotate * planetScale, planetTex); else - drawPlanetTex(sphereContext, planetTranslate * planetRotate * planetScale, planetTex); + drawPlanetTex(sphereContext, planetTranslate * planetRotate * planetScale, planetTex);*/ + + drawPlanetTex(sphereContext, planetTranslate * planetRotate * planetScale, planetRock); //rysowanie słońca glm::mat4 sunScale = glm::scale(glm::vec3(sunSize)); @@ -539,9 +542,11 @@ void init(GLFWwindow* window) { loadModelToContext("./models/sphere.obj", sphereContext); loadModelToContext("./models/cube.obj", cubeContext); - planetTex = Core::LoadTexture(planetTexPaths[std::abs(planetTexIndex % 20)]); + planetTex = Core::LoadTexture(planetTexPaths[std::abs(planetTexIndex % 21)]); sunTex = Core::LoadTexture(sunTexPaths[std::abs(sunTexIndex % 5)]); + planetRock = Core::LoadTexture("textures/planets/normalne/rocky.jpg"); + skyBoxTex = Core::LoadSkyBox(skyBoxPaths); blurPingPong(window); diff --git a/grk/cw 6/textures/planets/rocky.jpg b/grk/cw 6/textures/planets/rocky.jpg new file mode 100644 index 0000000..4242840 Binary files /dev/null and b/grk/cw 6/textures/planets/rocky.jpg differ