Coder Social home page Coder Social logo

fastuidraw's Introduction

Fast UI Draw

Fast UI Draw in a library that provides a higher performance Canvas interface. It is designed so that it always draws using a GPU.

In contrast to many common implementations of Canvas drawing, Fast UI Draw has that changes in clipping are very cheap and optimized for GPU's. In addition, Fast UI Draw has, with the GL backend, very few pipeline states. Indeed an API trace of an application using Fast UI Draw will see only a handful of draw calls per frame, even under high Canvas state trashing, and high clip state changes. Indeed, for the GL backend, only one Canvas state change invokes a pipeline state change: changing the Porter-Duff blend mode.

In addition, Fast UI Draw gives an application the ability to make their own shaders for custom drawing.

Documentation

Fast UI Draw uses doxygen for documentation, build and view documentation by:

  • make docs
  • xdg-open docs/doxy/html/index.html

GL requirements

The GL backend requires GL version 3.3. The GL extension GL_ARB_texture_view is not required but strongly recommended; this extension is core starting in GL version 4.3.

The GLES backend requires GLES version 3.0. If the GLES version is 3.0 or 3.1, it is strongly recommended that one of the extension GL_OES_texture_buffer or GL_EXT_texture_buffer is present. For GLES 3.0, 3.1 and 3.2, the extensions GL_EXT_blend_func_extended, GL_OES_texture_view and (GL_APPLE_clip_distance or GL_EXT_clip_cull_distance) are not required but strongly recommended.

Building requirements

  • GNU Make
  • g++ (clang should be fine too)
  • freetype
  • flex
  • perl
  • up to date GL (and GLES) headers
    • You need
    • The expected place of those headers is hard-coded to be system headers in the typical location. For Linux this is /usr/include and for MinGW this is /mingw/include. If the headers are located elsewhere on your system, edit Makefile.gl_backend.settings.mk and change GL_INCLUDEPATH (and possibly GL_RAW_HEADER_FILES and/or GLES_RAW_HEADER_FILES) as required by your system.
  • SDL2 (demos only)
  • doxygen (for documentation)

Building

"make targets" to see all build targets. The following variables control what is built:

  • BUILD_GL (default value 1). If 1, build libFastUIDrawGL (and demos for GL)
  • BUILD_GLES (default value 0). If 1, build libFastUIDrawGLES (and demos for GLES)

Installing

Doing "make INSTALL_LOCATION=/path/to/install/to install" will install fastuidraw to the named path. Demos are NOT installed! The default value of INSTALL_LOCATION is /usr/local, change as one sees fit. Placement is as follows:

  • INSTALL_LOCATION/lib: libraries
  • INSTALL_LOCATION/include: header files
  • INSTALL_LOCATION/bin: fastuidraw-config script (and .dll's for MinGW)
  • INSTALL_LOCATION/share/doc/fastuidraw: documentation

Using project

After installation, the script, fastuidraw-config, is available and copied to INSTALL_LOCATION/bin. Use the script to get linker and compile flags for building an application.

Notes

  • FastUIDraw has the main meat in libFastUIDraw.
  • The GL backend is libFastUIDrawGL
  • The GLES backend is libFastUIDrawGLES
  • The debug and release versions of the libraries should not be mixed; if you are building for release, then use the release versions and the release flags. If you are building for debug use the debug libraries and the debug flags. These values are outputted by fastuidraw-config. -- The release flags include -DNDEBUG to turn off assert. A number of the template classes defined in fastuidraw/util have calls to assert(). These calls perform bounds checking, checking for nullptr and significantly drop performance.
  • All demos when given -help as command line display all options
  • The demos require that the libraries are in the library path

Successfully builds under

fastuidraw's People

Contributors

krogueintel avatar constellation avatar kevin-rogovin avatar xzcvczx avatar yzsolt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.