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

Command ordering glitch with EnableClientState and ColorPointer. #7

Closed
cxd4 opened this issue Sep 14, 2015 · 2 comments
Closed

Command ordering glitch with EnableClientState and ColorPointer. #7

cxd4 opened this issue Sep 14, 2015 · 2 comments

Comments

@cxd4
Copy link
Owner

cxd4 commented Sep 14, 2015

A couple times already, I've stumbled on a strange issue where the order of these mattered.

Really, their order shouldn't matter. The following code:

glColorPointer(number_of_channels, GL_FLOAT, stride, &vertex_cache[0]);
glEnableClientState(GL_COLOR_ARRAY);

... should be equivalent also to saying ...

glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(number_of_channels, GL_FLOAT, stride, &vertex_cache[0]);

You're supposed to be able to switch the two lines around and get the same result, but I've found in some cases that only the former works with my wrapper while the latter style fails. I have yet to see the bug enough times to really pinpoint what the issue is here.

@cxd4
Copy link
Owner Author

cxd4 commented Nov 21, 2015

I can further observe this issue by the symptom that initializing the state machine inside gl.js wrapper function init_GL_context() results in further errors and failures if either one of these is used:

glVertexPointer(4, GL_FLOAT, 0, null);
glColorPointer(4, GL_FLOAT, 0, null);

//[14:27:41.649] Error: invalid arguments @ gl.js:391

@cxd4
Copy link
Owner Author

cxd4 commented May 5, 2016

Cannot seem to reproduce this issue these days.

Maybe it was fixed by accident during one of the rewrites; maybe it was a bug in the Windows driver.
I'll wait until something solid and repeatable comes up during development again.

@cxd4 cxd4 closed this as completed May 5, 2016
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

1 participant