From 2679c4ae9b2fefdb0c150a7cd576d5d3297b027b Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 21 Jul 2017 09:34:09 +0200 Subject: Review mesh loading and textures generation --- src/rlgl.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/rlgl.c') diff --git a/src/rlgl.c b/src/rlgl.c index 44b20b61..3160c744 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -2520,10 +2520,7 @@ Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size) Texture2D cubemap = { 0 }; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // NOTE: SetShaderDefaultLocations() already setups locations for projection and view Matrix in shader - // TODO: Locations should be taken out of this function... too shader dependant... - SetShaderValuei(shader, GetShaderLocation(shader, "environmentMap"), (int[1]){ 0 }, 1); - - SetShaderValuei(shader, texmapLoc, (int[1]){ 0 }, 1); // Set default active texture to 0 + // Other locations should be setup externally in shader before calling the function // Set up depth face culling and cubemap seamless glDisable(GL_CULL_FACE); @@ -2600,8 +2597,7 @@ Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size) #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // NOTE: SetShaderDefaultLocations() already setups locations for projection and view Matrix in shader - // TODO: Locations should be taken out of this function... too shader dependant... - SetShaderValuei(shader, GetShaderLocation(shader, "environmentMap"), (int[1]){ 0 }, 1); + // Other locations should be setup externally in shader before calling the function // Setup framebuffer unsigned int fbo, rbo; @@ -2672,9 +2668,9 @@ Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size) #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // NOTE: SetShaderDefaultLocations() already setups locations for projection and view Matrix in shader + // Other locations should be setup externally in shader before calling the function // TODO: Locations should be taken out of this function... too shader dependant... - int roughnessLoc = GetShaderLocation(shader, "roughness"); - SetShaderValuei(shader, GetShaderLocation(shader, "environmentMap"), (int[1]){ 0 }, 1); + int roughnessLoc = GetShaderLocation(shader, "roughness"); // Setup framebuffer unsigned int fbo, rbo; -- cgit v1.2.3