first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View 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__