Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

LineDrawingGLSLMode Class Reference

A rendering mode for the "Line Drawing" rendering style that uses the OpenGL shading language. More...

Inheritance diagram for LineDrawingGLSLMode:

Inheritance graph
[legend]
Collaboration diagram for LineDrawingGLSLMode:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LineDrawingGLSLMode ()
 ~LineDrawingGLSLMode ()
virtual void setup_for_drawing_outside_dl (const Patch *patch)
 Setup the OpenGL state for rendering in this mode. This method will be called each time the style is drawn.
virtual void setup_for_drawing_inside_dl (const Patch *patch)
 Setup the OpenGL state for rendering in this mode. This method will be called once inside a display list.
virtual void after_drawing_outside_dl (const Patch *patch)
 Perform any operations that should happen after drawing is complete. This method will be called each time the style is drawn.
virtual GLStripCBget_new_strip_cb () const
 Get a newly allocated object of the GLStripCB class used by this mode.
virtual void after_drawing_inside_dl (const Patch *patch)
 Perform any operations that should happen after drawing is complete. This method will be called once inside a display list.

Private Member Functions

 LineDrawingGLSLMode (const LineDrawingGLSLMode &other)
LineDrawingGLSLModeoperator= (const LineDrawingGLSLMode &rhs)

Private Attributes

GLint contours_on_uniform_loc
GLint sugcontours_on_uniform_loc
GLint scthresh_uniform_loc
GLint feature_size_uniform_loc
GLint eye_pos_uniform_loc
GLint width_uniform_loc
GLint pdir1_attrib_loc
GLint pdir2_attrib_loc
GLint k1_attrib_loc
GLint k2_attrib_loc
GLint dcurv_tensor_attrib_loc
GLhandleARB vshader_handle
GLhandleARB fshader_handle
GLhandleARB prog_handle

Classes

class  StripCB
 Handles callbacks for drawing triangle strips for the "Line Drawing" rendering style. More...

Detailed Description

A rendering mode for the "Line Drawing" rendering style that uses the OpenGL shading language.

Definition at line 677 of file line_drawing.C.


Constructor & Destructor Documentation

LineDrawingGLSLMode::LineDrawingGLSLMode  ) 
 

Definition at line 738 of file line_drawing.C.

References contours_on_uniform_loc, dcurv_tensor_attrib_loc, ERR_LEV_INFO, err_mesg(), eye_pos_uniform_loc, feature_size_uniform_loc, fshader_handle, GLExtensions::gl_arb_fragment_shader_supported(), GLExtensions::gl_arb_shader_objects_supported(), GLExtensions::gl_arb_vertex_shader_supported(), GL_FRAGMENT_SHADER_ARB, GL_VERTEX_SHADER_ARB, glAttachObjectARB, glCreateProgramObjectARB, glDeleteObjectARB, glGetAttribLocationARB, glGetUniformLocationARB, glUseProgramObjectARB, k1_attrib_loc, k2_attrib_loc, LINE_DRAWING_FRAGMENT_SHADER_STR, LINE_DRAWING_VERTEX_SHADER_STR, link_ARB_shader(), load_ARB_shader(), pdir1_attrib_loc, pdir2_attrib_loc, prog_handle, scthresh_uniform_loc, sugcontours_on_uniform_loc, vshader_handle, and width_uniform_loc.

LineDrawingGLSLMode::~LineDrawingGLSLMode  ) 
 

Definition at line 833 of file line_drawing.C.

References fshader_handle, glDeleteObjectARB, prog_handle, and vshader_handle.

LineDrawingGLSLMode::LineDrawingGLSLMode const LineDrawingGLSLMode other  )  [private]
 


Member Function Documentation

virtual void RenderingMode::after_drawing_inside_dl const Patch patch  )  [inline, virtual, inherited]
 

Perform any operations that should happen after drawing is complete. This method will be called once inside a display list.

Definition at line 67 of file rendering_mode.H.

Referenced by RenderingModeSingleton< RenderingModeSelectionPolicy >::after_drawing_inside_dl().

void LineDrawingGLSLMode::after_drawing_outside_dl const Patch patch  )  [virtual]
 

Perform any operations that should happen after drawing is complete. This method will be called each time the style is drawn.

Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

