Comment fixes.

master
Camilla Berglund ago%!(EXTRA string=13 years)
parent bd5ff15769
commit aaaac00aa5
  1. 47
      src/init.c
  2. 14
      src/internal.h

@ -36,40 +36,43 @@
#include <stdarg.h> #include <stdarg.h>
////////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------
////// GLFW internal API ////// // Flag indicating whether GLFW has been successfully initialized
////////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------
//========================================================================
// Platform independent global state shared between compilation units
//========================================================================
// Flag indicating whether GLFW has been initialized
GLboolean _glfwInitialized = GL_FALSE; GLboolean _glfwInitialized = GL_FALSE;
// All global data protected by _glfwInitialized
// This data should only be touched after a call to glfwInit that has //------------------------------------------------------------------------
// not been followed by a call to glfwTerminate // All shared and API-specific global data protected by _glfwInitialized
// This should only be touched after a call to glfwInit that has not been
// followed by a call to glfwTerminate
//------------------------------------------------------------------------
_GLFWlibrary _glfwLibrary; _GLFWlibrary _glfwLibrary;
//======================================================================== //------------------------------------------------------------------------
// Platform independent global error state // The current GLFW error code
// These are not in _glfwLibrary because they need to be initialized and // This is outside of _glfwLibrary so it can be initialized and usable
// usable before glfwInit so it can report errors to the user // before glfwInit is called, which lets that function report errors
//======================================================================== // TODO: Make this thread-local
//------------------------------------------------------------------------
// The current error code
// TODO: Make thread-local
static int _glfwError = GLFW_NO_ERROR; static int _glfwError = GLFW_NO_ERROR;
//------------------------------------------------------------------------
// The current error callback // The current error callback
// This is outside of _glfwLibrary so it can be initialized and usable
// before glfwInit is called, which lets that function report errors
//------------------------------------------------------------------------
static GLFWerrorfun _glfwErrorCallback = NULL; static GLFWerrorfun _glfwErrorCallback = NULL;
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
//======================================================================== //========================================================================
// Sets the current error value // Sets the current error value
// This function may be called without GLFW having been initialized
//======================================================================== //========================================================================
void _glfwSetError(int error, const char* format, ...) void _glfwSetError(int error, const char* format, ...)
@ -160,6 +163,7 @@ GLFWAPI void glfwTerminate(void)
//======================================================================== //========================================================================
// Get GLFW version // Get GLFW version
// This function may be called without GLFW having been initialized
//======================================================================== //========================================================================
GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev) GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev)
@ -177,6 +181,7 @@ GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev)
//======================================================================== //========================================================================
// Get the GLFW version string // Get the GLFW version string
// This function may be called without GLFW having been initialized
//======================================================================== //========================================================================
GLFWAPI const char* glfwGetVersionString(void) GLFWAPI const char* glfwGetVersionString(void)

@ -233,15 +233,11 @@ struct _GLFWlibrary
}; };
//======================================================================== //------------------------------------------------------------------------
// Platform independent global state shared between compilation units // Global state shared between compilation units of GLFW
// These are exported from init.c // These are exported from and documented in init.c
//======================================================================== //------------------------------------------------------------------------
// Flag indicating if GLFW has been initialized
extern GLboolean _glfwInitialized; extern GLboolean _glfwInitialized;
// All global data protected by _glfwInitialized
extern _GLFWlibrary _glfwLibrary; extern _GLFWlibrary _glfwLibrary;
@ -312,7 +308,7 @@ void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long
int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second); int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);
void _glfwSplitBPP(int bpp, int* red, int* green, int* blue); void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
// Error handling (error.c) // Error handling (init.c)
void _glfwSetError(int error, const char* format, ...); void _glfwSetError(int error, const char* format, ...);
// Window management (window.c) // Window management (window.c)

Loading…
Cancel
Save