Linux Port (GTK/GTK2): Remove the requirement for libGLX.so when requesting a GLX context since libGL.so is all we need here.
- Also do some minor code cleanup in glx_3Demu.cpp
This commit is contained in:
parent
4427b863ad
commit
9aa2ddfc88
|
@ -24,7 +24,6 @@
|
|||
<Add option="`pkg-config --libs gtk+-2.0`" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGL.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGLESv2.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGLX.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libOSMesa.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libEGL.so" />
|
||||
</Linker>
|
||||
|
@ -72,7 +71,6 @@
|
|||
<Add option="`pkg-config --libs gtk+-3.0`" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGL.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGLESv2.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libGLX.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libOSMesa.so" />
|
||||
<Add library="/usr/lib/x86_64-linux-gnu/libEGL.so" />
|
||||
</Linker>
|
||||
|
|
|
@ -126,18 +126,12 @@ if test "x$glx" = "xyes" ; then
|
|||
AC_CHECK_HEADERS([GL/glx.h], [have_glx=yes], [have_glx=no])
|
||||
if test "have_glx" = "no" ; then
|
||||
AC_MSG_WARN([Cannot use GLX -- headers not found.])
|
||||
else
|
||||
AC_CHECK_LIB(dl, main)
|
||||
AC_CHECK_LIB(GL, main)
|
||||
AC_CHECK_LIB(GLX, main)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_glx" = "yes" ; then
|
||||
if test "$have_opengl" = "yes" ; then
|
||||
AC_DEFINE(ENABLE_GLX)
|
||||
GLX_LIBS="-lGLX"
|
||||
AC_SUBST(GLX_LIBS)
|
||||
else
|
||||
have_glx=no
|
||||
if test "$have_opengles" = "yes" ; then
|
||||
|
|
|
@ -36,7 +36,6 @@ endif
|
|||
endif
|
||||
|
||||
if ENABLE_GLX
|
||||
desmume_LDADD += $(GLX_LIBS)
|
||||
desmume_SOURCES += ../shared/glx_3Demu.h ../shared/glx_3Demu.cpp
|
||||
else
|
||||
if ENABLE_OSMESA
|
||||
|
|
|
@ -24,7 +24,7 @@ desmume_src = [
|
|||
gresource,
|
||||
]
|
||||
|
||||
if get_option('glx') and dep_glx.found()
|
||||
if get_option('glx') and dep_gl.found()
|
||||
desmume_src += [
|
||||
'../shared/glx_3Demu.cpp',
|
||||
]
|
||||
|
|
|
@ -36,7 +36,6 @@ endif
|
|||
endif
|
||||
|
||||
if ENABLE_GLX
|
||||
desmume_LDADD += $(GLX_LIBS)
|
||||
desmume_SOURCES += ../shared/glx_3Demu.h ../shared/glx_3Demu.cpp
|
||||
else
|
||||
if ENABLE_OSMESA
|
||||
|
|
|
@ -17,7 +17,7 @@ desmume_src = [
|
|||
'main.cpp',
|
||||
]
|
||||
|
||||
if get_option('glx') and dep_glx.found()
|
||||
if get_option('glx') and dep_gl.found()
|
||||
desmume_src += [
|
||||
'../shared/glx_3Demu.cpp',
|
||||
]
|
||||
|
|
|
@ -22,7 +22,6 @@ dep_alsa = dependency('alsa', required: false)
|
|||
dep_soundtouch = dependency('soundtouch', required: false)
|
||||
dep_agg = dependency('libagg', required: false)
|
||||
dep_fontconfig = dependency('fontconfig', required: false)
|
||||
dep_glx = dependency('glx', required: false)
|
||||
dep_osmesa = dependency('osmesa', required: false)
|
||||
dep_egl = dependency('egl', required: false)
|
||||
|
||||
|
@ -198,17 +197,16 @@ elif get_option('opengl')
|
|||
endif
|
||||
|
||||
if get_option('glx')
|
||||
if dep_glx.found()
|
||||
if get_option('opengl') and dep_gl.found()
|
||||
if dep_gl.found()
|
||||
if get_option('opengl')
|
||||
add_global_arguments('-DENABLE_GLX', language: ['c', 'cpp'])
|
||||
dependencies += dep_glx
|
||||
elif get_option('opengles')
|
||||
message('GLX contexts are incompatible with OpenGL ES -- cancelling the use of GLX.')
|
||||
else
|
||||
message('GLX contexts are only compatible with standard OpenGL -- cancelling the use of GLX.')
|
||||
endif
|
||||
else
|
||||
message('Cannot use GLX -- glx library not found.')
|
||||
message('Cannot use GLX -- gl library not found.')
|
||||
endif
|
||||
elif get_option('osmesa')
|
||||
if dep_osmesa.found()
|
||||
|
|
|
@ -86,7 +86,7 @@ static bool __glx_initOpenGL(const int requestedProfile, const int requestedVers
|
|||
const char *extensionSet = glXQueryExtensionsString(currDisplay, currScreen);
|
||||
|
||||
const char *foundString = strstr(extensionSet, "GLX_ARB_create_context_profile");
|
||||
glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB");
|
||||
glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress( (const GLubyte *) "glXCreateContextAttribsARB");
|
||||
|
||||
if ( (foundString == NULL) || (glXCreateContextAttribsARB == NULL) )
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ bool glx_beginOpenGL()
|
|||
prevReadDrawable = glXGetCurrentReadDrawable();
|
||||
prevContext = glXGetCurrentContext();
|
||||
|
||||
if (pendingDrawable != NULL)
|
||||
if (pendingDrawable != 0)
|
||||
{
|
||||
bool previousIsCurrent = (prevDrawDrawable == currDrawable);
|
||||
|
||||
|
|
Loading…
Reference in New Issue