18 #ifndef EQSEQUEL_RENDERER_H
19 #define EQSEQUEL_RENDERER_H
21 #include <co/objectFactory.h>
22 #include <seq/types.h>
54 SEQ_API
virtual bool init( co::Object* initData LB_UNUSED )
66 SEQ_API
virtual bool exit() {
return true; }
79 SEQ_API
virtual bool initContext( co::Object* initData );
98 SEQ_API
virtual void clear( co::Object* frameData );
107 virtual void draw( co::Object* frameData ) = 0;
115 SEQ_API
void updateNearFar(
const Vector4f& boundingSphere );
127 SEQ_API
void setNearFar(
const float nearPlane,
const float farPlane );
157 detail::Renderer* getImpl() {
return _impl; }
158 co::Object* getFrameData();
208 SEQ_API
virtual co::Object* createObject(
const uint32_t type );
209 SEQ_API
virtual void destroyObject( co::Object*
object,
210 const uint32_t type );
214 detail::Renderer*
const _impl;
218 #endif // EQSEQUEL_RENDERER_H
virtual SEQ_API ViewData * createViewData()
Create a new per-view data instance.
const Application & getApplication() const
virtual SEQ_API void clear(co::Object *frameData)
Clear the frame buffer.
virtual SEQ_API bool init(co::Object *initData 1)
Initialize the renderer.
SEQ_API const Matrix4f & getModelMatrix() const
virtual void draw(co::Object *frameData)=0
Render the scene.
virtual SEQ_API ~Renderer()
Destruct this renderer.
The main application object.
SEQ_API void updateNearFar(const Vector4f &boundingSphere)
Update the near and far planes to tightly enclose the given sphere.
SEQ_API const Frustumf & getFrustum() const
SEQ_API void setNearFar(const float nearPlane, const float farPlane)
Set the near and far planes.
virtual SEQ_API bool initContext(co::Object *initData)
Initialize a rendering context.
SEQ_API const GLEWContext * glewGetContext() const
Get the GLEW context for this renderer.
virtual SEQ_API void applyRenderContext()
Apply the current rendering parameters to the rendering context.
Application & getApplication()
SEQ_API Renderer(Application &application)
Construct a new renderer.
SEQ_API const RenderContext & getRenderContext() const
virtual SEQ_API void destroyViewData(ViewData *viewData)
Delete the given view data.
SEQ_API const Matrix4f & getViewMatrix() const
virtual SEQ_API bool exit()
De-initialize the renderer.
virtual SEQ_API bool exitContext()
De-initialize a rendering context.
The context applied to a channel during rendering operations.
virtual SEQ_API void applyModelMatrix()
Apply the current model matrix to the rendering context.