feat(opengles): add basic driver for opengles (#6254)

Co-authored-by: Dany Liu <dany.yang.liu@email.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
Dany.L
2024-06-08 04:54:52 +08:00
committed by GitHub
parent 9a7639ccea
commit d85a39e78c
20 changed files with 1396 additions and 1 deletions

View File

@@ -336,6 +336,18 @@ if ($ENV{NON_AMD64_BUILD})
include_directories(${LIBINPUT_INCLUDE_DIRS})
endif()
# OpenGL ES is required for its driver
if (NOT $ENV{NON_AMD64_BUILD})
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(glfw3 REQUIRED)
# Include directories
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${GLEW_INCLUDE_DIRS})
include_directories(${GLFW_INCLUDE_DIRS})
endif()
if (NOT LIBINPUT_FOUND)
message("libinput not found, defaulting to 0")
add_definitions(-DLV_USE_LIBINPUT=0)
@@ -423,6 +435,13 @@ foreach( test_case_fname ${TEST_CASE_FILES} )
m
pthread
${TEST_LIBS})
if (NOT $ENV{NON_AMD64_BUILD})
target_link_libraries(${test_name} PRIVATE
${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} glfw)
endif()
target_include_directories(${test_name} PUBLIC ${TEST_INCLUDE_DIRS})
target_compile_options(${test_name} PUBLIC ${LVGL_TESTFILE_COMPILE_OPTIONS})

View File

@@ -134,6 +134,10 @@
#define LV_LIBINPUT_XKB 1
#endif
#if !defined(NON_AMD64_BUILD) && !defined(_MSC_VER) && !defined(_WIN32)
#define LV_USE_OPENGLES 1
#endif
#define LV_USE_FREETYPE 1
#define LV_FREETYPE_USE_LVGL_PORT 0
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 10