Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glCreateBuffers and OpenGL 4.4 #67

Closed
Dressingoak opened this issue Jun 11, 2019 · 3 comments · May be fixed by #82
Closed

glCreateBuffers and OpenGL 4.4 #67

Dressingoak opened this issue Jun 11, 2019 · 3 comments · May be fixed by #82
Labels
Impact:Warning Something could be wrong

Comments

@Dressingoak
Copy link

Dressingoak commented Jun 11, 2019

Hi,
We should make it clear what OpenGL copatability the project should have. The moment we changed glGenBuffers to glCreateBuffers things went south (for me) with the exception:

Exception thrown at 0x0000000000000000 in Sandbox.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

Some quick research suggested that it's sue to me running OpenGL 4.4 on my laptop. This of course means that the solution does not run out-of-the-box in this case, and based on what I've read, it's due to GL_ARB_direct_state_access entering the core profile only as of 4.5. So:

  • Are there any reasons for not sticking with glGenBuffers ?
  • Might it be worth differentiating the implementation based on the GL version?
  • Should anything below 4.5 be unsupported all together?
@WillianKoessler
Copy link

WillianKoessler commented Jun 13, 2019

"Are there any reasons for not sticking with glGenBuffers ?"
I believe that he used glCreateBuffers just to match the same function names for generating buffers and shader. As he shown, glCreateBuffers does not bind the buffers as he expected.
The difference between glCreate and glGen is that glCreate returns buffers that are completely new and unused, unlike glGen, which reuse buffer names.
Somebody please correct me if i'm wrong, but there is no practical difference between glGen and glCreate

"Might it be worth differentiating the implementation based on the GL version?"
"Should anything below 4.5 be unsupported all together?"
I really don't see a reason for that. You could base your build on the GL version, but I don't think that is really necessary to limit the build to a GL version so recent. Older versions still working pretty fine

Ps: please forgive my english. It is far from ideal, i'm still working on it

@human-0
Copy link

human-0 commented Jun 17, 2019

glCreateBuffers is useful when working with other functions in GL_ARB_direct_state_access, such as glBindNamedBuffer. Since it's not being used at the moment, there is no difference. See #66.

Edit: In the Vertex Arrays episode, he said that we would not use this right now. So it should be switched to glGenBuffers.

@LovelySanta
Copy link
Collaborator

This was fixed in #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact:Warning Something could be wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants