mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-13 19:42:29 +00:00
feat(gx): add incomplete 'CGxDeviceGLSDL' (#2)
* chore(build): add vendored SDL 3.0.0 library * chore(build): add vendored glew-cmake-2.2.0 library * feat(console): in the presence of -opengl launch flag, change GxApi to OpenGl * feat(gx): add uncompleted CGxDeviceGLSDL targeting Windows and Linux * chore(build): change SDL3 linkage from shared (bad) to to static (good)
This commit is contained in:
parent
934e0fb600
commit
706c8903a1
2043 changed files with 663533 additions and 5 deletions
41
vendor/glew-cmake-2.2.0/auto/src/glew_init_wgl.c
vendored
Normal file
41
vendor/glew-cmake-2.2.0/auto/src/glew_init_wgl.c
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL;
|
||||
static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL;
|
||||
|
||||
GLboolean GLEWAPIENTRY wglewGetExtension (const char* name)
|
||||
{
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
if (_wglewGetExtensionsStringARB == NULL)
|
||||
if (_wglewGetExtensionsStringEXT == NULL)
|
||||
return GL_FALSE;
|
||||
else
|
||||
start = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
||||
else
|
||||
start = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
||||
if (start == 0)
|
||||
return GL_FALSE;
|
||||
end = start + _glewStrLen(start);
|
||||
return _glewSearchExtension(name, start, end);
|
||||
}
|
||||
|
||||
GLenum GLEWAPIENTRY wglewInit ()
|
||||
{
|
||||
GLboolean crippled;
|
||||
const GLubyte* extStart;
|
||||
const GLubyte* extEnd;
|
||||
/* find wgl extension string query functions */
|
||||
_wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB");
|
||||
_wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT");
|
||||
/* query wgl extension string */
|
||||
if (_wglewGetExtensionsStringARB == NULL)
|
||||
if (_wglewGetExtensionsStringEXT == NULL)
|
||||
extStart = (const GLubyte*)"";
|
||||
else
|
||||
extStart = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
||||
else
|
||||
extStart = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
/* initialize extensions */
|
||||
crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL;
|
||||
Loading…
Add table
Add a link
Reference in a new issue