-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from AlwinEsch/Leia-change
complete rewrite, update CMakeLists.txt to 3.5 and change fPIC
- Loading branch information
Showing
67 changed files
with
3,343 additions
and
2,113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#.rst: | ||
# FindOpenGLES | ||
# ------------ | ||
# Finds the OpenGLES2 and OpenGLES3 library | ||
# | ||
# This will define the following variables: | ||
# | ||
# OPENGLES_FOUND - system has OpenGLES | ||
# OPENGLES_INCLUDE_DIRS - the OpenGLES include directory | ||
# OPENGLES_LIBRARIES - the OpenGLES libraries | ||
# OPENGLES_DEFINITIONS - the OpenGLES definitions | ||
# | ||
|
||
if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
set(_brcmprefix brcm) | ||
endif() | ||
|
||
if(PKG_CONFIG_FOUND) | ||
pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) | ||
endif() | ||
|
||
if(NOT CORE_SYSTEM_NAME STREQUAL ios AND | ||
NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded) | ||
find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h | ||
PATHS ${PC_OPENGLES_INCLUDEDIR}) | ||
find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 | ||
PATHS ${PC_OPENGLES_LIBDIR}) | ||
else() | ||
find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES | ||
PATHS ${CMAKE_OSX_SYSROOT}/System/Library | ||
PATH_SUFFIXES Frameworks | ||
NO_DEFAULT_PATH) | ||
set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers) | ||
endif() | ||
|
||
find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(OpenGLES | ||
REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_INCLUDE_DIR) | ||
|
||
find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h | ||
PATHS ${PC_OPENGLES_INCLUDEDIR}) | ||
|
||
if(OPENGLES_FOUND) | ||
set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY}) | ||
if(OPENGLES3_INCLUDE_DIR) | ||
set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR} ${OPENGLES3_INCLUDE_DIR}) | ||
set(OPENGLES_DEFINITIONS -DHAS_GLES=3) | ||
mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES3_INCLUDE_DIR OPENGLES_gl_LIBRARY) | ||
else() | ||
set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR}) | ||
set(OPENGLES_DEFINITIONS -DHAS_GLES=2) | ||
mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY) | ||
endif() | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#.rst: | ||
# FindOpenGl | ||
# ---------- | ||
# Finds the FindOpenGl library | ||
# | ||
# This will define the following variables:: | ||
# | ||
# OPENGL_FOUND - system has OpenGl | ||
# OPENGL_INCLUDE_DIRS - the OpenGl include directory | ||
# OPENGL_LIBRARIES - the OpenGl libraries | ||
# OPENGL_DEFINITIONS - the OpenGl definitions | ||
|
||
if(PKG_CONFIG_FOUND) | ||
pkg_check_modules(PC_OPENGL gl QUIET) | ||
endif() | ||
|
||
if(NOT CORE_SYSTEM_NAME STREQUAL osx) | ||
find_path(OPENGL_INCLUDE_DIR GL/gl.h | ||
PATHS ${PC_OPENGL_gl_INCLUDEDIR}) | ||
find_library(OPENGL_gl_LIBRARY NAMES GL | ||
PATHS ${PC_OPENGL_gl_LIBDIR}) | ||
else() | ||
find_library(OPENGL_gl_LIBRARY NAMES OpenGL | ||
PATHS ${CMAKE_OSX_SYSROOT}/System/Library | ||
PATH_SUFFIXES Frameworks | ||
NO_DEFAULT_PATH) | ||
set(OPENGL_INCLUDE_DIR ${OPENGL_gl_LIBRARY}/Headers) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(OpenGl | ||
REQUIRED_VARS OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) | ||
|
||
if(OPENGL_FOUND) | ||
set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) | ||
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) | ||
set(OPENGL_DEFINITIONS -DHAS_GL=1) | ||
endif() | ||
|
||
mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DGLM_TEST_ENABLE_SIMD_SSE2=0 -DCMAKE_INSTALL_LIBDIR=lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7f093f11c49877716bab96813c2e834db6839095281c8c0c65c60c8bdb9504a3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
glm https://github.com/g-truc/glm/archive/47031aa4b7b079716e4cac496819e7f464b6a713.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DGLM_TEST_ENABLE_SIMD_SSE2=1 -DCMAKE_INSTALL_LIBDIR=lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7f093f11c49877716bab96813c2e834db6839095281c8c0c65c60c8bdb9504a3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
glm https://github.com/g-truc/glm/archive/47031aa4b7b079716e4cac496819e7f464b6a713.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(kissfft) | ||
|
||
enable_language(C) | ||
|
||
cmake_minimum_required(VERSION 2.6) | ||
|
||
set(SOURCES kiss_fft.c) | ||
|
||
if(NOT WIN32) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") | ||
endif() | ||
|
||
add_library(kissfft STATIC ${SOURCES}) | ||
set_property(TARGET kissfft PROPERTY POSITION_INDEPENDENT_CODE ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* Copyright (C) 2005-2019 Team Kodi | ||
* This file is part of Kodi - https://kodi.tv | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-or-later | ||
* See LICENSES/README.md for more information. | ||
*/ | ||
|
||
#pragma once | ||
|
||
//============================================================================== | ||
/// | ||
/// \defgroup cpp_kodi_gui_gl OpenGL helpers | ||
/// \ingroup cpp_kodi_gui | ||
/// \brief Auxiliary functions for Open GL | ||
/// | ||
/// This group includes help for definitions, functions, and classes for | ||
/// OpenGL. | ||
/// | ||
/// To use OpenGL for your system, add the \ref GL.h "#include <kodi/gui/gl/GL.h>". | ||
/// | ||
/// | ||
///----------------------------------------------------------------------------- | ||
/// | ||
/// The \ref HAS_GL is declared if Open GL is required and \ref HAS_GLES if Open GL | ||
/// Embedded Systems (ES) is required, with ES the version is additionally given | ||
/// in the definition, this can be "2" or "3". | ||
/// | ||
/// | ||
///----------------------------------------------------------------------------- | ||
/// | ||
/// Following \ref GL_TYPE_STRING define can be used, for example, to manage | ||
/// different folders for GL and GLES and make the selection easier. | ||
/// This are on OpenGL <b>"GL"</b> and on Open GL|ES <b>"GLES"</b>. | ||
/// | ||
/// **Example:** | ||
/// ~~~~~~~~~~~~~~~~~{.cpp} | ||
/// kodi::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/frag.glsl"); | ||
/// ~~~~~~~~~~~~~~~~~ | ||
/// | ||
/// | ||
///---------------------------------------------------------------------------- | ||
/// | ||
/// In addition, \ref BUFFER_OFFSET is declared in it which can be used to give an | ||
/// offset on the array to GL. | ||
/// | ||
/// **Example:** | ||
/// ~~~~~~~~~~~~~~~~~{.cpp} | ||
/// const struct PackedVertex { | ||
/// float position[3]; // Position x, y, z | ||
/// float color[4]; // Color r, g, b, a | ||
/// } vertices[3] = { | ||
/// { { -0.5f, -0.5f, 0.0f }, { 1.0f, 0.0f, 0.0f, 1.0f } }, | ||
/// { { 0.5f, -0.5f, 0.0f }, { 0.0f, 1.0f, 0.0f, 1.0f } }, | ||
/// { { 0.0f, 0.5f, 0.0f }, { 0.0f, 0.0f, 1.0f, 1.0f } } | ||
/// }; | ||
/// | ||
/// glVertexAttribPointer(m_aPosition, 3, GL_FLOAT, GL_FALSE, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, position))); | ||
/// glEnableVertexAttribArray(m_aPosition); | ||
/// | ||
/// glVertexAttribPointer(m_aColor, 4, GL_FLOAT, GL_FALSE, sizeof(PackedVertex), BUFFER_OFFSET(offsetof(PackedVertex, color))); | ||
/// glEnableVertexAttribArray(m_aColor); | ||
/// ~~~~~~~~~~~~~~~~~ | ||
|
||
#if HAS_GL | ||
#define GL_TYPE_STRING "GL" | ||
// always define GL_GLEXT_PROTOTYPES before include gl headers | ||
#if !defined(GL_GLEXT_PROTOTYPES) | ||
#define GL_GLEXT_PROTOTYPES | ||
#endif | ||
#if defined(TARGET_LINUX) | ||
#include <GL/gl.h> | ||
#include <GL/glext.h> | ||
#elif defined(TARGET_FREEBSD) | ||
#include <GL/gl.h> | ||
#elif defined(TARGET_DARWIN) | ||
#include <OpenGL/gl3.h> | ||
#include <OpenGL/gl3ext.h> | ||
#elif defined(WIN32) | ||
#error Use of GL under Windows is not possible | ||
#endif | ||
#elif HAS_GLES >= 2 | ||
#define GL_TYPE_STRING "GLES" | ||
#if defined(WIN32) | ||
#if defined(HAS_ANGLE) | ||
#include <angle_gl.h> | ||
#else | ||
#error Use of GLES only be available under Windows by the use of angle | ||
#endif | ||
#elif defined(TARGET_DARWIN) | ||
#if HAS_GLES == 3 | ||
#include <OpenGLES/ES3/gl.h> | ||
#include <OpenGLES/ES3/glext.h> | ||
#else | ||
#include <OpenGLES/ES2/gl.h> | ||
#include <OpenGLES/ES2/glext.h> | ||
#endif | ||
#else | ||
#if HAS_GLES == 3 | ||
#include <GLES3/gl3.h> | ||
#include <GLES3/gl3ext.h> | ||
#else | ||
#include <GLES2/gl2.h> | ||
#include <GLES2/gl2ext.h> | ||
#endif | ||
#endif | ||
#endif | ||
|
||
#ifndef BUFFER_OFFSET | ||
#define BUFFER_OFFSET(i) ((char *)nullptr + (i)) | ||
#endif |
Oops, something went wrong.