summaryrefslogtreecommitdiffhomepage
path: root/src/textures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-25 14:28:12 +0100
committerRay <[email protected]>2021-03-25 14:28:12 +0100
commitcba412cc313e4f95eafb3fba9303400e65c98984 (patch)
tree672a1ae3117e96210cd4d43801748799f5740eea /src/textures.c
parent9569d6a802a2230c92503456d544a5470a59d5cf (diff)
downloadraylib-cba412cc313e4f95eafb3fba9303400e65c98984.tar.gz
raylib-cba412cc313e4f95eafb3fba9303400e65c98984.zip
WARNING: BREAKING: rlgl redesign -WIP-
rlgl module has been completely redesigned to move Mesh/Material structures to [models] module. Still some work to do, broken elements: - [models] OpenGL 1.1 mesh rendering: DrawMesh() - [models] Mesh Instancing: DrawMeshInstanced() - [models] Stereo rendering: DrawMesh() - [models] GL_FLOAT, GL_UNSIGNED_INT exposed - [models] GenMeshCustom() - [rlgl] GenTexture*() functions removal?
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/textures.c b/src/textures.c
index 61e6f30b..0e61edc2 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -3243,7 +3243,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
bottomRight.y = y + (dx + dest.width)*sinRotation + (dy + dest.height)*cosRotation;
}
- rlEnableTexture(texture.id);
+ rlSetTexture(texture.id);
rlBegin(RL_QUADS);
rlColor4ub(tint.r, tint.g, tint.b, tint.a);
@@ -3270,7 +3270,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
rlVertex2f(topRight.x, topRight.y);
rlEnd();
- rlDisableTexture();
+ rlSetTexture(0);
// NOTE: Vertex position can be transformed using matrices
// but the process is way more costly than just calculating
@@ -3278,7 +3278,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
// I leave here the old implementation for educational pourposes,
// just in case someone wants to do some performance test
/*
- rlEnableTexture(texture.id);
+ rlSetTexture(texture.id);
rlPushMatrix();
rlTranslatef(dest.x, dest.y, 0.0f);
if (rotation != 0.0f) rlRotatef(rotation, 0.0f, 0.0f, 1.0f);
@@ -3309,7 +3309,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
rlVertex2f(dest.width, 0.0f);
rlEnd();
rlPopMatrix();
- rlDisableTexture();
+ rlSetTexture(0);
*/
}
}
@@ -3372,7 +3372,7 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
coordD.x = (nPatchInfo.source.x + nPatchInfo.source.width)/width;
coordD.y = (nPatchInfo.source.y + nPatchInfo.source.height)/height;
- rlEnableTexture(texture.id);
+ rlSetTexture(texture.id);
rlPushMatrix();
rlTranslatef(dest.x, dest.y, 0.0f);
@@ -3506,7 +3506,7 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
rlEnd();
rlPopMatrix();
- rlDisableTexture();
+ rlSetTexture(0);
}
}