mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-16 12:42:30 +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
57
vendor/glew-cmake-2.2.0/auto/src/glew_init_glx.c
vendored
Normal file
57
vendor/glew-cmake-2.2.0/auto/src/glew_init_glx.c
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
GLboolean glxewGetExtension (const char* name)
|
||||
{
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
|
||||
if (glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||
start = (const GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
|
||||
if (0 == start) return GL_FALSE;
|
||||
end = start + _glewStrLen(start);
|
||||
return _glewSearchExtension(name, start, end);
|
||||
}
|
||||
|
||||
GLenum glxewInit ()
|
||||
{
|
||||
Display* display;
|
||||
int major, minor;
|
||||
const GLubyte* extStart;
|
||||
const GLubyte* extEnd;
|
||||
/* initialize core GLX 1.2 */
|
||||
if (_glewInit_GLX_VERSION_1_2()) return GLEW_ERROR_GLX_VERSION_11_ONLY;
|
||||
/* check for a display */
|
||||
display = glXGetCurrentDisplay();
|
||||
if (display == NULL) return GLEW_ERROR_NO_GLX_DISPLAY;
|
||||
/* initialize flags */
|
||||
GLXEW_VERSION_1_0 = GL_TRUE;
|
||||
GLXEW_VERSION_1_1 = GL_TRUE;
|
||||
GLXEW_VERSION_1_2 = GL_TRUE;
|
||||
GLXEW_VERSION_1_3 = GL_TRUE;
|
||||
GLXEW_VERSION_1_4 = GL_TRUE;
|
||||
/* query GLX version */
|
||||
glXQueryVersion(display, &major, &minor);
|
||||
if (major == 1 && minor <= 3)
|
||||
{
|
||||
switch (minor)
|
||||
{
|
||||
case 3:
|
||||
GLXEW_VERSION_1_4 = GL_FALSE;
|
||||
break;
|
||||
case 2:
|
||||
GLXEW_VERSION_1_4 = GL_FALSE;
|
||||
GLXEW_VERSION_1_3 = GL_FALSE;
|
||||
break;
|
||||
default:
|
||||
return GLEW_ERROR_GLX_VERSION_11_ONLY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* query GLX extension string */
|
||||
extStart = 0;
|
||||
if (glXGetCurrentDisplay != NULL)
|
||||
extStart = (const GLubyte*)glXGetClientString(display, GLX_EXTENSIONS);
|
||||
if (extStart == 0)
|
||||
extStart = (const GLubyte *)"";
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
/* initialize extensions */
|
||||
Loading…
Add table
Add a link
Reference in a new issue