15 #include "cullBinStateSorted.h"
16 #include "graphicsStateGuardianBase.h"
17 #include "cullableObject.h"
18 #include "cullHandler.h"
19 #include "pStatTimer.h"
32 ~CullBinStateSorted() {
34 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
59 _objects.push_back(ObjectData(
object));
73 PStatTimer timer(_cull_this_pcollector, current_thread);
74 sort(_objects.begin(), _objects.end());
86 PStatTimer timer(_draw_this_pcollector, current_thread);
87 Objects::const_iterator oi;
88 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
100 void CullBinStateSorted::
101 fill_result_graph(CullBin::ResultGraphBuilder &builder) {
102 Objects::const_iterator oi;
103 for (oi = _objects.begin(); oi != _objects.end(); ++oi) {
105 builder.add_object(
object);
A specific kind of CullBin that sorts geometry to collect items of the same state together...
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 collection of Geoms and their associated state, for a particular scene.
virtual void draw(bool force, Thread *current_thread)
Draws all the geoms in the bin, in the appropriate order.
A lightweight class that can be used to automatically start and stop a PStatCollector around a sectio...
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.
static CullBin * make_bin(const string &name, GraphicsStateGuardianBase *gsg, const PStatCollector &draw_region_pcollector)
Factory constructor for passing to the CullBinManager.
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...
virtual void add_object(CullableObject *object, Thread *current_thread)
Adds a geom, along with its associated state, to the bin for rendering.