added some opengl files TODO: fix up using glew as optional

This commit is contained in:
herbglitch 2024-01-19 01:17:19 -07:00
parent c614c679a9
commit d170a64a41
24 changed files with 164 additions and 93 deletions

View file

@ -0,0 +1,20 @@
set(ARCHEUS_STD_OPENGL_GRAPHICS_SOURCES
src/graphics/opengl/circle.c
src/graphics/opengl/line.c
src/graphics/opengl/obround.c
src/graphics/opengl/rectangle.c
src/graphics/opengl/sprite.c
src/graphics/opengl/spritesheet.c
src/graphics/opengl/text.c
)
function(opengl_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES ARCHEUS_STD_GRAPHICS_BACKEND)
#add matching files for the selected backends
if(${ARCHEUS_STD_GRAPHICS_BACKEND} STREQUAL "OPENGL")
string(APPEND ${_ARCHEUS_STD_FLAGS} "-lGL -DARC_OPENGL_GRAPHICS ")
list(APPEND ${_ARCHEUS_STD_SOURCES} ${ARCHEUS_STD_OPENGL_GRAPHICS_SOURCES})
endif()
set(${_ARCHEUS_STD_FLAGS} ${${_ARCHEUS_STD_FLAGS}} PARENT_SCOPE)
set(${_ARCHEUS_STD_SOURCES} ${${_ARCHEUS_STD_SOURCES}} PARENT_SCOPE)
endfunction()