mirror of https://github.com/PCSX2/pcsx2.git
zzogl: Check the size of both rectangle and 2D textures. Hopefully will fix Sandybridge system. Tests are welcome.
cmake: be sure that EGL is supported git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5438 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d5b318b990
commit
41a5578097
|
@ -54,10 +54,12 @@ else(GLSL_API)
|
|||
endif(GLSL_API)
|
||||
|
||||
# Select the EGL API
|
||||
if(EGL_API AND EGL_GL_CONTEXT_SUPPORT)
|
||||
add_definitions(-DEGL_API)
|
||||
else()
|
||||
message(WARNING "Current EGL implementation doesn't support openGL context. Fallback to standard GLX.")
|
||||
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()
|
||||
|
||||
|
||||
|
@ -175,7 +177,7 @@ target_link_libraries(${Output} ${GLEW_LIBRARY})
|
|||
|
||||
# link target with opengl
|
||||
target_link_libraries(${Output} ${OPENGL_LIBRARIES})
|
||||
if (EGL_API AND EGL_GL_CONTEXT_SUPPORT)
|
||||
if(EGL_API AND EGL_FOUND AND EGL_GL_CONTEXT_SUPPORT)
|
||||
target_link_libraries(${Output} ${EGL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
@ -239,7 +241,7 @@ if(BUILD_REPLAY_LOADERS)
|
|||
endif(NOT GLSL_API)
|
||||
target_link_libraries(${Static} ${GLEW_LIBRARY})
|
||||
target_link_libraries(${Static} ${OPENGL_LIBRARIES})
|
||||
if (EGL_API AND EGL_GL_CONTEXT_SUPPORT)
|
||||
if(EGL_API AND EGL_FOUND AND EGL_GL_CONTEXT_SUPPORT)
|
||||
target_link_libraries(${Static} ${EGL_LIBRARIES})
|
||||
endif()
|
||||
target_link_libraries(${Static} ${X11_LIBRARIES})
|
||||
|
|
|
@ -207,13 +207,13 @@ inline void CreateOtherCheck()
|
|||
ZZLog::Error_Log("Using multitexturing.");
|
||||
|
||||
GLint Max_Texture_Size_NV = 0;
|
||||
|
||||
GLint Max_Texture_Size_2d = 0;
|
||||
|
||||
glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, &Max_Texture_Size_NV);
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &Max_Texture_Size_2d);
|
||||
|
||||
g_MaxTexHeight = min(Max_Texture_Size_2d, Max_Texture_Size_NV);
|
||||
|
||||
ZZLog::Error_Log("Maximum texture size is %d for Tex_2d and %d for Tex_NV.", Max_Texture_Size_2d, Max_Texture_Size_NV);
|
||||
|
||||
if (Max_Texture_Size_NV < 1024)
|
||||
|
@ -446,8 +446,10 @@ bool ZZCreate(int _width, int _height)
|
|||
|
||||
CreateOtherCheck();
|
||||
|
||||
// Incorrect must check rectangle texture too. Now done directly on CreateOtherCheck()
|
||||
//
|
||||
// check the max texture width and height
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &g_MaxTexWidth);
|
||||
///glGetIntegerv(GL_MAX_TEXTURE_SIZE, &g_MaxTexWidth);
|
||||
// Limit the texture size supported to 8192. We do not need bigger texture.
|
||||
// Besides the following assertion is false when texture are too big.
|
||||
// ZZoglFlush.cpp:2349: assert(fblockstride >= 1.0f)
|
||||
|
|
Loading…
Reference in New Issue