mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl-wgl:
* initialize the context status variable that take care of some startup hang * cmake: don't link and compile EGL when it isn't requested git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5528 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e6e18607e0
commit
e6cd4129c2
|
@ -45,6 +45,15 @@ if(XDG_STD)
|
||||||
add_definitions(-DXDG_STD)
|
add_definitions(-DXDG_STD)
|
||||||
endif(XDG_STD)
|
endif(XDG_STD)
|
||||||
|
|
||||||
|
# Select the EGL API
|
||||||
|
if(EGL_API AND EGL_FOUND)
|
||||||
|
if (EGL_GL_CONTEXT_SUPPORT)
|
||||||
|
add_definitions(-DEGL_API)
|
||||||
|
else()
|
||||||
|
message(WARNING "Current EGL implementation doesn't support openGL context. Fallback to standard GLX.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(GSdxSources
|
set(GSdxSources
|
||||||
GLLoader.cpp
|
GLLoader.cpp
|
||||||
GPU.cpp
|
GPU.cpp
|
||||||
|
@ -184,6 +193,9 @@ add_library(${Output} SHARED ${GSdxSources} ${GSdxHeaders})
|
||||||
|
|
||||||
target_link_libraries(${Output} ${X11_LIBRARIES})
|
target_link_libraries(${Output} ${X11_LIBRARIES})
|
||||||
target_link_libraries(${Output} ${OPENGL_LIBRARIES})
|
target_link_libraries(${Output} ${OPENGL_LIBRARIES})
|
||||||
|
if(EGL_API AND EGL_FOUND AND EGL_GL_CONTEXT_SUPPORT)
|
||||||
|
target_link_libraries(${Output} ${EGL_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(Linux)
|
if(Linux)
|
||||||
target_link_libraries(${Output} ${GTK2_LIBRARIES})
|
target_link_libraries(${Output} ${GTK2_LIBRARIES})
|
||||||
|
@ -221,12 +233,18 @@ if(BUILD_REPLAY_LOADERS)
|
||||||
add_executable(${Replay} linux_replay.cpp)
|
add_executable(${Replay} linux_replay.cpp)
|
||||||
|
|
||||||
target_link_libraries(${Static} ${OPENGL_LIBRARIES})
|
target_link_libraries(${Static} ${OPENGL_LIBRARIES})
|
||||||
|
if(EGL_API AND EGL_FOUND AND EGL_GL_CONTEXT_SUPPORT)
|
||||||
|
target_link_libraries(${Static} ${EGL_LIBRARIES})
|
||||||
|
endif()
|
||||||
target_link_libraries(${Static} ${X11_LIBRARIES})
|
target_link_libraries(${Static} ${X11_LIBRARIES})
|
||||||
target_link_libraries(${Static} ${GTK2_LIBRARIES})
|
target_link_libraries(${Static} ${GTK2_LIBRARIES})
|
||||||
|
|
||||||
target_link_libraries(${Replay} ${Static})
|
target_link_libraries(${Replay} ${Static})
|
||||||
# Warning others lib must be linked after GSdx...
|
# Warning others lib must be linked after GSdx...
|
||||||
target_link_libraries(${Replay} ${OPENGL_LIBRARIES})
|
target_link_libraries(${Replay} ${OPENGL_LIBRARIES})
|
||||||
|
if(EGL_API AND EGL_FOUND AND EGL_GL_CONTEXT_SUPPORT)
|
||||||
|
target_link_libraries(${Replay} ${EGL_LIBRARIES})
|
||||||
|
endif()
|
||||||
target_link_libraries(${Replay} ${X11_LIBRARIES})
|
target_link_libraries(${Replay} ${X11_LIBRARIES})
|
||||||
target_link_libraries(${Replay} ${GTK2_LIBRARIES})
|
target_link_libraries(${Replay} ${GTK2_LIBRARIES})
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
|
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LINUX
|
#if defined(_LINUX) && defined (EGL_API)
|
||||||
GSWndEGL::GSWndEGL()
|
GSWndEGL::GSWndEGL()
|
||||||
: m_NativeWindow(0), m_NativeDisplay(NULL)
|
: m_NativeWindow(0), m_NativeDisplay(NULL), m_ctx_attached(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "GSWnd.h"
|
#include "GSWnd.h"
|
||||||
|
|
||||||
#ifdef _LINUX
|
#if defined(_LINUX) && defined (EGL_API)
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
#include <EGL/eglext.h>
|
#include <EGL/eglext.h>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#ifdef _LINUX
|
#ifdef _LINUX
|
||||||
GSWndOGL::GSWndOGL()
|
GSWndOGL::GSWndOGL()
|
||||||
: m_NativeWindow(0), m_NativeDisplay(NULL), m_swapinterval(NULL)
|
: m_NativeWindow(0), m_NativeDisplay(NULL), m_swapinterval(NULL), m_ctx_attached(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
//TODO
|
//TODO
|
||||||
GSWndWGL::GSWndWGL()
|
GSWndWGL::GSWndWGL()
|
||||||
: m_NativeWindow(NULL), m_NativeDisplay(NULL), m_context(NULL)//, m_swapinterval(NULL)
|
: m_NativeWindow(NULL), m_NativeDisplay(NULL), m_context(NULL), m_ctx_attached(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue