aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-12-14 23:30:27 +0100
committerraysan5 <raysan5@gmail.com>2015-12-14 23:30:27 +0100
commit1b39b2e2612dfd7613e3bfb6948e8d27472ab8c1 (patch)
tree3825083eca580ef400903e724650ff4b94186ad8 /src/core.c
parentf144b6bae43465a62a45f8e45ab2099f215664dc (diff)
downloadraylib-1b39b2e2612dfd7613e3bfb6948e8d27472ab8c1.tar.gz
raylib-1b39b2e2612dfd7613e3bfb6948e8d27472ab8c1.zip
Added BeginDrawingEx()
BeginDrawing() function with extended parameters
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index b2d94506..3fc8b47d 100644
--- a/src/core.c
+++ b/src/core.c
@@ -510,6 +510,17 @@ void BeginDrawing(void)
// NOTE: Not required with OpenGL 3.3+
}
+// Setup drawing canvas with extended parameters
+void BeginDrawingEx(int blendMode, Shader shader, Matrix transform)
+{
+ BeginDrawing();
+
+ SetBlendMode(blendMode);
+ SetPostproShader(shader);
+
+ rlMultMatrixf(GetMatrixVector(transform));
+}
+
// End canvas drawing and Swap Buffers (Double Buffering)
void EndDrawing(void)
{
@@ -1097,7 +1108,7 @@ static void InitDisplay(int width, int height)
if (fullscreen)
{
// At this point we need to manage render size vs screen size
- // NOTE: This function use and modify global module variables: screenWidth/screenHeight and renderWidth/renderHeight and downscaleView
+ // NOTE: This function uses and modifies global module variables: screenWidth/screenHeight and renderWidth/renderHeight and downscaleView
SetupFramebufferSize(displayWidth, displayHeight);
window = glfwCreateWindow(renderWidth, renderHeight, windowTitle, glfwGetPrimaryMonitor(), NULL);