this repo has no description
0
fork

Configure Feed

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

Improved Raspberry Pi detection and added more flexibility to that GLES 1 workaround.

+16 -7
+15 -6
CMakeLists.txt
··· 21 21 set(SDL_gpu_DEFAULT_BUILD_SHARED OFF) 22 22 set(SDL_gpu_DEFAULT_BUILD_STATIC ON) 23 23 elseif(APPLE) 24 + message(" Using Apple defaults.") 24 25 set(SDL_gpu_DEFAULT_BUILD_SHARED ON) 25 26 option(SDL_gpu_BUILD_FRAMEWORK "Build SDL_gpu as Apple framework" ON) 26 27 set(SDL_gpu_DEFAULT_BUILD_STATIC ON) 27 28 elseif(ANDROID) 29 + message(" Using Android defaults.") 28 30 set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 29 31 set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 30 32 set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) ··· 32 34 set(SDL_gpu_DEFAULT_BUILD_SHARED ON) 33 35 set(SDL_gpu_DEFAULT_BUILD_STATIC OFF) 34 36 elseif(WIN32) 37 + message(" Using Windows defaults.") 35 38 set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 36 39 elseif(("${CMAKE_SYSTEM}" MATCHES "Linux") AND ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")) 37 - 38 - # Assuming Raspberry Pi 2 for now. 39 - # There is a bug with the shipping GLES v1 library where 3 of the symbols are misnamed. 40 - # If you have an arm/ES device without this problem, don't enable this macro. 41 - # TODO: Need way to identify Raspberry Pi/Broadcom 42 - add_definitions(-DSDL_GPU_USE_BROADCOM_RASPBERRYPI_WORKAROUND) 40 + message(" Using Linux ARM defaults.") 41 + 42 + # Check specifically for Raspberry Pi (somewhat hacky). 43 + if(NOT SKIP_BCM_HOST_H_CHECK AND EXISTS /opt/vc/include/bcm_host.h) 44 + message("Defining ADD_MISSING_OES_FUNCTIONS") 45 + # There is a bug with the GLES v1 library shipping with the Raspberry Pi 2 where 3 of the symbols are misnamed. 46 + # If you have an arm/ES device without this problem, don't enable this macro. 47 + add_definitions(-DADD_MISSING_OES_FUNCTIONS) 48 + endif() 43 49 44 50 set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 45 51 set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 46 52 set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 47 53 elseif(EMSCRIPTEN) 54 + message(" Using Emscripten defaults.") 48 55 set(SDL_gpu_INSTALL_BY_DEFAULT OFF) 49 56 set(SDL_gpu_DEFAULT_BUILD_DEMOS OFF) 50 57 set(SDL_gpu_DEFAULT_DISABLE_OPENGL ON) 51 58 set(SDL_gpu_DEFAULT_DISABLE_GLES OFF) 52 59 set(SDL_gpu_DEFAULT_BUILD_SHARED OFF) 60 + else() 61 + message(" Using generic defaults.") 53 62 endif() 54 63 55 64
+1 -1
include/SDL_gpu_GLES_1.h
··· 31 31 symbols in library are missing the OES suffix, 32 32 even though the headers seem to be named right. 33 33 */ 34 - #ifdef SDL_GPU_USE_BROADCOM_RASPBERRYPI_WORKAROUND 34 + #ifdef ADD_MISSING_OES_FUNCTIONS 35 35 extern void glBlendEquation(GLenum mode); 36 36 extern void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); 37 37 extern void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);