浏览代码

added possibility to get modelview matrix from rlgl to be able to send it to shaders

pull/420/head
user 7 年前
父节点
当前提交
963551ee6e
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. +6
    -0
      src/rlgl.c
  2. +2
    -0
      src/rlgl.h

+ 6
- 0
src/rlgl.c 查看文件

@ -2539,6 +2539,12 @@ void SetMatrixModelview(Matrix view)
#endif
}
Matrix GetMatrixModelview() {
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
return modelview;
#endif
}
// 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)

+ 2
- 0
src/rlgl.h 查看文件

@ -461,6 +461,8 @@ void SetShaderValuei(Shader shader, int uniformLoc, const int *value, int size);
void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
void SetMatrixProjection(Matrix proj); // Set a custom projection matrix (replaces internal projection matrix)
void SetMatrixModelview(Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix)
Matrix GetMatrixModelview();
// Texture maps generation (PBR)
// NOTE: Required shaders should be provided

正在加载...
取消
保存