Add headless OSMesa backend

Allows creation and drawing to in-memory OpenGL contexts.

This backend does not provide input.

Related to #850.
This commit is contained in:
Jason Daly
2016-08-30 15:53:19 -07:00
committed by Camilla Berglund
parent a90ee65f7b
commit 368fa9475d
12 changed files with 766 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#include "internal.h"
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
int _glfwPlatformInit(void)
{
if (!_glfwInitThreadLocalStoragePOSIX()) {
return GLFW_FALSE;
}
_glfwInitTimerPOSIX();
return GLFW_TRUE;
}
void _glfwPlatformTerminate(void)
{
_glfwTerminateOSMesa();
_glfwTerminateThreadLocalStoragePOSIX();
}
const char* _glfwPlatformGetVersionString(void)
{
const char* version = _GLFW_VERSION_NUMBER " OSMESA";
return version;
}