bluecore/engine/RenderQueue.h

53 lines
1.0 KiB
C
Raw Normal View History

2008-01-17 16:42:24 +00:00
#ifndef BLUECORE_RENDER_QUEUE_H
#define BLUECORE_RENDER_QUEUE_H
#include "RenderDevice.h"
namespace BlueCore
{
class RenderItem : public Referenced
{
public:
virtual void render(RenderDevice *) const = 0;
};
class RenderQueue : public Referenced
{
struct QueueItem
{
QueueItem(RenderItem *renderitem, const Vector3& vector,
const Quaternion& quat) :
item(renderitem), position(vector), orientation(quat)
{
}
ref_ptr<RenderItem> item;
Vector3 position;
Quaternion orientation;
};
std::list<QueueItem> _OpaqueItems;
std::list<QueueItem> _TransparentItems;
public:
void addOpaqueItem(RenderItem *item, const Vector3& position,
const Quaternion& orientation);
void addTransparentItem(RenderItem *item, const Vector3& position,
const Quaternion& orientation);
const std::list<QueueItem>& getOpaqueItems();
const std::list<QueueItem>& getTransparentItems();
void clear();
void render(RenderDevice *device) const;
};
} // namespace BluewCore
#endif // BLUECORE_RENDER_QUEUE_H