Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes

vl::DrawCall Class Reference

The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements. More...

#include <DrawCall.hpp>

Inheritance diagram for vl::DrawCall:
vl::Object vl::DrawArrays vl::DrawElementsBase vl::DrawRangeElementsBase vl::MultiDrawElementsBase vl::DrawElements< ArrayUByte1 > vl::DrawElements< ArrayUInt1 > vl::DrawElements< ArrayUShort1 > vl::DrawElements< arr_type > vl::DrawRangeElements< ArrayUByte1 > vl::DrawRangeElements< ArrayUInt1 > vl::DrawRangeElements< ArrayUShort1 > vl::DrawRangeElements< arr_type > vl::MultiDrawElements< ArrayUByte1 > vl::MultiDrawElements< ArrayUInt1 > vl::MultiDrawElements< ArrayUShort1 > vl::MultiDrawElements< arr_type >

List of all members.

Public Member Functions

 DrawCall ()
 Constructor.
DrawCalloperator= (const DrawCall &other)
 Assignment operator.
void setPrimitiveType (EPrimitiveType type)
 Sets the draw call's primitive type.
EPrimitiveType primitiveType () const
 Returns the draw call's primitive type.
virtual void render (bool use_bo=true) const =0
 Executes the draw call.
virtual ref< DrawCallclone () const =0
 Returns a clone of the draw call.
virtual void updateDirtyBufferObject (EBufferObjectUpdateMode)=0
 Updates the index buffer's BufferObject if marked as dirty.
virtual void deleteBufferObject ()=0
 Deletes the index buffer's BufferObject.
void setEnabled (bool enable)
 Enables/disables the draw call.
bool isEnabled () const
 True if the draw call is enabled.
virtual TriangleIterator triangleIterator () const =0
 Returns a TriangleIterator used to iterate through the triangles of a DrawCall.
virtual IndexIterator indexIterator () const =0
 Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.
u32 countIndices () const
 Counts the number of virtual indices of a DrawCall., i.e.
u32 countTriangles () const
 Counts the number of virtual triangles of a DrawCall., i.e.
virtual int instances () const
 Returns the number of instances for this set of primitives.
virtual bool primitiveRestartEnabled () const
 Returns whether the primitive-restart functionality is enabled or not.
virtual unsigned int primitiveRestartIndex ()
 Returns the primitive restart index used by the draw call or 0 if primitive restart is not supported.
void setPatchParameter (PatchParameter *patch_param)
 Attach a PatchParameter to a DrawCall to be used when using primitive-type PT_PATCHES.
PatchParameterpatchParameter ()
 The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.
const PatchParameterpatchParameter () const
 The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.

Protected Member Functions

void applyPatchParameters () const

Protected Attributes

ref< PatchParametermPatchParameter
EPrimitiveType mType
bool mEnabled

Detailed Description

The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.

which are used by Geometry to define a set of primitives to be rendered (see also Geometry::drawCalls()).

Overview

vl::DrawArrays wraps:

Supports:

vl::DrawElements wraps:

Supports:

vl::DrawRangeElements wraps:

Supports:

vl::MultiDrawElements wraps:

Supports:

DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements are used by Geometry to define a set of primitives to be rendered.

See also:
Geometry::drawCalls(), DrawCall, DrawElements, MultiDrawElements, DrawRangeElements, Geometry, Actor

Definition at line 90 of file DrawCall.hpp.


Constructor & Destructor Documentation

vl::DrawCall::DrawCall (  ) [inline]

Constructor.

Definition at line 96 of file DrawCall.hpp.


Member Function Documentation

DrawCall& vl::DrawCall::operator= ( const DrawCall other ) [inline]

Assignment operator.

Definition at line 99 of file DrawCall.hpp.

References mEnabled, and mType.

void vl::DrawCall::setPrimitiveType ( EPrimitiveType  type ) [inline]

Sets the draw call's primitive type.

Definition at line 107 of file DrawCall.hpp.

References mType.

Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().

