Extended scissors
New variants for the "BeginScissorMode" acepting "Vector2" and "Rectangle"
This commit is contained in:
parent
51bf8d0820
commit
48d690d8ad
|
|
@ -1045,6 +1045,8 @@ RLAPI void EndShaderMode(void); // End custom
|
|||
RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied, subtract, custom)
|
||||
RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
|
||||
RLAPI void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
|
||||
RLAPI void BeginScissorModeV(Vector2 position, Vector2 size); // Begin scissor mode (define screen area for following drawing with vectors)
|
||||
RLAPI void BeginScissorModeRec(Rectangle rec); // Begin scissor mode (define screen area for following drawing with a rectangle)
|
||||
RLAPI void EndScissorMode(void); // End scissor mode
|
||||
RLAPI void BeginVrStereoMode(VrStereoConfig config); // Begin stereo rendering (requires VR simulator)
|
||||
RLAPI void EndVrStereoMode(void); // End stereo rendering (requires VR simulator)
|
||||
|
|
|
|||
10
src/rcore.c
10
src/rcore.c
|
|
@ -1137,6 +1137,16 @@ void BeginScissorMode(int x, int y, int width, int height)
|
|||
}
|
||||
}
|
||||
|
||||
void BeginScissorModeV(Vector2 position, Vector2 size)
|
||||
{
|
||||
BeginScissorMode((int)position.x, (int)position.y, (int)size.x, (int)size.y);
|
||||
}
|
||||
|
||||
void BeginScissorModeRec(Rectangle rec)
|
||||
{
|
||||
BeginScissorMode((int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height);
|
||||
}
|
||||
|
||||
// End scissor mode
|
||||
void EndScissorMode(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user