Code Monkey home page Code Monkey logo

Comments (6)

Spasi avatar Spasi commented on May 17, 2024

The docs say:

GL_INVALID_OPERATION is generated by glEnableVertexArrayAttrib and
glDisableVertexArrayAttrib if vaobj is not the name of an existing vertex array object.

If what you're saying is true, then it must be a driver bug. LWJGL does nothing special when you call that method.

There are several problems with the SDK reference links, including the one you described. It's a known issue that will be address at a later time.

from lwjgl3.

tdaniel22 avatar tdaniel22 commented on May 17, 2024

Ok then, I don't really know how LWJGL implements OpenGL methods. I will make some more tests and see if I can get it working with another driver version.

from lwjgl3.

tdaniel22 avatar tdaniel22 commented on May 17, 2024

Well, I finally figured out how to get it working: in fact, you need to bind a VAO or VBO at least one time after creation before using it with a DSA function. So after calling glGenVertexArrays() or glGenBuffers(), I bind the object and unbind it once. I don't know if this behaviour is intended, but it is for sure not in the documentation (or I might be blind).

from lwjgl3.

Spasi avatar Spasi commented on May 17, 2024

See paragraph 2.6.1.1 of the OpenGL specification:

Generated names do not initially correspond to an instance of an object. Objects
with generated names are created by binding a generated name to the context.
For example, a buffer object is created by calling the command BindBuffer with
a name returned by GenBuffers, which allocates resources for the buffer object
and its state, and associate the name with that object.

from lwjgl3.

tdaniel22 avatar tdaniel22 commented on May 17, 2024

Well, thank you. Shame on me .. My mistake will maybe help someone else. Since this property is invisible when using non DSA functions, it's kind of easy to forget. And sorry for turning this issue into a forum thread.

from lwjgl3.

httpdigest avatar httpdigest commented on May 17, 2024

There is the GL45.glCreateVertexArrays function creating the name of a VAO without the need to bind it in order to make it a VAO object.
Correspondingly, there are all those other glCreate* functions, such as GL45.glCreateBuffers (buffer creation without needing to bind it) as well as GL45.glCreateTextures for texture objects, GL45.glCreateFramebuffers for FBOs and GL45.glCreateRenderbuffers for render buffers.

from lwjgl3.

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.