Преглед изворни кода

REVIEWED: GenTexture*() functions #721

Avoid RLGL data dependency to allow moving the functions somewhere else
pull/1697/head
raysan5 пре 3 година
родитељ
комит
67dda62867
1 измењених фајлова са 5 додато и 6 уклоњено
  1. +5
    -6
      src/rlgl.h

+ 5
- 6
src/rlgl.h Прегледај датотеку

@ -3700,7 +3700,7 @@ TextureCubemap rlGenTextureCubemap(Shader shader, Texture2D panorama, int size,
rlUnloadFramebuffer(fbo); // Unload framebuffer (and automatically attached depth texture/renderbuffer)
// Reset viewport dimensions to default
rlViewport(0, 0, RLGL.State.framebufferWidth, RLGL.State.framebufferHeight);
rlViewport(0, 0, rlGetFramebufferWidth(), rlGetFramebufferHeight());
rlEnableBackfaceCulling();
//------------------------------------------------------------------------------------------
@ -3773,7 +3773,7 @@ TextureCubemap rlGenTextureIrradiance(Shader shader, TextureCubemap cubemap, int
rlUnloadFramebuffer(fbo); // Unload framebuffer (and automatically attached depth texture/renderbuffer)
// Reset viewport dimensions to default
rlViewport(0, 0, RLGL.State.framebufferWidth, RLGL.State.framebufferHeight);
rlViewport(0, 0, rlGetFramebufferWidth(), rlGetFramebufferHeight());
rlEnableBackfaceCulling();
//------------------------------------------------------------------------------------------
@ -3848,7 +3848,7 @@ TextureCubemap rlGenTexturePrefilter(Shader shader, TextureCubemap cubemap, int
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, mipWidth, mipHeight);
float roughness = (float)mip/(float)(MAX_MIPMAP_LEVELS - 1);
glUniform1f(roughnessLoc, roughness);
rlSetUniform(roughnessLoc, o">&roughness, SHADER_UNIFORM_FLOAT);
for (int i = 0; i < 6; i++)
{
@ -3872,7 +3872,7 @@ TextureCubemap rlGenTexturePrefilter(Shader shader, TextureCubemap cubemap, int
rlUnloadFramebuffer(fbo); // Unload framebuffer (and automatically attached depth texture/renderbuffer)
// Reset viewport dimensions to default
rlViewport(0, 0, RLGL.State.framebufferWidth, RLGL.State.framebufferHeight);
rlViewport(0, 0, rlGetFramebufferWidth(), rlGetFramebufferHeight());
rlEnableBackfaceCulling();
//------------------------------------------------------------------------------------------
@ -3903,7 +3903,6 @@ Texture2D rlGenTextureBRDF(Shader shader, int size)
// STEP 2: Draw to framebuffer
//------------------------------------------------------------------------------------------
// NOTE: Render BRDF LUT into a quad using FBO
rlEnableShader(shader.id);
rlViewport(0, 0, size, size);
@ -3921,7 +3920,7 @@ Texture2D rlGenTextureBRDF(Shader shader, int size)
rlUnloadFramebuffer(fbo); // Unload framebuffer (and automatically attached depth texture/renderbuffer)
// Reset viewport dimensions to default
rlViewport(0, 0, RLGL.State.framebufferWidth, RLGL.State.framebufferHeight);
rlViewport(0, 0, rlGetFramebufferWidth(), rlGetFramebufferHeight());
//------------------------------------------------------------------------------------------
brdf.width = size;

Loading…
Откажи
Сачувај