Class Avogadro::Rendering::GLRenderer#

class Avogadro::Rendering::GLRenderer#

Render the scene using OpenGL calls.

Author

Marcus D. Hanwell

Unnamed Group

inline const TextRenderStrategy *textRenderStrategy() const#

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.

inline TextRenderStrategy *textRenderStrategy()#

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.

void setTextRenderStrategy(TextRenderStrategy *tren)#

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.

Public Functions

GLRenderer()#
~GLRenderer()#
void initialize()#

Initialize the OpenGL context for rendering.

void resize(int width, int height)#

Resize the context in response to window management events.

void render()#

Take care of rendering the scene, requires that the context is current.

void resetCamera()#

Reset the view to fit the entire scene.

void resetGeometry()#

Reset the scene geometry, this should be done when the scene geometry has changed in order to ensure correct clipping.

std::multimap<float, Identifier> hits(int x, int y) const#

Return the primitives under the display coordinate (x,y), mapped by depth.

inline Identifier hit(int x, int y) const#

Return the top primitive under the display coordinate (x,y).

Core::Array<Identifier> hits(int x1, int y1, int x2, int y2) const#

Return the primitives in the rectangular area provided.

inline bool isValid() const#

Check whether the GL context is valid and supports required features.

See also

error() to get more information if the context is not valid.

inline std::string error() const#

Get the error message if the context is not valid. Empty if valid.

inline const Camera &camera() const#

Get the camera for this renderer.

inline Camera &camera()#
inline const Camera &overlayCamera() const#

Get the overlay camera.

inline Camera &overlayCamera()#
inline const Scene &scene() const#

Get the scene for this renderer.

inline Scene &scene()#