Pārlūkot izejas kodu

RENAMED: `SwapBuffers()` -> `SwapScreenBuffer()`

Avoid possible symbol collisions
Ray 4 gadi atpakaļ
vecāks
revīzija
e07054d0d4
3 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. 1 1
      src/config.h
  2. 2 2
      src/core.c
  3. 2 2
      src/raylib.h

+ 1 - 1
src/config.h

@@ -58,7 +58,7 @@
 // Support automatic generated events, loading and recording of those events when required
 // Support automatic generated events, loading and recording of those events when required
 #define SUPPORT_EVENTS_AUTOMATION     1
 #define SUPPORT_EVENTS_AUTOMATION     1
 // Support custom frame control, only for advance users
 // Support custom frame control, only for advance users
-// By default EndDrawing() does this job: draws everything + SwapBuffers() + manage frame timming + PollInputEvents()
+// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
 // Enabling this flag allows manual control of the frame processes, use at your own risk
 // Enabling this flag allows manual control of the frame processes, use at your own risk
 //#define SUPPORT_CUSTOM_FRAME_CONTROL   1
 //#define SUPPORT_CUSTOM_FRAME_CONTROL   1
 
 

+ 2 - 2
src/core.c

@@ -2014,7 +2014,7 @@ void EndDrawing(void)
 #endif
 #endif
 
 
 #if !defined(SUPPORT_CUSTOM_FRAME_CONTROL)
 #if !defined(SUPPORT_CUSTOM_FRAME_CONTROL)
-    SwapBuffers();                  // Copy back buffer to front buffer (screen)
+    SwapScreenBuffer();                  // Copy back buffer to front buffer (screen)
     
     
     // Frame time control system
     // Frame time control system
     CORE.Time.current = GetTime();
     CORE.Time.current = GetTime();
@@ -4735,7 +4735,7 @@ void WaitTime(float ms)
 }
 }
 
 
 // Swap back buffer with front buffer (screen drawing)
 // Swap back buffer with front buffer (screen drawing)
-void SwapBuffers(void)
+void SwapScreenBuffer(void)
 {
 {
 #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
 #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
     glfwSwapBuffers(CORE.Window.handle);
     glfwSwapBuffers(CORE.Window.handle);

+ 2 - 2
src/raylib.h

@@ -962,11 +962,11 @@ RLAPI const char *GetClipboardText(void);                         // Get clipboa
 
 
 // Custom frame control functions
 // Custom frame control functions
 // NOTE: Those functions are intended for advance users that want full control over the frame processing
 // NOTE: Those functions are intended for advance users that want full control over the frame processing
-// By default EndDrawing() does this job: draws everything + SwapBuffers() + manage frame timming + PollInputEvents()
+// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
 // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
 // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
 RLAPI void InitTimer(void);                                       // Initialize timer (hi-resolution if available)
 RLAPI void InitTimer(void);                                       // Initialize timer (hi-resolution if available)
 RLAPI void WaitTime(float ms);                                    // Wait for some milliseconds (halt program execution)
 RLAPI void WaitTime(float ms);                                    // Wait for some milliseconds (halt program execution)
-RLAPI void SwapBuffers(void);                                     // Swap back buffer with front buffer (screen drawing)
+RLAPI void SwapScreenBuffer(void);                                // Swap back buffer with front buffer (screen drawing)
 RLAPI void PollInputEvents(void);                                 // Register all input events
 RLAPI void PollInputEvents(void);                                 // Register all input events
 
 
 // Cursor-related functions
 // Cursor-related functions