mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-13 11:32: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
45
vendor/glew-cmake-2.2.0/auto/src/glew_init_egl.c
vendored
Normal file
45
vendor/glew-cmake-2.2.0/auto/src/glew_init_egl.c
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
GLboolean eglewGetExtension (const char* name)
|
||||
{
|
||||
const GLubyte* start;
|
||||
const GLubyte* end;
|
||||
|
||||
start = (const GLubyte*) eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS);
|
||||
if (0 == start) return GL_FALSE;
|
||||
end = start + _glewStrLen(start);
|
||||
return _glewSearchExtension(name, start, end);
|
||||
}
|
||||
|
||||
GLenum eglewInit (EGLDisplay display)
|
||||
{
|
||||
EGLint major, minor;
|
||||
const GLubyte* extStart;
|
||||
const GLubyte* extEnd;
|
||||
PFNEGLINITIALIZEPROC initialize = NULL;
|
||||
PFNEGLQUERYSTRINGPROC queryString = NULL;
|
||||
|
||||
/* Load necessary entry points */
|
||||
initialize = (PFNEGLINITIALIZEPROC) glewGetProcAddress("eglInitialize");
|
||||
queryString = (PFNEGLQUERYSTRINGPROC) glewGetProcAddress("eglQueryString");
|
||||
if (!initialize || !queryString)
|
||||
return 1;
|
||||
|
||||
/* query EGL version */
|
||||
if (initialize(display, &major, &minor) != EGL_TRUE)
|
||||
return 1;
|
||||
|
||||
EGLEW_VERSION_1_5 = ( major > 1 ) || ( major == 1 && minor >= 5 ) ? GL_TRUE : GL_FALSE;
|
||||
EGLEW_VERSION_1_4 = EGLEW_VERSION_1_5 == GL_TRUE || ( major == 1 && minor >= 4 ) ? GL_TRUE : GL_FALSE;
|
||||
EGLEW_VERSION_1_3 = EGLEW_VERSION_1_4 == GL_TRUE || ( major == 1 && minor >= 3 ) ? GL_TRUE : GL_FALSE;
|
||||
EGLEW_VERSION_1_2 = EGLEW_VERSION_1_3 == GL_TRUE || ( major == 1 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
|
||||
EGLEW_VERSION_1_1 = EGLEW_VERSION_1_2 == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
|
||||
EGLEW_VERSION_1_0 = EGLEW_VERSION_1_1 == GL_TRUE || ( major == 1 && minor >= 0 ) ? GL_TRUE : GL_FALSE;
|
||||
|
||||
/* query EGL extension string */
|
||||
extStart = (const GLubyte*) queryString(display, EGL_EXTENSIONS);
|
||||
if (extStart == 0)
|
||||
extStart = (const GLubyte *)"";
|
||||
extEnd = extStart + _glewStrLen(extStart);
|
||||
|
||||
/* initialize extensions */
|
||||
Loading…
Add table
Add a link
Reference in a new issue