{"id":13418493,"url":"https://github.com/matus-chochlik/oglplus","last_synced_at":"2025-05-16T10:07:36.497Z","repository":{"id":7533349,"uuid":"8885160","full_name":"matus-chochlik/oglplus","owner":"matus-chochlik","description":"OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.","archived":false,"fork":false,"pushed_at":"2021-10-26T06:11:56.000Z","size":17261,"stargazers_count":496,"open_issues_count":32,"forks_count":71,"subscribers_count":51,"default_branch":"develop","last_synced_at":"2025-05-10T17:47:37.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://oglplus.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matus-chochlik.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-19T17:52:30.000Z","updated_at":"2025-05-02T20:15:04.000Z","dependencies_parsed_at":"2022-09-14T01:00:28.560Z","dependency_job_id":null,"html_url":"https://github.com/matus-chochlik/oglplus","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matus-chochlik%2Foglplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matus-chochlik%2Foglplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matus-chochlik%2Foglplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matus-chochlik%2Foglplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matus-chochlik","download_url":"https://codeload.github.com/matus-chochlik/oglplus/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:02.915Z","updated_at":"2025-05-16T10:07:31.464Z","avatar_url":"https://github.com/matus-chochlik.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","Graphics","C++"],"sub_categories":[],"readme":"==============\nOGLplus README\n==============\n\n:Author: Matúš Chochlík \u003cchochlik@gmail.com\u003e\n\n.. contents::\n\n.. _OpenGL: http://opengl.org/\n.. _OpenAL: http://openal.org/\n.. _EGL: http://www.khronos.org/egl\n.. _OGLplus: http://oglplus.org/\n.. _CMake: http://www.cmake.org/\n.. _Doxygen: http://www.doxygen.org/\n.. _Inkscape: http://inkscape.org/\n.. _libPNG: http://www.libpng.org/\n.. _GLEW: http://glew.sourceforge.net/\n.. _GL3W: http://github.com/shakesoda/gl3w\n.. _GLFW: http://www.glfw.org/\n.. _FreeGLUT: http://freeglut.sourceforge.net/\n.. _SDL: http://www.libsdl.org/\n.. _wxGL: http://www.wxwidgets.org/\n.. _Qt: http://qt.digia.com/\n\nImportant note\n--------------\n\nPlease note that this project is obsolete and deprecated.\nA new version of EGL, OpenGL, OpenAL wrapper using modern C++ is implemented\nby the `eagine-all` project and its sub-modules:\n\n * https://github.com/matus-chochlik/eagine-all\n\n   * https://github.com/matus-chochlik/eagine-core\n   * https://github.com/matus-chochlik/eagine-sslplus\n   * https://github.com/matus-chochlik/eagine-msgbus\n   * https://github.com/matus-chochlik/eagine-shapes\n   * https://github.com/matus-chochlik/eagine-eglplus\n   * https://github.com/matus-chochlik/eagine-oglplus\n   * https://github.com/matus-chochlik/eagine-oalplus\n   * https://github.com/matus-chochlik/eagine-ecs\n   * https://github.com/matus-chochlik/eagine-app\n\nIntroduction to OGLplus\n=======================\n\n`OGLplus`_ is collection of portable open-source libraries which implement thin\nobject-oriented facades over the `OpenGL`_  (version 3 and higher),\n`OpenAL`_ (version 1.1) and `EGL`_ (version 1.4) C-language APIs.\nIt provides wrappers which automate resource and object management and make\nthe use of OpenGL, OpenAL and EGL in C++ safer and easier.\n\n\n\nBuilding and Installation\n=========================\n\nFor the impatient:\n------------------\n\n::\n\n # linux and similar *nix systems\n $\u003e ./configure.sh\n # or\n $\u003e ./configure.sh --prefix=/path/to/install\n\n $\u003e cd _build\n $\u003e make\n $\u003e make install\n\n # windows\n $\u003e .\\configure.bat\n # open the generated MSVC solution in the _build directory\n # or use some variant of make if available\n\n # On platforms with python\n $\u003e python configure.py --build\n\nFor the busy:\n-------------\n\n::\n\n # linux and similar *nix systems\n $\u003e ./configure.sh [--prefix=/path/to/install] [--no-docs] --no-examples --build --install\n\nOverview\n--------\n\nOGLplus uses a CMake-based build/configuration system. The library itself\nis header-only, which means that applications using it do not need to link\nto a compiled library, but need just to include the header files [#oglplus_link_library]_.\n\nThe build system handles several important tasks:\n\n * Detects if the necessary things are installed and makes a site-configuration\n   header file\n\n * Detects the support for several C++11 features and builds a config header\n\n * Builds several additional, automatically generated headers\n\n * Installs all header files to a directory specified by the install prefix\n\n * Builds the example executables and assets (textures, models, etc.)\n   used by the examples (optional)\n\n * Builds and installs the documentation (optional)\n\n\nRequirements\n------------\n\n - Compiler supporting required C++11 features [#req_cxx11_feats]_.\n   Currently supported compilers:\n\n   * ``g++`` (at least version 4.5, 4.6 and higher is recommended)\n\n   * ``clang++`` (at least version 3.0) - possibly with some limitations\n     due to the lack of support for some C++11 features\n\n   * ``MSVC 2012`` - with some limitations due to the lack of support for\n     some C++11 features\n\n\n - `CMake`_ (required)\n\n - `Doxygen`_ (optional) is required to build the documentation. This can be disabled\n   with the ``--no-docs`` command line option of the ``configure`` script (see below).\n\n - `Inkscape`_ (optional) is used to convert textures for the examples from SVG to PNG.\n   This is required only if the textures are not pre-built (typically\n   when checked out from the repository, packaged releases are shipped with\n   pre-built textures). Building of the textures is optional, they are not\n   necessary when the building of examples is disabled.\n\n - A library defining the OpenGL API (required) -- the ``GL/glcorearb.h`` or ``GL3/gl3.h``\n   headers or `GLEW`_, `GL3W`_, etc. and the corresponding binary library (``libGL.so``,\n   ``OpenGL32.lib``, ``libGLEW.so``, etc.).  OGLplus does not define the OpenGL symbols\n   (types, constants, functions, etc.), therefore applications using\n   it need to define them themselves (before including OGLplus). The examples\n   currently need GLEW (at least version 1.9) or the ``GL/glcorearb.h`` header\n   (available for download from www.opengl.org/registry/api/glcorearb.h) and\n   a GL binary library exporting the OpenGL (3 or higher) functions.\n   The build system detects the presence of GLEW or ``GL/glcorearb.h`` and configures\n   compilation and linking of the examples accordingly.\n   Note, however, that if several options (like both GLEW and ``GL/glcorearb.h`` plus\n   the binary GL lib) are available it may be necessary to specify which option to use.\n   On Linux and similar systems the precedence is following: ``GL/glcorearb.h + libGL.so``,\n   ``GL3/gl3.h + libGL.so``, `GLEW`_ and `GL3W`_ (the first one found is used, unless\n   specified otherwise).  On Windows systems the precedence is:  `GLEW`_, `GL3W`_,\n   ``GL/glcorearb.h + OpenGL.lib`` and ``GL3/gl3.h + OpenGL.lib``.\n   Also note, that on systems with multiple versions of ``libGL.so`` (for example one\n   provided by Mesa3D and another provided by your GPU vendor) it may be necessary\n   to specify with the ``--library-dir`` option to the ``configure`` script (described\n   below) in which directories to search for the library.\n   The library to be used can be explicitly specified with the ``--use-gl-header-lib``\n   option or with one of the ``--use-*`` options of the ``configure`` script.\n\n - A library initializing the default rendering context (required) -- Currently\n   the examples can be built if at least one of the following libraries is\n   installed on the system: X11+GLX, `FreeGLUT`_, `GLFW`_, `SDL`_, `wxGL`_ or `Qt`_.\n   The build system detects the presence of these libraries and configures\n   compilation and linking of the examples accordingly.\n   The library to be used can be explicitly specified with the ``--use-gl-header-lib``\n   option or with one of the ``--use-*`` options of the ``configure`` script (see below).\n\n\n - `libPNG`_ (optional) -- Some examples and some classes provided by OGLplus use libPNG to load\n   PNG files. These are however not required for the general use of OGLplus,\n   applications may use other means to load binary image files. The build system\n   tries to detect the availability of libPNG and if not found the examples\n   using it are not built.\n\n\nOn Linux distributions with the ``apt`` package manager, the following should\nbe enough to install most of the dependencies for the FreeGLUT+GLEW configuration:\n\n::\n\n sudo apt-get install doxygen cmake g++ libglew-dev freeglut3-dev libpng12-dev\n\nFor the configuration using GLFW+GLEW you would need the following:\n\n::\n\n sudo apt-get install doxygen cmake g++ libglew-dev libglfw-dev libpng12-dev\n\nThese two configs mentioned above are usually the ones that work on most systems.\nOf course other combinations of the 'GL-API' and 'GL-Context' libraries\nare supported and may be used as explained above.\nFor other configurations using SDL, Qt4, wxWidgets, etc. you need to install\nthe appropriate packages (the names vary wildly between distrubutions or even\nbetween versions of the same distribution so they are not listed here).\n\n\nCMake-based build configuration\n-------------------------------\n\nThe CMake script defines and uses several variables to modify the build\nconfiguration, which can be specified on the command-line when invoking\ncmake (with the -D option. see cmake manual for details):\n\n * ``HEADER_SEARCH_PATHS`` *\u003cempty\u003e*: (semicolon-separated) list of paths\n   to additional directories to search when looking for 3rd-party headers\n   like GL/glew.h, GL3/gl3.h, GL/glcorearb.h, etc.\n\n * ``LIBRARY_SEARCH_PATHS`` *\u003cempty\u003e*: (semicolon-separated) list of paths\n   to additional directories to search when looking for 3rd-party binary\n   libraries like GL, GLEW, GL3W, GLFW, SDL, glut, png, etc.\n\n * ``OGLPLUS_NO_EXAMPLES`` *Off*: Do not build the examples nor the assets.\n\n * ``OGLPLUS_NO_DOCS`` *Off*: Do not build and install the documentation.\n\n\nUser-friendly configuration script\n----------------------------------\n\nThe configuration script comes in three flawors:\n\n1. ``configure.sh`` -- For platforms with bash.\n2. ``configure.bat`` -- For windows.\n3. ``configure.py`` -- For platforms with python (recommended).\n                       This version of the script is the most portable\n                       and supports most features.\n\nThe ``configure`` script is a more user-friendly way to invoke cmake and to specify\nadditional parameters for the configuration process.\n\nSome of the more important command-line options are described below:\n\n--help  Display the help screen.\n\n--prefix PATH       Specifies the installation prefix path for cmake (sets\n                    the value of the CMAKE_INSTALL_PREFIX variable).\n                    If this option is not specified, cmake's default prefix is used.\n\n--include-dir PATH    Specify additional directiories\n                      to search when looking for header files. It may be used multiple\n                      times to specify multiple directories. Headers are searched\n                      in the directories specified with this option in the same order\n                      in which they appear on the command-line and the default system\n                      header locations are searched only afterwards. The first header\n                      found is used, in case there are multiple versions of the searched\n                      header file.\n\n\n--library-dir PATH    Specify additional directiories\n                      to search when looking for compiled libraries. It may be used\n                      multiple times to specify multiple directories. Libraries are\n                      searched in the directories specified with this option\n                      in the same order in which they appear on the command-line\n                      and the default system library locations are searched afterwards.\n                      The first library found is used, in case there are multiple\n                      versions of the searched library.\n\n--no-docs  Do not build the documentation.\n\nSee the ``--help`` option for the full description and detailed info on the usage\nof this script. Bash users can also do ``source config/configure.bash_complete``\nto install a bash completion extension that allows to TAB-complete the command\nline arguments for the ``configure-oglplus`` configuration script that invokes\n``configure.py``.\n\n\nOther build environments\n========================\n\nMicrosoft Visual Studio 2012\n----------------------------\n\nOGLplus contains a solution file and a set of project files for building\nsome of the examples in MSVC 2012.\nThe solution is located at the following path:\n\n- ``$(OGLplusRoot)/etc/msvc11/OGLplus/OGLplus.sln``\n\nTo build properly, it requires GLEW (1.9 or higher) and FreeGLUT libraries\nto be installed and added to the list of header/library search paths\nin the solution. This can be achieved by setting the following variables\nvisible to MSVC:\n\n* ``OGLPLUS_DEP_INCLUDE_DIRS`` - list of (semicolon-separated) paths pointing\n  to the directories where GLUT's and GLEW's header files are located.\n\n* ``OGLPLUS_DEP_LIBRARY_DIRS`` - list of (semicolon-separated) paths pointing\n  to the directories where GLUT's and GLEW's .lib files are located.\n\n* ``OGLPLUS_DEP_LIBS`` - list of (semicolon-separated) .lib files to be linked\n  to the examples. Typically ``glew32.lib;freeglut.lib`` for dynamic linking\n  or ``glew32s.lib;freeglut_static.lib`` for static linking.\n\n* ``OGLPLUS_PP_DEFS`` - list of (semicolon-separated) preprocessor symbols\n  that should be defined. Typically ``GLEW_STATIC;FREEGLUT_STATIC`` are\n  required for static linking of GLEW and FreeGLUT.\n\nThese variables can be set either as system or user environment variables\nor the ``OGLplus-site.props`` property sheet file (located in the solution's\ndirectory) can be used. Either edit the file in a text editor or use MSVC's\n*Property Manager* and set the variables listed above as appropriate\non your system. Note, that the ``OGLplus-site.props`` file already\ndefines variables like the above, but with appended underscore\n(for example ``OGLPLUS_DEP_INCLUDE_DIRS_``, etc.). To set the variables\nyou can open the file in a text editor, remove the underscores and set\nthe values to match your system configuration.\n\nAlso note that when building the examples via the MSVC solutions\nthe ``$(OGLplusRoot)/_prebuilt/`` directory is required. This directory\ncontains automatically generated textures and other files that are\nnot in the source repository. This directory is included in the release\npackages. If you are building from sources from the Git repository\nalso download a recent package and copy the ``_prebuilt/`` directory\ninto to the directory where you have cloned the repo or use the cmake\nbuild system and build them that way.\n\n\nAssets used in examples\n=======================\n\nMany of the examples use binary media files which are not suitable\nfor inclusion to the source repository mainly because of their size.\nOGLplus examples use texture bitmaps, fonts and models, OALplus examples use sounds,\netc. Some of these media files can be generated from textual representations\n(for example SVG files converted or POVray sources rendered to bitmaps).\nAssets for which there is a textual source and its size does not exceed\ncertain limits are included in the repository and are rendered into their\nbinary form by the build system. This may however require some third-party\napplications and the rendering process can be very time-consuming.\n\nBecause of this, some of the medium-sized assets are pre-built and shipped\nwith the release packages (in the ``_prebuilt/`` directory) and the larger\nassets can be downloaded individually from\nhttp://sourceforge.net/projects/oglplus/files/assets/\n\n\nAcknowledgements\n================\n\n- *Tolga Dalman* for helping to get started with CMake.\n- *Timo Keller* for contributing one of the examples.\n- *Denis Ovod* for constructive critique and suggestions.\n- *Per Nordlöw* for useful suggestions.\n- *Dmitry Yakimenko (detunized)* for several patches and porting to MacOS X.\n- *Csala Tamás* for useful feedback and help with the fixing of several bugs.\n- *David McFarland* for several patches.\n- *Jesús Zazueta* for useful feedback and help with the fixing of several bugs.\n- *Konstantin Gainullin* for porting to Marmalade and fixing several warnings.\n- *Peter Laufenberg* for several patches.\n- *Jan P Springer (regnirpsj)* for contributing SSBO wrappers and example.\n- *Mikołaj Siedlarek* for libpng-related fixes.\n- *Jason Francis* for several bugfixes.\n\n\nLicense\n=======\n\nCopyright 2008-2019 Matus Chochlik. Distributed under the Boost\nSoftware License, Version 1.0. (See accompanying file\nLICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n\n\n.. [#oglplus_link_library] Although OGLplus is generally a header-only library,\n   several parts of it (mostly some complex functions or functions with static data)\n   can optionally be built separately and linked to applications, which can lead\n   to improved build times especially for larger projects.\n   See the documentation for the ``OGLPLUS_LINK_LIBRARY`` preprocessor configuration\n   option for more details. Generally if ``OGLPLUS_LINK_LIBRARY`` is set to zero\n   then everything is inlined, otherwise some functions are only declared, but not\n   defined and the ``oglplus/lib.hpp`` header that contains the definition\n   of all such functions must be included in one of the translation\n   units that are linked into the final application.\n\n.. [#req_cxx11_feats] OGLplus requires the following C++11 features:\n   The ``type_traits`` and ``tuple`` librares, variadic preprocessor macros, r-value\n   references and move-constructors.\n   OGLplus also uses (but has workarounds for or disables certain components\n   and/or functions if the features are not available):\n   Strongly typed enumerations, variadic templates, initializer lists, lambdas,\n   defaulted and deleted functions, function template default arguments,\n   constexpr, noexcept, nullptr, explicit conversion operators, unicode literals\n   and user-defined literals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatus-chochlik%2Foglplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatus-chochlik%2Foglplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatus-chochlik%2Foglplus/lists"}