Pārlūkot izejas kodu

GenTextureCubemap(): renamed parameter

pull/1057/head
raysan5 pirms 5 gadiem
vecāks
revīzija
350cb0a8a8
2 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +1
    -1
      src/raylib.h
  2. +3
    -3
      src/rlgl.h

+ 1
- 1
src/raylib.h Parādīt failu

@ -1331,7 +1331,7 @@ RLAPI Matrix GetMatrixProjection(void); // Get
// Texture maps generation (PBR)
// NOTE: Required shaders should be provided
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from mi">2D texture
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture

+ 3
- 3
src/rlgl.h Parādīt failu

@ -537,7 +537,7 @@ RLAPI Matrix GetMatrixModelview(void); // Get
// Texture maps generation (PBR)
// NOTE: Required shaders should be provided
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size); // Generate cubemap texture from HDR texture
RLAPI Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size); // Generate cubemap texture from HDR texture
RLAPI Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size); // Generate irradiance texture using cubemap data
RLAPI Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size); // Generate prefilter texture using cubemap data
RLAPI Texture2D GenTextureBRDF(Shader shader, int size); // Generate BRDF texture using cubemap data
@ -3219,7 +3219,7 @@ Matrix GetMatrixModelview(void)
// Generate cubemap texture from HDR texture
// TODO: OpenGL ES 2.0 does not support GL_RGB16F texture format, neither GL_DEPTH_COMPONENT24
Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size)
Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size)
{
Texture2D cubemap = { 0 };
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
@ -3280,7 +3280,7 @@ Texture2D GenTextureCubemap(Shader shader, Texture2D skyHDR, int size)
// Convert HDR equirectangular environment map to cubemap equivalent
glUseProgram(shader.id);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, skyHDR.id);
glBindTexture(GL_TEXTURE_2D, map.id);
SetShaderValueMatrix(shader, shader.locs[LOC_MATRIX_PROJECTION], fboProjection);
// Note: don't forget to configure the viewport to the capture dimensions

Notiek ielāde…
Atcelt
Saglabāt