mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Use more GLFWbool
This commit is contained in:
parent
2b52008405
commit
45efb935c5
|
@ -39,7 +39,7 @@
|
||||||
//
|
//
|
||||||
typedef struct _GLFWjoydeviceNS
|
typedef struct _GLFWjoydeviceNS
|
||||||
{
|
{
|
||||||
int present;
|
GLFWbool present;
|
||||||
char name[256];
|
char name[256];
|
||||||
|
|
||||||
IOHIDDeviceRef deviceRef;
|
IOHIDDeviceRef deviceRef;
|
||||||
|
|
|
@ -176,7 +176,7 @@ static GLFWbool chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||||
|
|
||||||
// Initialize EGL
|
// Initialize EGL
|
||||||
//
|
//
|
||||||
int _glfwInitEGL(void)
|
GLFWbool _glfwInitEGL(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char* sonames[] =
|
const char* sonames[] =
|
||||||
|
@ -284,9 +284,9 @@ void _glfwTerminateEGL(void)
|
||||||
|
|
||||||
// Create the OpenGL or OpenGL ES context
|
// Create the OpenGL or OpenGL ES context
|
||||||
//
|
//
|
||||||
int _glfwCreateContextEGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
int attribs[40];
|
int attribs[40];
|
||||||
EGLConfig config;
|
EGLConfig config;
|
||||||
|
|
|
@ -207,11 +207,11 @@ typedef struct _GLFWlibraryEGL
|
||||||
} _GLFWlibraryEGL;
|
} _GLFWlibraryEGL;
|
||||||
|
|
||||||
|
|
||||||
int _glfwInitEGL(void);
|
GLFWbool _glfwInitEGL(void);
|
||||||
void _glfwTerminateEGL(void);
|
void _glfwTerminateEGL(void);
|
||||||
int _glfwCreateContextEGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig);
|
const _GLFWfbconfig* fbconfig);
|
||||||
void _glfwDestroyContextEGL(_GLFWwindow* window);
|
void _glfwDestroyContextEGL(_GLFWwindow* window);
|
||||||
#if defined(_GLFW_X11)
|
#if defined(_GLFW_X11)
|
||||||
GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig,
|
GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig,
|
||||||
|
|
|
@ -150,7 +150,7 @@ static GLXContext createLegacyContext(_GLFWwindow* window,
|
||||||
|
|
||||||
// Initialize GLX
|
// Initialize GLX
|
||||||
//
|
//
|
||||||
int _glfwInitGLX(void)
|
GLFWbool _glfwInitGLX(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char* sonames[] =
|
const char* sonames[] =
|
||||||
|
@ -314,9 +314,9 @@ void _glfwTerminateGLX(void)
|
||||||
|
|
||||||
// Create the OpenGL or OpenGL ES context
|
// Create the OpenGL or OpenGL ES context
|
||||||
//
|
//
|
||||||
int _glfwCreateContextGLX(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
int attribs[40];
|
int attribs[40];
|
||||||
GLXFBConfig native = NULL;
|
GLXFBConfig native = NULL;
|
||||||
|
|
|
@ -171,11 +171,11 @@ typedef struct _GLFWlibraryGLX
|
||||||
} _GLFWlibraryGLX;
|
} _GLFWlibraryGLX;
|
||||||
|
|
||||||
|
|
||||||
int _glfwInitGLX(void);
|
GLFWbool _glfwInitGLX(void);
|
||||||
void _glfwTerminateGLX(void);
|
void _glfwTerminateGLX(void);
|
||||||
int _glfwCreateContextGLX(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig);
|
const _GLFWfbconfig* fbconfig);
|
||||||
void _glfwDestroyContextGLX(_GLFWwindow* window);
|
void _glfwDestroyContextGLX(_GLFWwindow* window);
|
||||||
GLFWbool _glfwChooseVisualGLX(const _GLFWctxconfig* ctxconfig,
|
GLFWbool _glfwChooseVisualGLX(const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig,
|
const _GLFWfbconfig* fbconfig,
|
||||||
|
|
|
@ -231,10 +231,10 @@ struct _GLFWfbconfig
|
||||||
int accumBlueBits;
|
int accumBlueBits;
|
||||||
int accumAlphaBits;
|
int accumAlphaBits;
|
||||||
int auxBuffers;
|
int auxBuffers;
|
||||||
int stereo;
|
GLFWbool stereo;
|
||||||
int samples;
|
int samples;
|
||||||
int sRGB;
|
GLFWbool sRGB;
|
||||||
int doublebuffer;
|
GLFWbool doublebuffer;
|
||||||
|
|
||||||
// This is defined in the context API's context.h
|
// This is defined in the context API's context.h
|
||||||
_GLFW_PLATFORM_FBCONFIG;
|
_GLFW_PLATFORM_FBCONFIG;
|
||||||
|
@ -918,6 +918,6 @@ void _glfwFreeMonitors(_GLFWmonitor** monitors, int count);
|
||||||
|
|
||||||
/*! @ingroup utility
|
/*! @ingroup utility
|
||||||
*/
|
*/
|
||||||
int _glfwIsPrintable(int key);
|
GLFWbool _glfwIsPrintable(int key);
|
||||||
|
|
||||||
#endif // _glfw3_internal_h_
|
#endif // _glfw3_internal_h_
|
||||||
|
|
|
@ -173,7 +173,7 @@ static GLFWbool pollJoystickEvents(_GLFWjoystickLinux* js)
|
||||||
|
|
||||||
// Initialize joystick interface
|
// Initialize joystick interface
|
||||||
//
|
//
|
||||||
int _glfwInitJoysticksLinux(void)
|
GLFWbool _glfwInitJoysticksLinux(void)
|
||||||
{
|
{
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
const char* dirname = "/dev/input";
|
const char* dirname = "/dev/input";
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
//
|
//
|
||||||
typedef struct _GLFWjoystickLinux
|
typedef struct _GLFWjoystickLinux
|
||||||
{
|
{
|
||||||
int present;
|
GLFWbool present;
|
||||||
int fd;
|
int fd;
|
||||||
float* axes;
|
float* axes;
|
||||||
int axisCount;
|
int axisCount;
|
||||||
|
@ -61,7 +61,7 @@ typedef struct _GLFWjoylistLinux
|
||||||
} _GLFWjoylistLinux;
|
} _GLFWjoylistLinux;
|
||||||
|
|
||||||
|
|
||||||
int _glfwInitJoysticksLinux(void);
|
GLFWbool _glfwInitJoysticksLinux(void);
|
||||||
void _glfwTerminateJoysticksLinux(void);
|
void _glfwTerminateJoysticksLinux(void);
|
||||||
|
|
||||||
#endif // _glfw3_linux_joystick_h_
|
#endif // _glfw3_linux_joystick_h_
|
||||||
|
|
|
@ -52,11 +52,11 @@ typedef struct _GLFWlibraryNSGL
|
||||||
} _GLFWlibraryNSGL;
|
} _GLFWlibraryNSGL;
|
||||||
|
|
||||||
|
|
||||||
int _glfwInitNSGL(void);
|
GLFWbool _glfwInitNSGL(void);
|
||||||
void _glfwTerminateNSGL(void);
|
void _glfwTerminateNSGL(void);
|
||||||
int _glfwCreateContextNSGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig);
|
const _GLFWfbconfig* fbconfig);
|
||||||
void _glfwDestroyContextNSGL(_GLFWwindow* window);
|
void _glfwDestroyContextNSGL(_GLFWwindow* window);
|
||||||
|
|
||||||
#endif // _glfw3_nsgl_context_h_
|
#endif // _glfw3_nsgl_context_h_
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
// Initialize OpenGL support
|
// Initialize OpenGL support
|
||||||
//
|
//
|
||||||
int _glfwInitNSGL(void)
|
GLFWbool _glfwInitNSGL(void)
|
||||||
{
|
{
|
||||||
_glfw.nsgl.framework =
|
_glfw.nsgl.framework =
|
||||||
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
|
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
|
||||||
|
@ -55,9 +55,9 @@ void _glfwTerminateNSGL(void)
|
||||||
|
|
||||||
// Create the OpenGL context
|
// Create the OpenGL context
|
||||||
//
|
//
|
||||||
int _glfwCreateContextNSGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
unsigned int attributeCount = 0;
|
unsigned int attributeCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ static GLFWbool isCompositionEnabled(void)
|
||||||
|
|
||||||
// Initialize WGL
|
// Initialize WGL
|
||||||
//
|
//
|
||||||
int _glfwInitWGL(void)
|
GLFWbool _glfwInitWGL(void)
|
||||||
{
|
{
|
||||||
_glfw.wgl.instance = LoadLibraryA("opengl32.dll");
|
_glfw.wgl.instance = LoadLibraryA("opengl32.dll");
|
||||||
if (!_glfw.wgl.instance)
|
if (!_glfw.wgl.instance)
|
||||||
|
@ -327,9 +327,9 @@ void _glfwTerminateWGL(void)
|
||||||
|
|
||||||
// Create the OpenGL or OpenGL ES context
|
// Create the OpenGL or OpenGL ES context
|
||||||
//
|
//
|
||||||
int _glfwCreateContextWGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
int attribs[40];
|
int attribs[40];
|
||||||
int pixelFormat = 0;
|
int pixelFormat = 0;
|
||||||
|
|
|
@ -144,11 +144,11 @@ typedef struct _GLFWlibraryWGL
|
||||||
} _GLFWlibraryWGL;
|
} _GLFWlibraryWGL;
|
||||||
|
|
||||||
|
|
||||||
int _glfwInitWGL(void);
|
GLFWbool _glfwInitWGL(void);
|
||||||
void _glfwTerminateWGL(void);
|
void _glfwTerminateWGL(void);
|
||||||
int _glfwCreateContextWGL(_GLFWwindow* window,
|
GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig);
|
const _GLFWfbconfig* fbconfig);
|
||||||
void _glfwDestroyContextWGL(_GLFWwindow* window);
|
void _glfwDestroyContextWGL(_GLFWwindow* window);
|
||||||
int _glfwAnalyzeContextWGL(_GLFWwindow* window,
|
int _glfwAnalyzeContextWGL(_GLFWwindow* window,
|
||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user