The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::GLImageTileProcessor Struct Reference

An interceptor class for rendering, allows to process pixels before they are saved to disk. More...

#include <ocean/GLvish/GLImageTileProcessor.hpp>

Inheritance diagram for Wizt::GLImageTileProcessor:
Wizt::ImageTileProcessor MemCore::ReferenceBase< ImageTileProcessor >

Public Member Functions

virtual RefPtr< GLTexture2DcreateFrameTexture (int Width, int Height)
 If we want to render a frame into a texture, this function must return a texture object.
 
virtual string FragmentShaderCode () const
 
 GLImageTileProcessor ()
 Constructor.
 
virtual void renderFrameTexture (GLTexture2D &FrameData)
 Once the scene has been rendered into the specified texture, it needs to be rendered to the current frame buffer.
 
 ~GLImageTileProcessor ()
 Destructor.
 
- Public Member Functions inherited from Wizt::ImageTileProcessor
 ImageTileProcessor ()
 Construct it.
 
virtual void process (VGrabContext &, ImageTile &theImageTile)
 Process a tile of an image.
 
 ~ImageTileProcessor ()
 Destroy it.
 
- Public Member Functions inherited from MemCore::ReferenceBase< ImageTileProcessor >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< ImageTileProcessor, ImageTileProcessor > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (ImageTileProcessor *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< ImageTileProcessor >
using reference_domain_t = ImageTileProcessor
 The type of the base class.
 
using SelfPtr_t = WeakPtr< ImageTileProcessor, ImageTileProcessor >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< ImageTileProcessor >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

An interceptor class for rendering, allows to process pixels before they are saved to disk.

Member Function Documentation

◆ createFrameTexture()

RefPtr< GLTexture2D > Wizt::GLImageTileProcessor::createFrameTexture ( int  Width,
int  Height 
)
virtual

If we want to render a frame into a texture, this function must return a texture object.

It must be of the provided size, and not have any data associated. Such texture objects are created via the GLTexture2D::reserve() function.

Note that this function will be called within an OpenGL context.

◆ FragmentShaderCode()

string Wizt::GLImageTileProcessor::FragmentShaderCode ( ) const
virtual
       Source code of the fragment shader that is called for each
       pixel. It must read colors from a 2D texture called "frame"
       Simple default code is like this:
       @code

uniform sampler2D frame; void main (void) { vec4 Color = texture2D(frame, gl_TexCoord[0].xy); gl_FragColor = Color; }

Referenced by renderFrameTexture().

◆ renderFrameTexture()

void Wizt::GLImageTileProcessor::renderFrameTexture ( GLTexture2D FrameData)
virtual

Once the scene has been rendered into the specified texture, it needs to be rendered to the current frame buffer.

This function is responsible for doing so, whereby it may call a shader to transform the pixels.

References Wizt::EnableTexture::enable(), and FragmentShaderCode().