diff --git a/examples/boing.c b/examples/boing.c
index 33696e46..8cf5b1dc 100644
--- a/examples/boing.c
+++ b/examples/boing.c
@@ -569,7 +569,7 @@ int main( void )
GLFWwindow window;
/* Init GLFW */
- if( !glfwInit() )
+ if( !glfwInit(NULL) )
{
fprintf( stderr, "Failed to initialize GLFW\n" );
exit( EXIT_FAILURE );
diff --git a/examples/gears.c b/examples/gears.c
index 53d601f3..cbf9eab9 100644
--- a/examples/gears.c
+++ b/examples/gears.c
@@ -323,7 +323,7 @@ int main(int argc, char *argv[])
{
GLFWwindow window;
- if( !glfwInit() )
+ if( !glfwInit(NULL) )
{
fprintf( stderr, "Failed to initialize GLFW\n" );
exit( EXIT_FAILURE );
diff --git a/examples/heightmap.c b/examples/heightmap.c
index b4dcf082..a55df291 100644
--- a/examples/heightmap.c
+++ b/examples/heightmap.c
@@ -573,7 +573,7 @@ int main(int argc, char** argv)
}
}
- if (GL_TRUE != glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "ERROR: Unable to initialize GLFW\n");
usage();
diff --git a/examples/splitview.c b/examples/splitview.c
index 2cd43fdf..3fcdd1d8 100644
--- a/examples/splitview.c
+++ b/examples/splitview.c
@@ -442,7 +442,7 @@ int main(void)
GLFWwindow window;
// Initialise GLFW
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW\n");
exit(EXIT_FAILURE);
diff --git a/examples/triangle.c b/examples/triangle.c
index e61ea9ab..e952cc70 100644
--- a/examples/triangle.c
+++ b/examples/triangle.c
@@ -15,7 +15,7 @@ int main(void)
GLFWwindow window;
// Initialise GLFW
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW\n");
exit(EXIT_FAILURE);
diff --git a/examples/wave.c b/examples/wave.c
index 1eb8b855..9ffcd3f7 100644
--- a/examples/wave.c
+++ b/examples/wave.c
@@ -379,7 +379,7 @@ int main(int argc, char* argv[])
GLFWwindow window;
double t, dt_total, t_old;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "GLFW initialization failed\n");
exit(EXIT_FAILURE);
diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index 75f82e1d..59bd6fdb 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -506,20 +506,13 @@ typedef struct
GLFWfreefun free;
} GLFWallocator;
-/* Custom threading model interface */
-typedef struct
-{
- int dummy;
-} GLFWthreadmodel;
-
/*************************************************************************
* Prototypes
*************************************************************************/
/* Initialization, termination and version querying */
-GLFWAPI int glfwInit(void);
-GLFWAPI int glfwInitWithModels(GLFWthreadmodel* threading, GLFWallocator* allocator);
+GLFWAPI int glfwInit(GLFWallocator* allocator);
GLFWAPI void glfwTerminate(void);
GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
GLFWAPI const char* glfwGetVersionString(void);
diff --git a/readme.html b/readme.html
index e13d8944..ee03881d 100644
--- a/readme.html
+++ b/readme.html
@@ -272,7 +272,7 @@ version of GLFW.
Added glfwSetWindowFocusCallback
function and GLFWwindowfocusfun
type for receiving window focus events
Added glfwSetWindowIconifyCallback
function and GLFWwindowiconifyfun
type for receiving window iconification events
Added glfwGetCurrentContext
function for retrieving the window whose OpenGL context is current
- Added glfwInitWithModels
function and GLFWallocator
and GLFWthreadmodel
types for pluggable memory allocation and threading models
+ Added GLFWallocator
type and glfwInit
parameter for pluggable memory allocator
Added glfwCopyContext
function for copying OpenGL state categories between contexts
Added GLFW_OPENGL_ES2_PROFILE
profile for creating OpenGL ES 2.0 contexts using the GLX_EXT_create_context_es2_profile
and WGL_EXT_create_context_es2_profile
extensions
Added GLFW_OPENGL_ROBUSTNESS
window hint and associated strategy tokens for GL_ARB_robustness
support
diff --git a/src/init.c b/src/init.c
index 889e1770..8a28b5cc 100644
--- a/src/init.c
+++ b/src/init.c
@@ -67,26 +67,13 @@ void _glfwFree(void* ptr)
// Initialize various GLFW state
//========================================================================
-GLFWAPI int glfwInit(void)
-{
- return glfwInitWithModels(NULL, NULL);
-}
-
-
-//========================================================================
-// Initialize various GLFW state using custom model interfaces
-//========================================================================
-
-GLFWAPI int glfwInitWithModels(GLFWthreadmodel* threading, GLFWallocator* allocator)
+GLFWAPI int glfwInit(GLFWallocator* allocator)
{
if (_glfwInitialized)
return GL_TRUE;
memset(&_glfwLibrary, 0, sizeof(_glfwLibrary));
- if (threading)
- _glfwLibrary.threading = *threading;
-
if (allocator)
{
// Verify that the specified model is complete
diff --git a/src/internal.h b/src/internal.h
index a78cef11..66ae954e 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -241,7 +241,6 @@ struct _GLFWlibrary
GLFWkeyfun keyCallback;
GLFWcharfun charCallback;
- GLFWthreadmodel threading;
GLFWallocator allocator;
GLFWgammaramp currentRamp;
diff --git a/tests/accuracy.c b/tests/accuracy.c
index f235cf75..38f1374e 100644
--- a/tests/accuracy.c
+++ b/tests/accuracy.c
@@ -59,7 +59,7 @@ int main(void)
{
GLFWwindow window;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/defaults.c b/tests/defaults.c
index d7c5a02c..b50abaaa 100644
--- a/tests/defaults.c
+++ b/tests/defaults.c
@@ -69,7 +69,7 @@ int main(void)
int i, width, height;
GLFWwindow window;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/dynamic.c b/tests/dynamic.c
index 8bc5568b..b4257271 100644
--- a/tests/dynamic.c
+++ b/tests/dynamic.c
@@ -59,7 +59,7 @@ int main(void)
exit(EXIT_FAILURE);
}
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW\n");
exit(EXIT_FAILURE);
diff --git a/tests/events.c b/tests/events.c
index fffd9f58..41928db7 100644
--- a/tests/events.c
+++ b/tests/events.c
@@ -330,7 +330,7 @@ int main(void)
setlocale(LC_ALL, "");
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/fsaa.c b/tests/fsaa.c
index 6cdb77e0..e2fcf387 100644
--- a/tests/fsaa.c
+++ b/tests/fsaa.c
@@ -81,7 +81,7 @@ int main(int argc, char** argv)
}
}
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/fsfocus.c b/tests/fsfocus.c
index 951409a6..bf634d54 100644
--- a/tests/fsfocus.c
+++ b/tests/fsfocus.c
@@ -75,7 +75,7 @@ int main(void)
{
GLFWwindow window;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/gamma.c b/tests/gamma.c
index 981cbcc4..dd10784e 100644
--- a/tests/gamma.c
+++ b/tests/gamma.c
@@ -96,7 +96,7 @@ int main(int argc, char** argv)
}
}
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c
index 4de6634d..efaff6b9 100644
--- a/tests/glfwinfo.c
+++ b/tests/glfwinfo.c
@@ -183,7 +183,7 @@ int main(int argc, char** argv)
glfwSetErrorCallback(error_callback);
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/iconify.c b/tests/iconify.c
index 6d001ea5..1ee235f1 100644
--- a/tests/iconify.c
+++ b/tests/iconify.c
@@ -90,7 +90,7 @@ int main(int argc, char** argv)
}
}
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/joysticks.c b/tests/joysticks.c
index 23ac88a3..d777d431 100644
--- a/tests/joysticks.c
+++ b/tests/joysticks.c
@@ -94,7 +94,7 @@ int main(void)
double update;
/* Initialise GLFW */
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/listmodes.c b/tests/listmodes.c
index a4648ef6..6962974d 100644
--- a/tests/listmodes.c
+++ b/tests/listmodes.c
@@ -21,7 +21,7 @@ int main(void)
GLFWvidmode dtmode, modes[400];
int modecount, i;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/peter.c b/tests/peter.c
index 5ae7ba5d..7c808229 100644
--- a/tests/peter.c
+++ b/tests/peter.c
@@ -111,7 +111,7 @@ static GLboolean open_window(void)
int main(void)
{
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/reopen.c b/tests/reopen.c
index 2922cb84..484be996 100644
--- a/tests/reopen.c
+++ b/tests/reopen.c
@@ -84,7 +84,7 @@ static GLboolean open_window(int width, int height, int mode)
{
double base;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
return GL_FALSE;
diff --git a/tests/sharing.c b/tests/sharing.c
index 942ec2c6..8be0e30b 100644
--- a/tests/sharing.c
+++ b/tests/sharing.c
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
GLuint texture;
int x, y;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/tearing.c b/tests/tearing.c
index 10170b0f..044f8ecc 100644
--- a/tests/tearing.c
+++ b/tests/tearing.c
@@ -44,7 +44,7 @@ int main(void)
float position;
GLFWwindow window;
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
diff --git a/tests/windows.c b/tests/windows.c
index c7ff32b2..f5844762 100644
--- a/tests/windows.c
+++ b/tests/windows.c
@@ -46,7 +46,7 @@ int main(void)
GLboolean running = GL_TRUE;
GLFWwindow windows[4];
- if (!glfwInit())
+ if (!glfwInit(NULL))
{
fprintf(stderr, "Failed to initialize GLFW: %s\n",
glfwErrorString(glfwGetError()));