mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
request OpenGL programmable pipeline, adjust cmake includes
This commit is contained in:
parent
a82dfb16cf
commit
e419df49a5
3 changed files with 8 additions and 7 deletions
|
@ -2,8 +2,10 @@ cmake_minimum_required(VERSION 2.8)
|
|||
|
||||
project(libsuperderpy C)
|
||||
|
||||
include("cmake/include.cmake")
|
||||
include("cmake/SetPaths.cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(libsuperderpy)
|
||||
include(SetPaths)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
|
|||
add_definitions(-D_XOPEN_SOURCE=600)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c11")
|
||||
|
||||
if(APPLE)
|
||||
if(CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}")
|
||||
|
@ -15,8 +16,6 @@ if(APPLE)
|
|||
|
||||
endif(APPLE)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/libsuperderpy/cmake ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
include_directories("libsuperderpy/src")
|
||||
|
||||
if(MINGW)
|
||||
|
@ -52,7 +51,7 @@ endif(APPLE)
|
|||
|
||||
MACRO(register_gamestate name)
|
||||
|
||||
add_library("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" SHARED "${name}.c")
|
||||
add_library("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" SHARED "${name}")
|
||||
|
||||
set_target_properties("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" PROPERTIES PREFIX "")
|
||||
|
|
@ -115,8 +115,8 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (game->config.fullscreen) al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW);
|
||||
else al_set_new_display_flags(ALLEGRO_WINDOWED);
|
||||
if (game->config.fullscreen) al_set_new_display_flags(ALLEGRO_PROGRAMMABLE_PIPELINE | ALLEGRO_FULLSCREEN_WINDOW | ALLEGRO_OPENGL);
|
||||
else al_set_new_display_flags(ALLEGRO_PROGRAMMABLE_PIPELINE | ALLEGRO_WINDOWED | ALLEGRO_OPENGL);
|
||||
al_set_new_display_option(ALLEGRO_VSYNC, 2-atoi(GetConfigOptionDefault(game, "SuperDerpy", "vsync", "1")), ALLEGRO_SUGGEST);
|
||||
al_set_new_display_option(ALLEGRO_OPENGL, atoi(GetConfigOptionDefault(game, "SuperDerpy", "opengl", "1")), ALLEGRO_SUGGEST);
|
||||
#ifdef ALLEGRO_WINDOWS
|
||||
|
|
Loading…
Reference in a new issue