summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-07-21 09:34:09 +0200
committerraysan5 <[email protected]>2017-07-21 09:34:09 +0200
commit2679c4ae9b2fefdb0c150a7cd576d5d3297b027b (patch)
tree31f026ec3d4a0f3a49ecddaa5d9431b61b56de7f /src/rlgl.c
parent63fd96354e7ceffcdf292a1aac6d564dc694377c (diff)
downloadraylib-2679c4ae9b2fefdb0c150a7cd576d5d3297b027b.tar.gz
raylib-2679c4ae9b2fefdb0c150a7cd576d5d3297b027b.zip
Review mesh loading and textures generation
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c12
1 files changed, 4 insertions, 8 deletions
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;