20 #ifndef EQSEQUEL_RENDERER_H
21 #define EQSEQUEL_RENDERER_H
23 #include <co/objectFactory.h>
24 #include <seq/types.h>
56 SEQ_API
virtual bool init( co::Object* initData LB_UNUSED )
68 SEQ_API
virtual bool exit() {
return true; }
81 SEQ_API
virtual bool initContext( co::Object* initData );
100 SEQ_API
virtual void clear( co::Object* frameData );
109 virtual void draw( co::Object* frameData ) = 0;
117 SEQ_API
void updateNearFar(
const Vector4f& boundingSphere );
129 SEQ_API
void setNearFar(
const float nearPlane,
const float farPlane );
175 SEQ_API
virtual bool processEvent(
const eq::Event& ) {
return false; }
180 detail::Renderer* getImpl() {
return _impl; }
253 SEQ_API
virtual co::Object*
createObject(
const uint32_t type );
257 const uint32_t type );
268 SEQ_API co::Object*
mapObject(
const uint128_t& identifier,
269 co::Object* instance );
279 SEQ_API
bool unmap( co::Object*
object );
283 detail::Renderer*
const _impl;
287 #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.
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 co::Object * getFrameData()
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.
virtual SEQ_API bool processEvent(const eq::Event &)
SEQ_API const GLEWContext * glewGetContext() const
Get the GLEW context for this renderer.
SEQ_API bool unmap(co::Object *object)
Unmap an object from the object map.
virtual SEQ_API void applyPerspectiveFrustum()
Apply the perspective frustum matrix for the current rendering task.
virtual SEQ_API bool init(co::Object *initData)
Initialize the renderer.
virtual SEQ_API void applyRenderContext()
Apply the current rendering parameters to the rendering context.
SEQ_API const PixelViewport & getPixelViewport() const
virtual SEQ_API co::Object * createObject(const uint32_t type)
Application & getApplication()
SEQ_API Renderer(Application &application)
Construct a new renderer.
SEQ_API const RenderContext & getRenderContext() const
SEQ_API uint32_t getWindowID() const
virtual SEQ_API void destroyViewData(ViewData *viewData)
Delete the given view data.
A facility class to manage OpenGL objects across shared contexts.
SEQ_API co::Object * mapObject(const uint128_t &identifier, co::Object *instance)
Map and return an object.
SEQ_API const Matrix4f & getViewMatrix() const
virtual SEQ_API bool exit()
De-initialize the renderer.
virtual SEQ_API void applyScreenFrustum()
Apply an orthographic frustum for pixel-based 2D operations.
virtual SEQ_API void destroyObject(co::Object *object, const uint32_t type)
virtual SEQ_API bool exitContext()
De-initialize a rendering context.
The context applied to a channel during rendering operations.
SEQ_API const ObjectManager & getObjectManager() const
virtual SEQ_API void applyModelMatrix()
Apply the current model matrix to the rendering context.