ADDED: SetShaderValueTexture()

Some tweaks
This commit is contained in:
Ray
2019-04-05 17:08:46 +02:00
parent c600dd0766
commit 9282b8ba83
3 changed files with 22 additions and 4 deletions

View File

@@ -207,8 +207,8 @@ typedef unsigned char byte;
// Animation vertex data
float *animVertices; // Animated vertex positions (after bones transformations)
float *animNormals; // Animated normals (after bones transformations)
float *weightBias; // Vertex weight bias
int *weightId; // Vertex weight id
int *boneIds; // Vertex bone ids, up to 4 bones influence by vertex (skinning)
float *boneWeights; // Vertex bone weight, up to 4 bones influence by vertex (skinning)
// OpenGL identifiers
unsigned int vaoId; // OpenGL Vertex Array Object id
@@ -3169,6 +3169,18 @@ void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
#endif
}
// Set shader uniform value for texture
void SetShaderValueTexture(Shader shader, int uniformLoc, Texture2D texture)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
glUseProgram(shader.id);
glUniform1i(uniformLoc, texture.id);
//glUseProgram(0);
#endif
}
// Set a custom projection matrix (replaces internal projection matrix)
void SetMatrixProjection(Matrix proj)
{