|
Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A namespace for the Anemone Fish API to field fragments into textures. More...
#include <FishBasin.hpp>
Public Types | |
| using | DataFilter_t = std::function<RefPtr<ChunkBase> (const RefPtr<Fiber::MemBase>&FieldDataArray, const std::string&FieldName)> |
Static Public Member Functions | |
| static MemCore::RefPtr< AnemoneCreator<> > | getAnemoneCreator (RenderBasin &RB, const MemCore::WeakPtr< Wizt::VManagedObject > &RenderObject, const MemCore::WeakPtr< Fiber::CreativeArrayBase > &CAB, const RefPtr< Fiber::Chart > &theCurrentChart=nullptr) |
| Create a new or retrieve an existing anemone creator that is bound to a data set and is unique for each render object. | |
| static RefPtr< AnemoneCreatorBase > | getAnemoneCreator (RenderBasin &Context, const WeakPtr< VManagedObject > &RenderObject, const RefPtr< Fiber::Chart > &theCurrentChart, Intercube &IC, const std::function< RefPtr< AnemoneCreatorBase >(const Seagrass &)> &newAnemoneCreator, const AnemoneFieldFragmentDependency::key_type &={}) |
| static MemCore::RefPtr< RenderBasin::VertexAttribute > | createVertexAttribute (RenderBasin &RB, const MemCore::WeakPtr< Fiber::MemBase > &Data, const std::string &name, const DataFilter_t &DF, bool AllowProceduralArray) |
| static MemCore::RefPtr< RenderBasin::VertexAttribute > | createVertexAttribute (RenderBasin &RB, const MemCore::WeakPtr< Fiber::CreativeArrayBase > &CAB, const std::string &name, const DataFilter_t &DF, bool AllowProceduralArray) |
| static MemCore::RefPtr< RenderBasin::TextureTentacle > | createTexture (RenderBasin &RB, const MemCore::WeakPtr< Fiber::MemBase > &Data, RenderBasin::TextureFormat TF, int TextureUnit=0, RenderBasin::TextureStorageFormat TSF=RenderBasin::AutomaticTexture(), int level=0, bool GenerateDoMipMap=false, const MemCore::RefPtr< RenderBasin::TextureTentacle > &OldTT=MemCore::NullPtr(), bool AllowProceduralArray=false) |
| static MemCore::RefPtr< RenderBasin::TextureTentacle > | createTexture (RenderBasin &RB, const MemCore::WeakPtr< Fiber::CreativeArrayBase > &CAB, RenderBasin::TextureFormat TF, int TextureUnit=0, RenderBasin::TextureStorageFormat TSF=RenderBasin::AutomaticTexture(), int level=0, bool GenerateDoMipMap=false, const MemCore::RefPtr< RenderBasin::TextureTentacle > &OldTT=MemCore::NullPtr(), bool AllowProceduralArray=false) |
| static MemCore::RefPtr< RenderBasin::TextureTentacle > | createTexture (RenderBasin &RB, const MemCore::WeakPtr< AnemoneCreatorBase > &AnemoneCreator, const MemCore::RefPtr< Fiber::CreativeArrayBase > &CAB, RenderBasin::TextureFormat TF, int TextureUnit=0, RenderBasin::TextureStorageFormat TSF=RenderBasin::AutomaticTexture(), int level=0, bool GenerateDoMipMap=false, const MemCore::RefPtr< RenderBasin::TextureTentacle > &OldTT=MemCore::NullPtr(), bool AllowProceduralArray=false) |
| static MemCore::RefPtr< RenderBasin::Attribute > | createTextureBuffer (RenderBasin &RB, const MemCore::WeakPtr< Fiber::MemBase > &Data, int TextureUnit=0, bool doNormalize=false, int AttributeClass=0, int MaxBitStorage=0, bool AllowProceduralArray=false) |
| To add a data field to the face elements of a render anemone, use code like this: | |
| static MemCore::RefPtr< RenderBasin::Attribute > | createTextureBuffer (RenderBasin &RB, const MemCore::RefPtr< Fiber::CreativeArrayBase > &CAB, int TextureUnit=0, bool doNormalize=false, int AttributeClass=0, int MaxBitStorage=0, bool AllowProceduralArray=false) |
| Create a texture buffer from a data creator. | |
| static MemCore::RefPtr< RenderBasin::Attribute > | createTextureBuffer (RenderBasin &RB, const MemCore::WeakPtr< AnemoneCreatorBase > &AnemoneCreator, const MemCore::RefPtr< Fiber::CreativeArrayBase > &CAB, int TextureUnit=0, bool doNormalize=false, int AttributeClass=0, int MaxBitStorage=0, bool AllowProceduralArray=false) |
| Create a texture buffer from a data creator with caching, i.e. | |
| static void | addDependency (RenderBasin &RB, const MemCore::WeakPtr< AnemoneCreatorBase > &AnemoneCreator, const MemCore::RefPtr< Fiber::CreativeArrayBase > &CAB) |
| Specify a dependency of the anemone creator on the given Field such that the anemone is removed if the Field is removed, too. | |
A namespace for the Anemone Fish API to field fragments into textures.
Using Tentacles The general synopsis is to derive from class Programmable and call
This call optionally uses files "MyRenderModule.vert" and "MyRenderModule.frag" to contain GLSL code to be loaded at runtime.
This call provides a program tentacle, to be inserted to a render anemone:
The above code makes use of render Anemones. Such are easily created from an AnemoneCreator which manages cacheing of RenderAnemones such as in:
Note the the AnemoneCreator must be stored in a persistent place outside of a render() call, for instance at a data object or a state object. Otherwise the Anemone cannot be cached and will need to be re-created at each render call.
|
inlinestatic |
Create a texture buffer from a data creator with caching, i.e.
it will be released if the data creator ceases to exist.
References createTextureBuffer(), and Wizt::RenderBasin::getSeagrassPtr().
|
static |
To add a data field to the face elements of a render anemone, use code like this:
This requires a sampler buffer to be defined in the shader, such as (for integer fields):
The information per triangle can then be used in the geometry shader as
This implies mapping triangles to triangles in the geometry shader:
See RenderBasin::VertexAttribute::Classes for possible categories of attribute classes.
References Wizt::RenderBasin::createTextureBuffer().
Referenced by createTextureBuffer(), and createTextureBuffer().
|
static |
| name | A name to be associated with this buffer |
| AllowProceduralArray | Allow conversion of procedural arrays to memory arrays such that they can be loaded as vertex buffer; this may be computationally and memory- intensive. RenderBasin&myContext;
Anemone RenderAnemone;
static MemCore::RefPtr< RenderBasin::VertexAttribute > createVertexAttribute(RenderBasin &RB, const MemCore::WeakPtr< Fiber::MemBase > &Data, const std::string &name, const DataFilter_t &DF, bool AllowProceduralArray) Definition FishBasin.cpp:115 |
References Wizt::RenderBasin::createVertexAttribute().
|
static |
Create a new or retrieve an existing anemone creator that is bound to a data set and is unique for each render object.
The anemones created by this AnemoneCreator will die with either the data object or the render object dies.
To create a render Anemone use code such as:
and consider that the render anemone might either be an existing one that can be re-used, or it might be a newly created one that will need its render tentacles to be inserted.
References getAnemoneCreator().
Referenced by getAnemoneCreator().