VISH
0.2
|
A special vish context that is passed to VGLRenderObjects when rendering. More...
#include </home/werner/origo/vish/ocean/GLvish/VGLRenderContext.hpp>
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 ];
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.
TextureData | actual data to be loaded |
TF | The type of the texture |
rank | The dimensionality of the data |
Dimensions | The extension of the data in each dimension, must match the provided TextureData |
TextureUnit | The OpenGL texture unit in which to load these data |
TSF | The 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();
howmany | The number of elements that will be shown. If none specified here, then all that have been loaded into the Anemone . |
Implements Wizt::RenderBasin.
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.
vertical_fov | Vertical 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] |