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

some adjustments for the shader chapter #202

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

tpltnt
Copy link
Collaborator

@tpltnt tpltnt commented Apr 17, 2016

Hi there,

here are some adjustments for the shader chapter.


Rendering an ofMesh start out as some vertex buffers on the CPU side that get filled with arrays of vertex attributes like colors or positions or texture coordinates. These attributes are used as the inputs into the vertex shader, this is what you're working with in your vertex shader. When you call draw() on an ofMesh the indexes control how the vertices get assembled into triangles later on.
Rendering an ofMesh starts out as some vertex buffers on the CPU side are getting filled with arrays of vertex attributes like colors or positions or texture coordinates. These attributes are used as the inputs into the vertex shader, this is what you're working with in your vertex shader. When you call draw() on an ofMesh the indexes of the arrays with the vertex attributes control how the vertices get assembled into triangles later on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct, the indices refer to the specific indices vector not to the indices of the attributes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the mentioning of indexes to simplify the explanation. Better now?

@tpltnt
Copy link
Collaborator Author

tpltnt commented Apr 22, 2016

ping

@tpltnt
Copy link
Collaborator Author

tpltnt commented May 25, 2016

ping

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