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

Function signature description error #94

Open
smile-zyk opened this issue Apr 16, 2024 · 3 comments
Open

Function signature description error #94

smile-zyk opened this issue Apr 16, 2024 · 3 comments
Assignees

Comments

@smile-zyk
Copy link

There is a function signature error on page 369 of https://registry.khronos.org/OpenGL/specs/gl/glspec46.core.pdf

void MultiDrawArraysIndirectCount( enum mode, const
void *indirect, intptr drawcount, intptr maxdrawcount,
sizei stride );

According to the description below: maxdrawcount specifies the maximum number of draws that are expected to be stored in the buffer, The variable maxdrawcount seems to have a sizei type.
And i found the signature of this function in glad as

#define glMultiDrawArraysIndirectCount glad_glMultiDrawArraysIndirectCount
typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC)(GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);

I think the type of intptr is very confusing and hard to understand

@NogginBops
Copy link

Was this ever fixed?
Only thing I can find is this, but this is a while ago and the spec still seems to have this issue?
#17

@smile-zyk
Copy link
Author

Was this ever fixed? Only thing I can find is this, but this is a while ago and the spec still seems to have this issue? #17

I noticed that there are many other function signatures in opengl that also use ptr as the type for size (e.g., size in glBufferData), so I thought maybe this is a convention to ensure that this variable is always byte aligned?

@smile-zyk smile-zyk reopened this May 6, 2024
@zmike
Copy link

zmike commented May 8, 2024

@oddhack WG has resolved that this is an error. Please make the following changes:

  • change parameters drawcount and maxdrawcount to be type sizei in the specification
  • change parameter drawcount to be type sizei in the headers

@zmike zmike added this to the Needs Action/PR milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants