Giter Club home page Giter Club logo

objecttk's Introduction

What is ObjectTK?

ObjectTK is a thin abstraction layer on top of OpenTK to provide OpenGL features in an object-oriented and mostly type-safe manner with modern C#-style. It is fully aimed at modern OpenGL and compatible to the OpenGL4 core profile.

Currently there are types for the following OpenGL features:

  • Programs and Shaders
  • Textures
  • Vertex array objects
  • Buffer objects
  • Sampler objects
  • Query objects
  • Framebuffers
  • Renderbuffers

The main advantages of using these types are:

  • Cleaner interface than using the OpenGL API directly.
  • Type-safety when suitable.
  • Removes the necessary but error-prone boilerplate code from your project.
  • Immediate detection of leaked resources.
  • Information log via log4net.
  • The Debug-Build also includes additional sanity-checks which help tracking down common errors.

ObjectTK does not force you to use its functionality and skip the OpenGL API at all. It is perfectly fine to use the OpenGL API directly and the ObjectTK types side-by-side, because ObjectTK does not explicitly keep track of any OpenGL state which might get corrupted when you call the OpenGL API without it knowing. This is an essential feature which makes ObjectTK very usable even if it is not a "complete" wrapper around every corner of OpenGL.

What about performance?

Just like any wrapper it introduces another layer between the things you want to get done and the hardware, so it may theoretically slow things down a bit, but there are two things to consider:

  • When using modern OpenGL, which is the main target of ObjectTK, the number of API-calls is much lower than it used to be. That means that the overhead of each API-call is not that important anymore.
  • The wrapper really is very thin, more often than not there is just a single method call between you and the OpenGL API for functionality which might get used very often. For initialization-related stuff the layer may be a little thicker because it does things right, with all possible error-checking and so forth.

Examples

For examples please have a look at the Examples project and the wiki pages: Basic example

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.