Join Pablo Colapinto for an in-depth discussion in this video Generating Vertex Buffer Objects, part of Learning OpenGL.
- If our vertex array object is the glue…between our shader and our vertex data on the GPU,…and our attribute pointer is how to navigate that data,…then our vertex buffer object is the data itself.…And in this lesson we'll look at how to generate…a vertex buffer data and send data over to the GPU.…Lines 194 to 199 demonstrate how to do this.…On line 195, we generate one buffer…and assign buffer ID to point to it.…
On line 197, we bind that buffer ID to the GL array buffer.…This is the buffer of vertex data that we're about to send.…On line 199, we send this data over…to the GPU by calling GL buffer data.…GL buffer data takes as its arguments, in this case…GL array buffer, which specifies a vertex array buffer.…The length in memory of the buffer we're gonna send,…in this case, the number of vertices which we…extract from triangle ties and the size of…each vertex, which is the size of vec two.…
And finally, a pointer to the…beginning of the data on the CPU.…This last argument, GL static draw, we can…ignore for the moment, we'll talk about it later.…
- What is OpenGL?
- Setting up an OpenGL workflow
- Creating a window with GLFW
- Working with geometric primitives
- Rotating, translating, and scaling
- Understanding matrix transformations
- Creating mesh data structures
- Buffering mesh data
- Getting mouse and keyboard input
Skill Level Intermediate
Q: Why am I getting errors saying I don’t have GLEW installed when I try to create the Xcode projects with Cmake?
1) Download, Install, and Run Xcode
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install glew
./bootstrap && make && make install
brew install cmake
cd Exercise Filesmkdir xcodecd xcodecmake -G "Xcode" ..