Avogadro::Rendering::GLRenderer#
-
class 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 setPixelRatio(float ratio)#
Set the ratio of physical to logical pixels.
-
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).
-
float hit(const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const#
Return the depth of provided ray - geometry hit test.
-
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 SolidPipeline &solidPipeline() const#
Get the solid pipeline for this renderer.
-
inline SolidPipeline &solidPipeline()#