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

Why no LINE_LOOP or POINT_LIST for al_draw_indexed_buffer? #941

fatcerberus opened this Issue Oct 13, 2018 · 1 comment


None yet
2 participants
Copy link

fatcerberus commented Oct 13, 2018

While skimming through Allegro's OpenGL code to try to teach myself how to use WebGL by proxy, I happened to notice that using an index buffer to draw line loops and point lists is not supported:

/* Unimplemented, as it's too hard to do for Direct3D */

This is, in fact, documented, but for some reason I missed the relevant bit in the documentation...

The stated reason why this is not supported in the Direct3D implementation (according to a code comment) is that it's "too hard to do in a consistent fashion", and I guess the support was left out of the OpenGL backend only for consistency (things must work in both places or not at all, makes sense).

What is the concrete reason for why indexed drawing of line-loops and points is hard to support in D3D? Does anyone even still know?


This comment has been minimized.

Copy link

SiegeLord commented Oct 13, 2018

For points, D3D just doesn't implement it (see, and for the line loop, it doesn't exist at all in D3D, and the non-vertex buffer implementation hacks around it by drawing the final line manually.

I suppose we could fall back to non-buffer implementations. We could log a warning and add a note in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.