first commit
This commit is contained in:
50
include/engine/core/renderable.h
Normal file
50
include/engine/core/renderable.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef __NRENDERABLE__
|
||||
#define __NRENDERABLE__
|
||||
|
||||
|
||||
#include "core/render_data.h"
|
||||
#include "core/render_primitive.h"
|
||||
#include "container/nstack.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
class MinMax;
|
||||
|
||||
namespace Core {
|
||||
class Camera;
|
||||
|
||||
/*!
|
||||
@short Renderer renderable item.
|
||||
@author Emmanuel Julien (ejulien@nworks.fr)
|
||||
*/
|
||||
struct Renderable
|
||||
{
|
||||
enum Context
|
||||
{
|
||||
Context_Default = 0,
|
||||
Context_Shadow,
|
||||
Context_Occlusion
|
||||
};
|
||||
|
||||
/// Is this renderable enabled.
|
||||
virtual inline bool IsRenderable() const { return true; }
|
||||
|
||||
/// Compute the renderable minmax.
|
||||
virtual void ComputeRenderableMinMax(MinMax &) = 0;
|
||||
/// Get the renderable primitive list, returns the number of primitive that were considered for addition to the final list.
|
||||
virtual uint GetRenderablePrimitiveList(const Camera &view, const Camera &default_view, Stack <Render::Primitive *> &, Context = Context_Default, bool cull = true) = 0;
|
||||
|
||||
virtual ~Renderable() {}
|
||||
};
|
||||
|
||||
} // Core
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NRENDERABLE__
|
||||
Reference in New Issue
Block a user