EPrimitiveType vl::DrawCall::primitiveType (  ) const [inline]
virtual void vl::DrawCall::render ( bool  use_bo = true ) const [pure virtual]
virtual ref<DrawCall> vl::DrawCall::clone (  ) const [pure virtual]
virtual void vl::DrawCall::updateDirtyBufferObject ( EBufferObjectUpdateMode   ) [pure virtual]
virtual void vl::DrawCall::deleteBufferObject (  ) [pure virtual]
void vl::DrawCall::setEnabled ( bool  enable ) [inline]

Enables/disables the draw call.

Definition at line 125 of file DrawCall.hpp.

References mEnabled.

Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall(), and vl::Geometry::makeGLESFriendly().

bool vl::DrawCall::isEnabled (  ) const [inline]

True if the draw call is enabled.

Definition at line 128 of file DrawCall.hpp.

References mEnabled.

Referenced by vl::VLXClassWrapper_DrawCall::exportDrawCallBase(), and vl::Geometry::render_Implementation().

virtual TriangleIterator vl::DrawCall::triangleIterator (  ) const [pure virtual]
virtual IndexIterator vl::DrawCall::indexIterator (  ) const [pure virtual]
u32 vl::DrawCall::countIndices (  ) const [inline]

Counts the number of virtual indices of a DrawCall., i.e.

the number of indices you would retrieve by iterating over the iterator returned by indexIterator().

Definition at line 142 of file DrawCall.hpp.

References vl::IndexIterator::hasNext(), and indexIterator().

Referenced by vl::Geometry::mergeDrawCallsWithMultiDrawElements(), and vl::Geometry::mergeDrawCallsWithPrimitiveRestart().

u32 vl::DrawCall::countTriangles (  ) const [inline]

Counts the number of virtual triangles of a DrawCall., i.e.

the number of triangles you would retrieve by iterating over the iterator returned by triangleIterator().

Definition at line 151 of file DrawCall.hpp.

References vl::TriangleIterator::hasNext(), and triangleIterator().

Referenced by vl::Geometry::fixTriangleWinding(), vl::Geometry::mergeDrawCallsWithTriangles(), and vl::Geometry::triangulateDrawCalls().

virtual int vl::DrawCall::instances (  ) const [inline, virtual]

Returns the number of instances for this set of primitives.

Reimplemented in vl::DrawArrays, and vl::DrawElementsBase.

Definition at line 160 of file DrawCall.hpp.

Referenced by vl::Geometry::triangulateDrawCalls().

virtual bool vl::DrawCall::primitiveRestartEnabled (  ) const [inline, virtual]

Returns whether the primitive-restart functionality is enabled or not.

See http://www.opengl.org/registry/specs/NV/primitive_restart.txt

Reimplemented in vl::DrawElementsBase, vl::DrawRangeElementsBase, and vl::MultiDrawElementsBase.

Definition at line 163 of file DrawCall.hpp.

Referenced by vl::Geometry::sortVertices().

virtual unsigned int vl::DrawCall::primitiveRestartIndex (  ) [inline, virtual]
void vl::DrawCall::setPatchParameter ( PatchParameter patch_param ) [inline]

Attach a PatchParameter to a DrawCall to be used when using primitive-type PT_PATCHES.

Definition at line 169 of file DrawCall.hpp.

References mPatchParameter.

PatchParameter* vl::DrawCall::patchParameter (  ) [inline]

The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.

Definition at line 172 of file DrawCall.hpp.

References vl::ref< T >::get(), and mPatchParameter.

Referenced by vl::VLXClassWrapper_DrawCall::exportDrawCallBase().

const PatchParameter* vl::DrawCall::patchParameter (  ) const [inline]

The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.

Definition at line 175 of file DrawCall.hpp.

References vl::ref< T >::get(), and mPatchParameter.

void vl::DrawCall::applyPatchParameters (  ) const [inline, protected]

Member Data Documentation

Definition at line 195 of file DrawCall.hpp.

Referenced by applyPatchParameters(), patchParameter(), and setPatchParameter().

bool vl::DrawCall::mEnabled [protected]

Definition at line 197 of file DrawCall.hpp.

Referenced by isEnabled(), operator=(), and setEnabled().


The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:09.
Permission is granted to use this page to write and publish articles regarding Visualization Library.