Giter Site home page Giter Site logo

Comments (7)

thefiddler avatar thefiddler commented on May 18, 2024

Postponing to 1.2

from opentk.

Frassle avatar Frassle commented on May 18, 2024

Started making some progress on this in my fork, very hardcoded at the moment but wraps around OpenGL calls.

from opentk.

thefiddler avatar thefiddler commented on May 18, 2024

Awesome, thanks for looking into this!

The previous implementation used the following hard-coded rules:

  1. Every call is surrounded by using (new ErrorHelper(GraphicsContext.CurrentContext)) { /* actual call */ }
  2. GL.GetError() is not surrounded, as that would cause infinite recursion.
  3. GL.Begin() sets GraphicsContext.CurrentContext.ErrorChecking = false; before the OpenGL call.
  4. GL.End() sets GraphicsContext.CurrentContext.ErrorChecking = true; after the OpenGL call.

The reason for 3 and 4 is that it is an error to call GL.GetError() inside a begin-end region, so ErrorChecking = false temporarily turns off error checking.

The original generated code is available here (warning, large file).

from opentk.

Frassle avatar Frassle commented on May 18, 2024

Would like someone to just double check the code, it probably needs a cleanup but it's functional. https://github.com/Frassle/opentk/tree/develop

Also should I rewrite history before pull request?

from opentk.

thefiddler avatar thefiddler commented on May 18, 2024

Please rebase against opentk/develop before issuing the PR. I'll double check the code to make sure it works as expected on .Net and Mono.

from opentk.

Frassle avatar Frassle commented on May 18, 2024

OK, I'm going to make some final tidy ups and get to to work for other namespaces not just OpenTK.OpenGL then I'll submit the pull request.

from opentk.

thefiddler avatar thefiddler commented on May 18, 2024

This is now merged.

from opentk.

Related Issues (20)

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.