first commit
This commit is contained in:
53
include/engine/core/render_primitive.h
Normal file
53
include/engine/core/render_primitive.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef __NRENDERPRIMITIVE__
|
||||
#define __NRENDERPRIMITIVE__
|
||||
|
||||
|
||||
#include "core/render_data.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace Core
|
||||
{
|
||||
class Item;
|
||||
class Emitter;
|
||||
struct Patch;
|
||||
}
|
||||
namespace Render {
|
||||
|
||||
/// Render primitive.
|
||||
struct Primitive
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
Type_Geometry = 0,
|
||||
Type_Emitter,
|
||||
Type_TerrainPatch
|
||||
};
|
||||
|
||||
Type type;
|
||||
|
||||
const Core::Item *item;
|
||||
sGeometry geometry;
|
||||
|
||||
union
|
||||
{
|
||||
Core::Emitter *emitter;
|
||||
Core::Patch *patch;
|
||||
};
|
||||
|
||||
Primitive(Geometry *g, const Core::Item *i, float) : type(Type_Geometry), item(i), geometry(g), emitter(0) {}
|
||||
Primitive(Core::Patch *p, const Core::Item *i, float) : type(Type_TerrainPatch), item(i), patch(p) {}
|
||||
Primitive(Core::Emitter *e, const Core::Item *i, float) : type(Type_Emitter), item(i), emitter(e) {}
|
||||
};
|
||||
|
||||
} // Render
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NRENDERPRIMITIVE__
|
||||
Reference in New Issue
Block a user