GithubHelp home page GithubHelp logo

isabella232 / tsunami-bindings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mono/tsunami-bindings

0.0 0.0 0.0 224 KB

OpenGL bindings for C# this code has not been in development for more than 6 years

Home Page: http://www.mono-project.com/

License: GNU General Public License v2.0

Perl 20.30% C# 79.70%

tsunami-bindings's Introduction

Tsunami.Bindings
================
March, 2004
Vladimir Vukicevic
[email protected]

Introduction
------------

Tsunami.Bindings is an OpenGL C# binding that efficiently deals with
extensions.  Building involves potentially editing the makefile if
you're on WIN32, and then typing "make".  Note that a cygwin
environment is assumed; at the very least, make and perl should be
available.

Both TsunamiBindingsCore.dll and TsunamiBindingsGl.dll need to be
referenced in your application.  There is no wrapping of GLX/WGL/AGL
functions or extensions done at the moment, though that may happen in
the future (patches appreciated!).

Note that the "gl" and "GL_" prefixes have been stripped from function
and constant names; thus, Gl.ClearColor(...) instead of
Gl.glClearColor(...).  The GL_ prefix is left on a very few enumerants
where the remainder of the symbol starts with a numeral.  For example,
GL_3D_... is left as GL_3D_...  The prefix stripping can be disabled
by editing csgen.pl.

Extension Handling Strategy
---------------------------

For each extension that you want to use, you must do:

   using Tsunami.Bindings;
   GlExtensionLoader.GetInstance().LoadExtension
     ("GL_ARB_vertex_buffer_object");

These calls must take place after the OpenGL context is established,
but obviously before any extension method invocations take place.

Extension data is parsed from files which were spit out by the GLEW
(http://glew.sourceforge.net/) tools, which process the extension
specifications themselves.  They are further hand-edited to include
method overloads, allow the usage of array types, ref/out types, and
similar.  Note that this is an ongoing process; only a very small
number of methods have been fully C#-ified, but the process to do so
is very simple -- just edit the appropriate glcore/* or glext/* file,
copy the line, and modify the signature to what it should be.

A custom attribute is added to each extension method to identify its
parent extension and original method name.  LoadExtension() uses this
attribute information to know which methods need to be loaded.

The postprocessor takes the compiled assembly and generates a new
assembly using Reflection.Emit, with IL to invoke the native methods
at addresses stored in fields in the Gl class (which are filled in at
LoadExtension time).

tsunami-bindings's People

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.