Join Pablo Colapinto for an in-depth discussion in this video Adding mouse input, part of Learning OpenGL.
- In this lesson, we'll take a look at using some mouse…interactions to manipulate our model matrix.…We're including some of the encapsulated…functionality that we've been discussing.…So we have GL texture, which is gonna handle…making and buffering data to our texture sampler…and GL mesh, which handles buffering…vertex data and binding it as well.…Our shader code hasn't changed.…We have a mouse struct, which contains some information…about whether the mouse is down, its current…X and Y position and screen coordinates,…these are relative to the top left hand corner…of the screen, and how much its moved…since the last time we've clicked it.…
In our app class we have a mesh, a texture, and a shader.…We have a mouse and we have a GLM quat.…This is the GLM quaternion which we're…calling temp rote for temporary rotation.…We'll use that in a second.…Here we make a cylindrical mesh.…We don't need to discuss exactly how we do this…but basically, we're going to be pushing…the vertices of the mesh back into the mesh object.…
- 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" ..