VISH  0.2
Classes | Public Types | Public Member Functions | Public Attributes
Wizt::VGLRenderContext Struct Reference

A special vish context that is passed to VGLRenderObjects when rendering. More...

#include </home/werner/origo/vish/ocean/GLvish/VGLRenderContext.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Public Attributes


Detailed Description

A special vish context that is passed to VGLRenderObjects when rendering.

This context contains various openGL/rendering specific properties. It also manages OpenGL Display lists, which are stored relative to an arbitrary Intercube object:

Intercube&IC;
VGLRenderContext&RC;
ValueSet   VS;

RefPtr<DisplayList> DL = RC[ IC ][ VS ];
Examples:

AnemoneBoundingVolume.cpp, Background.cpp, BoundingVolume.cpp, DynamicBackground.cpp, Gear.cpp, MonochromeBackground.cpp, MouseBackground.cpp, and SeagrassBoundingVolume.cpp.


Member Function Documentation

RefPtr< RenderBasin::TextureTentacle > Wizt::VGLRenderContext::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 
) [virtual]

Implementation 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.

Implements Wizt::RenderBasin.

MemCore::RefPtr< RenderBasin::Painter > Wizt::VGLRenderContext::drawPrimitives ( Primitive  ,
size_t  howmany = 0 
) [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 .

Implements Wizt::RenderBasin.

Examples:
AnemoneBoundingVolume.cpp, and SeagrassBoundingVolume.cpp.
MemCore::RefPtr< RenderBasin::RenderFlag > Wizt::VGLRenderContext::Enable ( const char *  what,
bool  Yes = true 
) [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.

Implements Wizt::RenderBasin.

void Wizt::VGLRenderContext::glJitterFrustum ( GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top,
GLdouble  zNear,
GLdouble  zFar,
bool  Orthographic 
)

Setup the OpenGL project matrix (matrix mode needs to be set to PROJECTION first!) to cover some bounding box as given by the parameters.

This includes some jittering effects.

void Wizt::VGLRenderContext::glJitterLookAt ( )

Adjust the opengl matrix (should be the MODELVIEW matrix) to the camera parameters.

This includes possible jittering effects.

void Wizt::VGLRenderContext::glPerspective ( double  vertical_fov,
double  near,
double  far,
bool  Orthographic 
) [virtual]

For tiled rendering: Setup the Image size (in pixels) the size of one Tile (in pixels) and define the CurrentTileID (in integers telling the current ID of the tile to be rendered).

Setup the OpenGL Projection matrix, taking into account jittering settings.

Parameters:
vertical_fovVertical field of view in degrees

Overriden by Jugvish/Asynchronous/glviewer/JugRenderContext.hpp

int Wizt::VGLRenderContext::render ( const ObjectSelection RenderObjects,
double &  RenderTime,
int  MinLevel = RENDER_FIRST,
int  MaxLevel = RENDER_LAST 
) [virtual]

Implementation of object layer traversal, setting OpenGL matrizes for each RenderCategory.

Called by VSceneLayers::render(), which is called by virtual Viewer::render().

Implements Wizt::VRenderContext.

RefPtr< TouchList > Wizt::VGLRenderContext::touch ( const ObjectSelection RenderObjects,
int  X,
int  Y,
int  DX = 1,
int  DY = 1,
int  MinLevel = DEFAULT_OBJECT-1,
int  MaxLevel = OVERLAY_OBJECT-1 
) [virtual]

16 bit depth buffer

HERE set mouse coordinatess!!!!!!!!!!!!!!

Implements Wizt::VRenderContext.


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