Tag Info

Hot answers tagged

1

The problem is you are passing an address value to data rather than the data itself. A naive solution is to change: glBufferData(GL_ARRAY_BUFFER, 4*oindices, faceVBO[0], GL_STATIC_DRAW); to: glBufferData(GL_ARRAY_BUFFER, 4*oindices, *faceVBO[0], GL_STATIC_DRAW); To clarify: in your implementation, 'faceVBO' is a pointer to a set of pointers, and ...


1

The glGenVertexArrays() interface was added to OpenGL core contexts in version 3.0, the same version in which immediate mode rendering was removed from OpenGL (although it had long since been deprecated, 3.0 is where it finally absolutely went away) So you are correct. If immediate mode drawing works, then you are using an OpenGL context old enough that ...


1

You should draw everything, and swap the buffer (display), at most once per frame (usually 1/60th second). You should definitely not call window.display() more than once per frame. If nothing at all has moved, you might choose to skip drawing and displaying entirely for that frame, especially on a mobile device to conserve power. On a desktop, typically, ...


1

glOrtho( 0.f, viewWidth, viewHeight, 0.f, 0.f, 1.f ); Assuming that you're starting from an identity matrix, this glOrtho() call will give you a traditional window coordinate system with 0,0 at the top left corner, such that one unit in OpenGL space corresponds exactly to one pixel in the view which contains the OpenGL-rendered image. Man page for glOrtho. ...



Only top voted, non community-wiki answers of a minimum length are eligible