Reimplemented from RenderingMode.

Definition at line 893 of file line_drawing.C.

References glUseProgramObjectARB.

virtual GLStripCB* LineDrawingGLSLMode::get_new_strip_cb  )  const [inline, virtual]
 

Get a newly allocated object of the GLStripCB class used by this mode.

Note:
The returned GLStripCB pointer should be deleted by the caller when it is done being used.

Implements RenderingMode.

Definition at line 711 of file line_drawing.C.

LineDrawingGLSLMode& LineDrawingGLSLMode::operator= const LineDrawingGLSLMode rhs  )  [private]
 

void LineDrawingGLSLMode::setup_for_drawing_inside_dl const Patch patch  )  [virtual]
 

Setup the OpenGL state for rendering in this mode. This method will be called once inside a display list.

Reimplemented from RenderingMode.

Definition at line 876 of file line_drawing.C.

References BMESH::avg_len(), feature_size_uniform_loc, glUniform1fARB, glUseProgramObjectARB, Patch::mesh(), prog_handle, and width_uniform_loc.

void LineDrawingGLSLMode::setup_for_drawing_outside_dl const Patch path  )  [virtual]
 

Setup the OpenGL state for rendering in this mode. This method will be called each time the style is drawn.

Note:
Code that uses values that vary from redraw to redraw should be put in this method so that the values are not captured once in a display list.

Reimplemented from RenderingMode.

Definition at line 847 of file line_drawing.C.

References contours_on_uniform_loc, VIEW::eye(), eye_pos_uniform_loc, LineDrawingTexture::get_draw_contours(), LineDrawingTexture::get_draw_sugcontours(), LineDrawingTexture::get_sugcontour_thresh(), glUniform1fARB, glUniform1iARB, glUniform3fARB, glUseProgramObjectARB, prog_handle, scthresh_uniform_loc, and sugcontours_on_uniform_loc.


Member Data Documentation

GLint LineDrawingGLSLMode::contours_on_uniform_loc [private]
 

Definition at line 719 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_outside_dl().

GLint LineDrawingGLSLMode::dcurv_tensor_attrib_loc [private]
 

Definition at line 728 of file line_drawing.C.

Referenced by LineDrawingGLSLMode::StripCB::faceCB(), and LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::eye_pos_uniform_loc [private]
 

Definition at line 723 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_outside_dl().

GLint LineDrawingGLSLMode::feature_size_uniform_loc [private]
 

Definition at line 722 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_inside_dl().

GLhandleARB LineDrawingGLSLMode::fshader_handle [private]
 

Definition at line 732 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and ~LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::k1_attrib_loc [private]
 

Definition at line 727 of file line_drawing.C.

Referenced by LineDrawingGLSLMode::StripCB::faceCB(), and LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::k2_attrib_loc [private]
 

Definition at line 727 of file line_drawing.C.

Referenced by LineDrawingGLSLMode::StripCB::faceCB(), and LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::pdir1_attrib_loc [private]
 

Definition at line 726 of file line_drawing.C.

Referenced by LineDrawingGLSLMode::StripCB::faceCB(), and LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::pdir2_attrib_loc [private]
 

Definition at line 726 of file line_drawing.C.

Referenced by LineDrawingGLSLMode::StripCB::faceCB(), and LineDrawingGLSLMode().

GLhandleARB LineDrawingGLSLMode::prog_handle [private]
 

Definition at line 732 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), setup_for_drawing_inside_dl(), setup_for_drawing_outside_dl(), and ~LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::scthresh_uniform_loc [private]
 

Definition at line 721 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_outside_dl().

GLint LineDrawingGLSLMode::sugcontours_on_uniform_loc [private]
 

Definition at line 720 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_outside_dl().

GLhandleARB LineDrawingGLSLMode::vshader_handle [private]
 

Definition at line 732 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and ~LineDrawingGLSLMode().

GLint LineDrawingGLSLMode::width_uniform_loc [private]
 

Definition at line 724 of file line_drawing.C.

Referenced by LineDrawingGLSLMode(), and setup_for_drawing_inside_dl().


The documentation for this class was generated from the following file:
Generated on Mon Sep 18 11:46:25 2006 for jot by  doxygen 1.4.4