View Full Version : Group Objects
10-24-2009, 07:58 AM
Is it possible to group objects together so they act as one?
10-25-2009, 12:02 PM
There are no objects in OpenGL.
There are only triangle and quad faces, points and lines.
It's up to your program to manage these as objects, and there you can do what you want.
PushMatrix and PopMatrix are useful when it comes to 'grouping' objects for the purpose of applying transformations. For example, let's say you have 5 objects, each of which is drawn by a separate subroutine (another important step). The pseudo code below applies a Translate to all 5 objects, a Rotate to objects 1,2,3 (but NOT 4,5), and a Scale to objects 4 and 5, (but not 1,2,3).
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.