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

Human readable values for GLbitfields #203

Merged

Conversation

openforeveryone
Copy link
Contributor

Fix for Issue #148.
The API tree view now displays human readable values for GLbitfields e.g. glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ).

The API tree view now displays human readable values for GLbitfields e.g. glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ).

Changes:
Modified pretty_print_param_val() to be able to output pretty interpretations of GLbitfields.
If it finds that the parameter is of type VOGL_GLBITFIELD then it will test each bit in turn and if it is set will look for an appropriate name for that mask.
It separates each mask with a "|", displays a decimal representation if no name is found for a mask and simply displays "0" if no bits are set.
PeterLValve pushed a commit that referenced this pull request Apr 14, 2015
 Human readable values for GLbitfields
@PeterLValve PeterLValve merged commit 4e10967 into ValveSoftware:master Apr 14, 2015
@PeterLValve
Copy link
Contributor

Thank you!

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