Skip to content

Comments

fix specifications for indirect draws#157

Open
PredatorCZ wants to merge 1 commit intoBSVino:mainlinefrom
PredatorCZ:fix-indirect-spec
Open

fix specifications for indirect draws#157
PredatorCZ wants to merge 1 commit intoBSVino:mainlinefrom
PredatorCZ:fix-indirect-spec

Conversation

@PredatorCZ
Copy link

Fixed documentation specification to be consistent with ARB_draw_indirect specification for core profile.

As per paragraph:

    Initially zero is bound to DRAW_INDIRECT_BUFFER. In the
    compatibility profile, this indicates that DrawArraysIndirect and
    DrawElementsIndirect are to source their arguments directly from the 
    pointer passed as their <indirect> parameters. In the core profile,
    an INVALID_OPERATION error is generated if zero is bound to
    DRAW_INDIRECT_BUFFER and DrawArraysIndirect or DrawElementsIndirect
    is called.

I haven't added compatibility profile behavior (that seems to be current state), since it could bring confusion.

@BSVino
Copy link
Owner

BSVino commented Feb 23, 2026

It's been a while for me, could you help me understand why the documentation was incorrect like this? Is this one of those things where the behavior of these function changes depending on what GL version or extensions you have, and you're changing it from the default behavior to the behavior that the extension specifies?

@PredatorCZ
Copy link
Author

This doesn't really have to have anything with version or extension itself. This is a profile issue, where the core profile behavior is not documented at all. I'd rather read documentation that works for both profiles, than for only one, leaving out the part, why it fails for the other one. Could save me the headache finding this issue.
This exact issue has been recently fixed for Khronos official docs as well.

@BSVino
Copy link
Owner

BSVino commented Feb 23, 2026

Gotcha. But doesn't this change it from from describing one profile to describing the other?

@PredatorCZ
Copy link
Author

PredatorCZ commented Feb 23, 2026

It does, but this depends what profile you consider default/active profile the website is written against.
If you consider compatibility profile as default, than current revision is correct, however people running core profile might not receive the correct information from current revision.

EDIT:
To put it more bluntly:
In compatibility profile, you can either bind command buffer, or provide client data.
In core profile, you can only bind command buffer and providing client data will result in error, that is not described in current revision.
Khronos official documentation fixed this by rewriting docs for core profile.
I do basically the same thing here.

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

Successfully merging this pull request may close these issues.

2 participants