VISH  0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions
Wizt::RenderBasin Class Reference

Base class for abstract render operations. More...

#include </home/werner/origo/vish/ocean/Anemonia/RenderBasin.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

Base class for abstract render operations.


Member Enumeration Documentation

Enumeration type for primitives, similar to OpenGL (but numerically not identical).

See also:
http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml
Enumerator:
POINTS 

draw as points

LINE_STRIP 

draw as one connected line

LINE_LOOP 

draw as one closed line

LINES 

draw as a set of line elements, bundling each two vertices independently

TRIANGLE_STRIP 

draw a strip of connected triangles

TRIANGLE_FAN 

draw a set of triangles that are all attached to the first vertex

TRIANGLES 

draw a set of independent triangles, three vertices given for each

QUAD_STRIP 

draw a strip of quads

QUADS 

draw a set of quads, four vertices from one

POLYGON 

draw a single polygon

Categories of vertex attributes.

Enumerator:
COORDINATES 

coordinate information for vertices

NORMALS 

Normal vectors.

COLORS 

Colors.

SECONDARY_COLORS 

Secondary colors.

TEXTURE0 

Texture coordinates for texture unit 0.

TEXTURE1 

Texture coordinates for texture unit 1.

USER_DEFINED 

User-defined attribute name.


Member Function Documentation

MemCore::RefPtr<VertexAttribute> Wizt::RenderBasin::createCoordinates ( const MemCore::RefPtr< MemCore::ChunkBase > &  VertexData) [inline]

Convenience function to load coordinates as vertex attribute.

            RenderBasin&myContext;
            Anemone RenderAnemone;
                    RenderAnemone.insert( Context.createCoordinates( Data ) );

Calls the generic createVertexAttribute() function.

Examples:
AnemoneBoundingVolume.cpp, and SeagrassBoundingVolume.cpp.
virtual MemCore::RefPtr<TextureTentacle> Wizt::RenderBasin::createTexture ( const MemCore::RefPtr< MemCore::ChunkBase > &  TextureData,
TextureFormat  TF,
int  rank,
size_t *  Dimensions,
int  TextureUnit = 0,
TextureStorageFormat  TSF = AutomaticTexture(),
int  level = 0,
int  border = 0 
) [pure virtual]

Application call to the Render Context to create a Texture.

Parameters:
TextureDataactual data to be loaded
TFThe type of the texture
rankThe dimensionality of the data
DimensionsThe extension of the data in each dimension, must match the provided TextureData
TextureUnitThe OpenGL texture unit in which to load these data
TSFThe internal storage format of the texture, affects memory utilization.

Implemented in Wizt::VGLRenderContext.

MemCore::RefPtr<VertexAttribute> Wizt::RenderBasin::createTextureCoordinates ( const MemCore::RefPtr< MemCore::ChunkBase > &  TextureCoordData,
int  TextureUnit = 0 
) [inline]

Convenience function to load texture coordinates as vertex attribute.

            RenderBasin&myContext;
            Anemone RenderAnemone;
                    RenderAnemone.insert( Context.createTexture( Data ) );
virtual MemCore::RefPtr<VertexAttribute> Wizt::RenderBasin::createVertexAttribute ( const MemCore::RefPtr< MemCore::ChunkBase > &  VertexData,
const std::string name 
) [pure virtual]
Parameters:
nameA name to be associated with this buffer
            RenderBasin&myContext;
            Anemone RenderAnemone;
                    RenderAnemone.insert( Context.createVertexAttribute( Data , "myVariable" ) );

Implemented in Wizt::VGLRenderContext, and Wizt::WebGLRenderContext.

virtual MemCore::RefPtr<Painter> Wizt::RenderBasin::drawPrimitives ( Primitive  ,
size_t  howmany = 0 
) [pure virtual]

Return a painter object suitable for insertion to an Anemone.

It is supposed to draw all stored Tentacles once called through Anemone::wave().

        Anemone RenderAnemone;
        RenderBasin&MyRenderContext;

        RenderAnemone.insert( MyRenderContext.drawPrimitives(RenderBasin::POINTS) );

                RenderAnemone.wave();
Parameters:
howmanyThe number of elements that will be shown. If none specified here, then all that have been loaded into the Anemone .

Implemented in Wizt::VGLRenderContext, and Wizt::WebGLRenderContext.

virtual MemCore::RefPtr<RenderFlag> Wizt::RenderBasin::Enable ( const char *  what,
bool  Yes = true 
) [pure virtual]

Enable some rendering flag Give some OpenGL flag as string, for instance:

                Enable("GL_LIGHTING");

instead of

                glEnable(GL_LIGHTING);

Note that inclusion of OpenGL headers is not required to call this function.

Implemented in Wizt::VGLRenderContext, and Wizt::WebGLRenderContext.

RenderBasin::TextureStorageFormat Wizt::RenderBasin::MultichannelTexture ( int  nChannels,
TextureStorageFormat::BitPrecision  theBits = TextureStorageFormat::Unspecified 
)

Create some texture matching the number of specified channels, it will be:

  1. One: Intensity
  2. Two: LuminanceAlpha
  3. Three: Rgb
  4. Four: RgbAlpha
Parameters:
nChannelsThe number of channels that shall be in the texture.

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