aboutsummaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-02-12 12:22:56 +0100
committerraysan5 <raysan5@gmail.com>2016-02-12 12:22:56 +0100
commit823abf666e09e96ccbf5230c96f2d3a61ff60895 (patch)
tree2fc8e05491b466b1dd6855ef63038f691dfe7ed5 /src/rlgl.c
parent685273675bc9247e215c213939c017e506296a70 (diff)
downloadraylib-823abf666e09e96ccbf5230c96f2d3a61ff60895.tar.gz
raylib-823abf666e09e96ccbf5230c96f2d3a61ff60895.zip
Reviewed code TODOs
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 2ea06e1c..5f8a5ea1 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -171,7 +171,7 @@ typedef struct {
typedef struct {
GLuint textureId;
int vertexCount;
- // TODO: DrawState state -> Blending mode, shader
+ // TODO: Store draw state -> blending mode, shader
} DrawCall;
// pixel type (same as Color type)
@@ -1475,11 +1475,7 @@ void rlglDrawModel(Model model, Vector3 position, Vector3 rotationAxis, float ro
// Calculate model-view-projection matrix (MVP)
Matrix matMVP = MatrixMultiply(matModelView, matProjection); // Transform to screen-space coordinates
- // NOTE: Drawing in OpenGL 3.3+, matrices are passed to shader
- // TODO: Reduce number of matrices passed to shaders, use only matMVP
- //glUniformMatrix4fv(model.material.shader.modelLoc, 1, false, MatrixToFloat(matModel));
- //glUniformMatrix4fv(model.material.shader.viewLoc, 1, false, MatrixToFloat(matView));
-
+ // Send combined model-view-projection matrix to shader
glUniformMatrix4fv(model.shader.mvpLoc, 1, false, MatrixToFloat(matMVP));
// Apply color tinting to model
@@ -1900,7 +1896,7 @@ void rlglGenerateMipmaps(Texture2D texture)
int mipmapCount = GenerateMipmaps(data, texture.width, texture.height);
// TODO: Adjust mipmap size depending on texture format!
- int size = texture.width*texture.height*4;
+ int size = texture.width*texture.height*4; // RGBA 32bit only
int offset = size;
int mipWidth = texture.width/2;