diff --git a/examples/boing.c b/examples/boing.c
index 33696e468..8cf5b1dce 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 53d601f35..cbf9eab9c 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 b4dcf082a..a55df291a 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 2cd43fdf8..3fcdd1d87 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 e61ea9abe..e952cc707 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 1eb8b8552..9ffcd3f7b 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 75f82e1df..59bd6fdb4 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 e13d8944c..ee03881d3 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 889e17703..8a28b5cc5 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 a78cef112..66ae954ef 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 f235cf757..38f1374e7 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 d7c5a02c4..b50abaaaa 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 8bc5568b2..b4257271d 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 fffd9f583..41928db70 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 6cdb77e0f..e2fcf387d 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 951409a69..bf634d546 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 981cbcc41..dd10784e8 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 4de6634d5..efaff6b9f 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 6d001ea5a..1ee235f10 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 23ac88a36..d777d4311 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 a4648ef64..6962974d8 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 5ae7ba5dc..7c8082296 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 2922cb841..484be9966 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 942ec2c66..8be0e30b7 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 10170b0f3..044f8ecc9 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 c7ff32b2f..f5844762f 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()));