15 #include "cullBinFixed.h"
16 #include "graphicsStateGuardianBase.h"
17 #include "geometricBoundingVolume.h"
18 #include "cullableObject.h"
19 #include "cullHandler.h"
20 #include "pStatTimer.h"
35 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
49 return new CullBinFixed(name, gsg, draw_region_pcollector);
60 int draw_order =
object->_state->get_draw_order();
61 _objects.push_back(ObjectData(
object, draw_order));
75 PStatTimer timer(_cull_this_pcollector, current_thread);
76 stable_sort(_objects.begin(), _objects.end());
87 PStatTimer timer(_draw_this_pcollector, current_thread);
88 Objects::const_iterator oi;
89 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
102 fill_result_graph(CullBin::ResultGraphBuilder &builder) {
103 Objects::const_iterator oi;
104 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
106 builder.add_object(
object);
A specific kind of CullBin that sorts geometry in the order specified by the user-specified draw_orde...
virtual void draw(bool force, Thread *current_thread)
Draws all the geoms in the bin, in the appropriate order.
A collection of Geoms and their associated state, for a particular scene.
virtual void finish_cull(SceneSetup *scene_setup, Thread *current_thread)
Called after all the geoms have been added, this indicates that the cull process is finished for this...
A lightweight class that can be used to automatically start and stop a PStatCollector around a sectio...
static CullBin * make_bin(const string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector)
Factory constructor for passing to the CullBinManager.
virtual void add_object(CullableObject *object, Thread *current_thread)
Adds a geom, along with its associated state, to the bin for rendering.
A lightweight class that represents a single element that may be timed and/or counted via stats...
static void draw(CullableObject *object, GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread)
Draws the indicated CullableObject, with full support for decals if they are attached to the object...
The smallest atom of cull.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
This object holds the camera position, etc., and other general setup information for rendering a part...