mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-16 23:18:12 +08:00
修改后的天空盒
This commit is contained in:
parent
fe28e220ea
commit
15bcb698bd
@ -110,7 +110,7 @@ void SceneViewer::paintGL() {
|
||||
glm::mat4 view = _camera.viewMatrix();
|
||||
glm::mat4 projection = glm::perspective(glm::radians(_camera.zoomVal()), (float)width() / (float)height(), 0.1f, 100.0f);
|
||||
Model = glm::translate(Model, glm::vec3(0.0f, -5.0f, 0.0f));
|
||||
Model = glm::scale(Model, glm::vec3(10.0f));
|
||||
Model = glm::scale(Model, glm::vec3(100.0f));
|
||||
terrainShader.setUniform("view", view);
|
||||
terrainShader.setUniform("projection", projection);
|
||||
terrainShader.setUniform("model", Model);
|
||||
|
||||
@ -11,8 +11,8 @@ skybox::skybox(std::string path){
|
||||
faces.clear();
|
||||
faces.push_back(path + "/right.jpg");
|
||||
faces.push_back(path + "/left.jpg");
|
||||
faces.push_back(path + "/bottom.jpg");
|
||||
faces.push_back(path + "/top.jpg");
|
||||
faces.push_back(path + "/bottom.jpg");
|
||||
faces.push_back(path + "/front.jpg");
|
||||
faces.push_back(path + "/back.jpg");
|
||||
|
||||
@ -43,7 +43,8 @@ unsigned int skybox::loadCubemap(std::vector<std::string> faces)
|
||||
unsigned int textureID;
|
||||
OPENGL_FUNCTIONS->glGenTextures(1, &textureID);
|
||||
OPENGL_FUNCTIONS->glBindTexture(GL_TEXTURE_CUBE_MAP, textureID);
|
||||
stbi_set_flip_vertically_on_load(true);
|
||||
|
||||
stbi_set_flip_vertically_on_load(false);
|
||||
|
||||
int width, height, nrChannels;
|
||||
for (unsigned int i = 0; i < faces.size(); i++)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user