VISH
0.2
|
Context for rendering into a WebGL stream. More...
#include </home/werner/origo/vish/ocean/Argyroneta/WebGL/WebGLRenderContext.hpp>
Context for rendering into a WebGL stream.
Functionality is limited to WebGL (OpenGL ES): http://www.khronos.org/opengles/documentation/opengles1_0/html/ http://www.nihilogic.dk/labs/webgl_cheat_sheet/WebGL_Cheat_Sheet.pdf
MemCore::RefPtr< RenderBasin::VertexAttribute > Wizt::WebGLRenderContext::createVertexAttribute | ( | const MemCore::RefPtr< MemCore::ChunkBase > & | VertexData, |
const std::string & | name | ||
) | [virtual] |
name | A name to be associated with this buffer RenderBasin&myContext; Anemone RenderAnemone; RenderAnemone.insert( Context.createVertexAttribute( Data , "myVariable" ) ); |
Implements Wizt::RenderBasin.
MemCore::RefPtr< RenderBasin::Painter > Wizt::WebGLRenderContext::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::WebGLRenderContext::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.
int Wizt::WebGLRenderContext::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.