mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
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:
committed by
Camilla Berglund
parent
a90ee65f7b
commit
368fa9475d
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user