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

Chapter 6: Example 6-6: No information provided on what's passed in as GLfloat **vtxBuf #41

Open
jbpzip opened this issue Jan 15, 2017 · 0 comments

Comments

@jbpzip
Copy link

jbpzip commented Jan 15, 2017

In the example 6-6, signature of DrawPrimitiveWithVBOs() changes from that in example 6-5. The argument GLfloat *vertices is suddenly GLfloat **vtxBuf in example 6-6 .

In example 6-5 the caller of DrawPrimitiveWithVBOs() is clearly shown, passing vertices for the argument GLfloat *vtxBuf. But there is no indication in the book on what is passed in for GLfloat **vtxBuf that's later accessed with vtxBuf[0] and vtxBuf[1]. Passing in the same GLfloat vertices[] will not work in example 6-6.

Having two functions of exact same name with a sudden change of signature and no clear indication could be confusing, especially when reading the text without close inspection of the source code here on github.

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