Added method allowing external OpenGL rendering on-top of raylib
This commit is contained in:
parent
4c0f359eb2
commit
2e4c07c9c4
11
src/core.c
11
src/core.c
|
|
@ -1263,7 +1263,7 @@ void BeginDrawing(void)
|
|||
}
|
||||
|
||||
// End canvas drawing and swap buffers (double buffering)
|
||||
void EndDrawing(void)
|
||||
void EndDrawingEx(void(*fn)())
|
||||
{
|
||||
#if defined(PLATFORM_RPI) && defined(SUPPORT_MOUSE_CURSOR_RPI)
|
||||
// On RPI native mode we have no system mouse cursor, so,
|
||||
|
|
@ -1273,6 +1273,9 @@ void EndDrawing(void)
|
|||
|
||||
rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
|
||||
|
||||
if (fn != NULL)
|
||||
fn();
|
||||
|
||||
#if defined(SUPPORT_GIF_RECORDING)
|
||||
#define GIF_RECORD_FRAMERATE 10
|
||||
|
||||
|
|
@ -1324,6 +1327,12 @@ void EndDrawing(void)
|
|||
}
|
||||
}
|
||||
|
||||
// End canvas drawing and swap buffers (double buffering)
|
||||
void EndDrawing()
|
||||
{
|
||||
return EndDrawingEx(NULL);
|
||||
}
|
||||
|
||||
// Initialize 2D mode with custom camera (2D)
|
||||
void BeginMode2D(Camera2D camera)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -909,7 +909,8 @@ RLAPI void DisableCursor(void); // Disables cu
|
|||
// Drawing-related functions
|
||||
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
||||
RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing
|
||||
RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering)
|
||||
RLAPI void EndDrawingEx(void(*fn)()); // End canvas drawing and swap buffers (double buffering). This method adds a spot for additional rendering on-top of Raylib render.
|
||||
RLAPI void EndDrawing(); // End canvas drawing and swap buffers (double buffering)
|
||||
RLAPI void BeginMode2D(Camera2D camera); // Initialize 2D mode with custom camera (2D)
|
||||
RLAPI void EndMode2D(void); // Ends 2D mode with custom camera
|
||||
RLAPI void BeginMode3D(Camera3D camera); // Initializes 3D mode with custom camera (3D)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user