PDA

View Full Version : Rendering multiple quads workflow



EvilNando
05-27-2011, 10:26 AM
I would like to know if there is any problem with the method Im thinking for rendering multiple quads

for each quad create their 4 vertices based on their w and h values

translate quad to own location (x,y)
apply rotation matrix (if needed)

once this is done send the vertex data to the VBO

apply projection and camera transforms
call glDrawArray 4*number of quads


thanks

NeuroFuzzy
05-29-2011, 12:22 AM
usually you don't translate/rotate your model data beforehand. You build the object in modelspace (usually centered around the origin), use a world matrix to get the object positioned somewhere, and then have the view matrix transform that into screenspace, where openGL does its magic.

also, I think it would be a little faster if you added almost all your mesh data to a VBO, rather than have a ton of VBOs storing 1 quad each xD

EvilNando
05-29-2011, 10:30 AM
Okay but if that is the case how do I change vertex data for one particular object in case I want to do some vertex modifications on it?