GEL  2
GEL is a library for Geometry and Linear Algebra
Classes | Enumerations | Functions
GLGraphics Namespace Reference

The namespace for things related to (real time) rendering. More...

Classes

class  GLViewController
class  IDBufferWireframeRenderer
 Class for ID buffer based wireframe rendering. Handles all types of gons. Use with Manifold. More...
class  QuatTrackBall
 This class represents a virtual tracball. More...
class  SimpleTrackBall
 Simple trackball class. More...
class  SinglePassWireframeRenderer

Enumerations

enum  TrackBallAction { NO_ACTION = 0, ROTATE_ACTION, PAN_ACTION, ZOOM_ACTION }

Functions

void draw (const HMesh::Manifold &m, bool per_vertex_norms=true)
 Draw a HMesh Manifold. Inefficient and should be compiled into display list.
void draw (const Geometry::IndexedFaceSet &geometry)
 Draw an indexed face set (just a triangle list) with normals computed on the fly.
void draw (const Geometry::TriMesh &tm, bool per_vertex_norms=true)
 Draw a triangles mesh. Inefficient function that should be compiled into a display list.
void load_textures (Geometry::TriMesh &tm)
 Load textures if available.
template<class T >
void draw_wireframe_oldfashioned (const T &m, bool per_vertex_norms, const CGLA::Vec3f &line_color)
 Draw an object of type T as wireframe. In practice T = Manifold or TriMesh.
template void draw_wireframe_oldfashioned< HMesh::Manifold > (const HMesh::Manifold &m, bool per_vertex_norms, const Vec3f &line_color)
template void draw_wireframe_oldfashioned (const Geometry::TriMesh &m, bool per_vertex_norms, const Vec3f &line_color)
void draw (const Geometry::AABox &box)
 Draw an axis aligned bounding box.
void draw (const Geometry::OBox &box)
 Draw an oriented bounding box.
template<class BoxType >
void draw (const Geometry::BoundingINode< BoxType > &node, int level, int max_level)
template<class BoxType >
void draw (const Geometry::BoundingLNode< BoxType > &node, int level, int max_level)
template<class BoxType >
void draw (const Geometry::BoundingTree< BoxType > &tree, int max_level)
template<typename T >
void draw_triangles_in_wireframe (T &m, bool per_vertex_norms, const CGLA::Vec3f &line_color)
 Draw an object of type T which contains only triangles as wireframe. In practice T = Manifold or TriMesh.
void print_glsl_program_log (GLuint obj)
 Print the info log for a program if the status is not OK.
const std::string read_glsl_source (const std::string &path, const std::string &file)
GLuint create_glsl_shader (GLuint stype, const std::string &src)
GLuint create_glsl_shader (GLuint stype, const std::string &path, const std::string &file)

Detailed Description

The namespace for things related to (real time) rendering.

This namespace is for functionality that requires OpenGL. For instance a virtual trackball class and a more complex view controller. There are functions for drawing meshes and other geometric entities from other parts of OpenGL. There is also SOIL, the image loading library for OpenGL, by Jonathan Dummer.


Function Documentation

GLuint GLGraphics::create_glsl_shader ( GLuint  stype,
const std::string &  src 
)

Create a shader of type specified by the first argument from a source string given as second argument. Return shader handle. If there is a problem, the infolog is printed and 0 is returned.

GLuint GLGraphics::create_glsl_shader ( GLuint  stype,
const std::string &  path,
const std::string &  file 
)

Create a shader of type specified as first argument from the file indicated by the supplied path and file name (second and third arguments) and return a shader handle. This function is only a convenience function wrapping read_glsl_source and create_glsl_shader

template<class BoxType >
void GLGraphics::draw ( const Geometry::BoundingINode< BoxType > &  node,
int  level,
int  max_level 
)

Draw the tree. The first argument is the level counter, the second argument is the level at which to stop drawing.

const std::string GLGraphics::read_glsl_source ( const std::string &  path,
const std::string &  file 
)

The two arguments are concatenated to form the name with full path of a text file. This file is read and returned as a string.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations