this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'master' into Blurrr

Eric Wing e8402861 7e177815

+33 -22
+11
.gitignore
··· 1 + CMakeCache.txt 2 + CMakeFiles 3 + Makefile 4 + *.cmake 5 + *-demo 6 + *-test 7 + *.a 8 + *.so 9 + *.o 10 + 11 +
+15 -16
CMakeLists.txt
··· 67 67 68 68 set(SDL_gpu_VERSION 0.11.0) 69 69 70 - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/scripts) 70 + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/scripts) 71 71 72 72 if(APPLE) 73 73 include(ios-cmake/toolchain/XcodeDefaults) ··· 82 82 # Find the package for SDL or SDL2 83 83 if ( SDL_gpu_USE_SDL1 ) 84 84 find_package(SDL REQUIRED) 85 - 85 + 86 86 if ( NOT SDL_FOUND ) 87 87 message ( FATAL_ERROR "SDL not found!" ) 88 88 endif ( NOT SDL_FOUND ) 89 - 89 + 90 90 include_directories(${SDL_INCLUDE_DIR}) 91 91 link_libraries(${SDL_LIBRARY}) 92 92 else ( SDL_gpu_USE_SDL1 ) 93 93 find_package(SDL2 REQUIRED) 94 - 94 + 95 95 if ( NOT SDL2_FOUND ) 96 96 message ( FATAL_ERROR "SDL2 not found!" ) 97 97 endif ( NOT SDL2_FOUND ) 98 - 98 + 99 99 if ( NOT SDL2MAIN_LIBRARY ) 100 100 message ( WARNING "SDL2MAIN_LIBRARY is NOTFOUND" ) 101 101 SET( SDL2MAIN_LIBRARY "" ) ··· 119 119 link_libraries(${OPENGL_LIBRARIES}) 120 120 endif() 121 121 122 - 122 + 123 123 if (SDL_gpu_DISABLE_OPENGL_1_BASE) 124 124 add_definitions("-DSDL_GPU_DISABLE_OPENGL_1_BASE") 125 125 endif (SDL_gpu_DISABLE_OPENGL_1_BASE) ··· 135 135 if (SDL_gpu_DISABLE_OPENGL_4) 136 136 add_definitions("-DSDL_GPU_DISABLE_OPENGL_4") 137 137 endif (SDL_gpu_DISABLE_OPENGL_4) 138 - 138 + 139 139 if(SDL_gpu_USE_SYSTEM_GLEW) 140 140 # If glew is not found here, we’ll use the bundled version 141 141 find_package(GLEW) ··· 144 144 if(NOT GLEW_FOUND) 145 145 message(" Using bundled version of GLEW") 146 146 endif(NOT GLEW_FOUND) 147 - 148 - 147 + 148 + 149 149 if (NOT SDL_gpu_DISABLE_OPENGL) 150 150 if(GLEW_FOUND) 151 151 # Look in the GL subdirectory, too. 152 152 foreach(GL_DIR ${GLEW_INCLUDE_DIRS}) 153 153 set(GLEW_GL_DIRS ${GLEW_GL_DIRS} "${GL_DIR}/GL") 154 154 endforeach(GL_DIR ${GLEW_INCLUDE_DIRS}) 155 - 155 + 156 156 include_directories(${GLEW_INCLUDE_DIRS} ${GLEW_GL_DIRS}) 157 157 link_libraries (${GLEW_LIBRARIES}) 158 158 else(GLEW_FOUND) ··· 178 178 ${ANDROID_GLES2_LIBRARY} 179 179 ${ANDROID_GLES1_LIBRARY} 180 180 ) 181 - else() 181 + else() 182 182 find_package(OpenGLES REQUIRED) 183 183 include_directories(${OPENGLES_INCLUDE_DIR}) 184 184 link_libraries (${OPENGLES_LIBRARIES}) ··· 193 193 if (SDL_gpu_DISABLE_GLES_3) 194 194 add_definitions("-DSDL_GPU_DISABLE_GLES_3") 195 195 endif (SDL_gpu_DISABLE_GLES_3) 196 - 196 + 197 197 endif (SDL_gpu_DISABLE_GLES) 198 198 199 199 # If stb-image is not found here, we’ll use the bundled version ··· 245 245 # Build the tests 246 246 if(SDL_gpu_BUILD_TESTS) 247 247 if(SDL_gpu_BUILD_VIDEO_TEST) 248 - 248 + 249 249 find_package(FFMPEG REQUIRED) 250 250 include_directories(${FFMPEG_INCLUDE_DIR}) 251 251 link_libraries (${FFMPEG_LIBRARIES}) 252 - 252 + 253 253 add_definitions("-DSDL_GPU_BUILD_VIDEO_TEST") 254 254 endif(SDL_gpu_BUILD_VIDEO_TEST) 255 - 255 + 256 256 add_subdirectory(tests) 257 257 endif(SDL_gpu_BUILD_TESTS) 258 258 ··· 260 260 if(SDL_gpu_BUILD_TOOLS) 261 261 add_subdirectory(tools) 262 262 endif(SDL_gpu_BUILD_TOOLS) 263 -
+7 -6
src/renderer_GL_common.inl
··· 1061 1061 } 1062 1062 1063 1063 // Store the window info 1064 - SDL_GetWindowSize(window, &target->context->window_w, &target->context->window_h); 1065 - target->context->stored_window_w = target->context->window_w; 1066 - target->context->stored_window_h = target->context->window_h; 1067 1064 target->context->windowID = SDL_GetWindowID(window); 1068 - 1065 + 1069 1066 // Make a new context if needed and make it current 1070 1067 if(created || target->context->context == NULL) 1071 1068 { ··· 1073 1070 GPU_AddWindowMapping(target); 1074 1071 } 1075 1072 1076 - // SDL_GL_GetDrawableSize must be called after SDL_GL_CreateContext or it will not do anything. 1073 + // Get window dimensions 1074 + SDL_GetWindowSize(window, &target->context->window_w, &target->context->window_h); 1075 + target->context->stored_window_w = target->context->window_w; 1076 + target->context->stored_window_h = target->context->window_h; 1077 + // We need a GL context before we can get the drawable size. 1077 1078 SDL_GL_GetDrawableSize(window, &target->context->drawable_w, &target->context->drawable_h); 1078 - 1079 + 1079 1080 #else 1080 1081 1081 1082 screen = SDL_GetVideoSurface();