zaczątki
This commit is contained in:
parent
89306aaf25
commit
3a8fa5ae83
@ -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);
|
||||
|
BIN
grk/cw 6/textures/planets/rocky.jpg
Normal file
BIN
grk/cw 6/textures/planets/rocky.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 KiB |
Loading…
Reference in New Issue
Block a user