81 } contract(
this, camera);
88 for(
int i=0; i<render_queue->
size(); ++i)
103 glEnable(GL_DEPTH_TEST);
104 glDepthFunc(GL_LEQUAL);
105 glEnable(GL_POLYGON_OFFSET_FILL);
107 glColorMask(0,0,0,0);
109 glDisable(GL_POLYGON_OFFSET_FILL);
110 glPolygonOffset( 0.0f, 0.0f );
111 glPolygonOffset(0,0);
112 glColorMask(1,1,1,1);
119 glEnable(GL_LINE_SMOOTH);
124 glDisable(GL_DEPTH_TEST);
126 #if defined(VL_OPENGL) 127 glLineStipple(1,0xF0F0);
128 glEnable(GL_LINE_STIPPLE);
132 glDisable(GL_LINE_SMOOTH);
133 #if defined(VL_OPENGL) 134 glDisable(GL_LINE_STIPPLE);
140 glDisable(GL_SCISSOR_TEST);
163 WFInfo* wfinfo = it->second.get();
169 if ( actor->
transform() != cur_transform )
176 glMatrixMode(GL_MODELVIEW);
177 VL_glLoadMatrix( view_matrix.
ptr() );
181 glMatrixMode(GL_MODELVIEW);
182 VL_glLoadMatrix( (view_matrix * cur_transform->
worldMatrix() ).ptr() );
187 glMatrixMode(GL_MODELVIEW);
188 VL_glLoadMatrix( view_matrix.
ptr() );
193 wfinfo->mEdgeCallback->setShowCreases(
showCreases());
194 wfinfo->mEdgeCallback->onActorRenderStarted( actor.
get(), frame_clock, camera, wfinfo->mGeometry.get(),
NULL, 0 );
210 WFInfo* wfinfo = it->second.get();
215 if ( actor->
transform() != cur_transform )
222 glMatrixMode(GL_MODELVIEW);
223 VL_glLoadMatrix( view_matrix.
ptr() );
227 glMatrixMode(GL_MODELVIEW);
228 VL_glLoadMatrix( (view_matrix * cur_transform->
worldMatrix() ).ptr() );
233 glMatrixMode(GL_MODELVIEW);
234 VL_glLoadMatrix( view_matrix.
ptr() );
239 glColor4fv( wfinfo->mColor.ptr() );
249 it->second->mColor = color;
250 return it->second.get();
263 info->mColor = color;
276 return it->second.get();
Associates a Renderable object to an Effect and Transform.
const Renderable * lod(int lod_index) const
Returns the Renderable object representing the LOD level specifed by lod_index.
const mat4 & viewMatrix() const
Returns the Camera's view matrix (inverse of the modeling matrix).
Transform * transform()
Returns the Transform bound tho an Actor.
float creaseAngle() const
The minimum angle (in degrees) considered to generate crease-edges (default is 44 degrees)...
OpenGLContext * openglContext()
The OpenGLContext bound to a render target.
const FramebufferObject * framebuffer() const
The Framebuffer on which the rendering is performed.
std::map< ref< Actor >, ref< WFInfo > > mVisibleActors
std::map< ref< Actor >, ref< WFInfo > > mActorCache
float polygonOffsetFactor() const
Defines the factor parameter used to render the lines over the polygons. See also http://www...
bool showCreases() const
If set to true shows not only the edges that define the silhouette of an object but also the crease e...
float polygonOffsetUnits() const
Defines the units parameter used to render the lines over the polygons. See also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml for more information.
void applyViewMatrix() const
Loads the GL_MODELVIEW matrix with the Camera's view matrix.
void dispatchOnRendererFinished()
Dispatches the onRendererFinished() event to the registered RenderEventCallback objects.
Viewport * viewport()
The viewport bound to a camera.
Visualization Library main namespace.
The EdgeUpdateCallback class updates at every frame the edges of an Actor for the purpose of edge-enh...
const RenderQueue * render(const RenderQueue *in_render_queue, Camera *camera, real frame_clock)
Takes as input the render queue to render and returns a possibly filtered render queue for further pr...
bool smoothLines() const
If set to true the lines will be rendered using antialiasing.
void incrementRenderTick()
Increments the rendering tick count.
bool showHiddenLines() const
If set to true shows also the hidden lines with a dashed pattern.
Base class providing all the basic funtionalities of a Renderer.
void activate(EFramebufferBind target=FBB_FRAMEBUFFER)
Activates the FramebufferObject by calling bindFramebuffer() and bindDrawBuffers() ...
bool isEnabled(unsigned int mask)
void applyProjMatrix() const
Loads the GL_PROJECTION matrix with the Camera's projection matrix.
void render(const Actor *actor, const Shader *shader, const Camera *camera, OpenGLContext *gl_context)
Renders the Renderable and if necessary compiles the display list and updates the BufferObjects...
void renderLines(Camera *camera)
The RenderQueue class collects a list of RenderToken objects to be sorted and rendered.
void bindVAS(const IVertexAttribSet *vas, bool use_vbo, bool force)
Activates the specified vertex attribute set - For internal use only.
const RenderToken * at(int i) const
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
void renderSolids(Camera *camera, real frame_clock)
virtual const FramebufferObject * framebuffer() const =0
The Framebuffer on which the rendering is performed.
unsigned int enableMask() const
Enable mask used to enable/disable the rendering of matching Actors.
EClearFlags clearFlags() const
The clear flags used to clear the viewport.
void dispatchOnRendererStarted()
Dispatches the onRendererStarted() event to the registered RenderEventCallback objects.
VLCORE_EXPORT GlobalSettings * globalSettings()
Returns VisulizationLibrary's global settings.
void setClearFlags(EClearFlags clear_flags)
Usually you want to use rather RendererAbstract::setClearFlags()
WFInfo * declareActor(Actor *act, const fvec4 &color)
Generates and caches all the information needed to render the edges of the given Actor using the spec...