/GLUL

OpenGL Utility Library.

Primary LanguageC++MIT LicenseMIT

GLUL - OpenGL Utility Library

Branch Linux Windows Coverage Download
Master Build Status Build status Coverage Status Download
Develop Build Status Build status Coverage Status Download

**Modern C++ library** to speed-up working on **OpenGL** based applications and games.

Main features

  • Modern design
    • designed with C++11 and OpenGL 3.3+ in mind
    • no ugly hacks or workarounds
    • easy to read and understand code
    • simple to use
    • highly flexible
  • OpenGL object-oriented wrapper
    • type safety with strongly typed enumerations
    • no more resource leaks thanks to RAII
    • grouped functionality for ease of use
    • low-level access to OpenGL functionality
    • high-level abstractions to common usage patterns
  • Window creation and management
    • multiple window support
  • Input management
    • direct access to state of IO devices (Keyboard, Mouse, etc.)
    • event based abstractions
      • event aggregators, handlers and triggers
  • 2D graphics module
    • most popular primitives and shapes
      • Points, Lines, Triangles, Quads, Rectangles, Circles, Disks and so on...
      • Sprites
      • Text rendering
        • dynamic fonts (through FreeType2)
    • easily extendable
    • very fast, uses:
      • modern OpenGL (VAOs, VBOs etc.)
      • batching (all geometry can be drawn in one call*)
  • GUI module (in progress)
    • component/container architecture
    • easly extendable
    • many built-in widgets
      • buttons, checkboxes, input fields, sliders, progress bars etc.
    • many handy events like onMouseEnter, onMouseClick, onValueChange etc.
  • Framework(s) to speed-up building small-to-medium applications and games
  • Model loaders (e.g. OBJ model loader with full integration to library)
  • Many small usefull modules like:
    • clock module to measure performance/time
    • logging module (with custom streams)
    • image module
      • support for BMP, TGA, JPEG and PNG images (read & write)
    • operations on strings, files, timers, time loops, etc.
    • and others...
  • Cross-platform support
    • Windows
    • Linux
    • Mac OS

Library frequently uses C++11 features like move constructors/assignment operators, lambdas, range-based loops, strongly typed pointers (with nullptr), strongly typed enumerations (enum class), hash maps etc.

Building

Windows

  • Clone this repository
  • Download and configure all neccesary dependencies
    • Script provided in scripts\windows\install_msvc_dependencies.bat
  • Build library (and examples/tests) using provided:
    • Visual Studio 2013 project
    • CMake script

Linux

  • Clone this repository
  • Download and configure all neccesary dependencies
    • Script provided in scripts\linux\install_dependencies.sh
  • Build library (and examples/tests) using provided CMake script

Requirements

  • C++11 supporting compiler (project for Visual Studio 2013 provided)

Platforms tested

  • Windows (tested on Windows 7 x64)
  • Linux (tested on Ubuntu 14.04)
  • Mac OS (tested by user(s))

Compilers tested

  • MSVC (tested on Visual Studio 2013)
  • GCC (tested on GCC 5.1.0)
  • Clang (testen on Clang 3.6)

Dependencies

Examples of usage

You can find provided example projects showcasing library's usage in example directory or you can check out other projects which uses this library.

Provided examples:

  • 2D example (showcase of available 2D graphic objects and their usage)
  • Basic example (window creation and basic OpenGL usage)
  • Font example (basic text rendering and internal font processing demo)
  • Framework example (simple demo showing off basic framework for simple applications)
  • GUI example (showcase of GUI module - built in widgets, events etc.)
  • Image example (loading and saving of images, taking whole-window screenshots etc.)
  • Input demo (showing IO module - how to use it in many different ways)
  • Models demo (OBJ model loader with Phong shaders)

License

This project is licensed under the MIT License.

Contributions

Feel free to fork library (leaving details about author) and work on it with me. Issue list should be up to date on what is to do and what is to fix. If you'd like to see new features or functionality please contact me or add new issue and i'll do my best to add them.