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

Base class for render objects to implement a stereo render function that draws to the left and right eye directly as enabled by. More...

#include <ocean/Anemonia/MultiView.hpp>

Inheritance diagram for Wizt::StereoDraw:
Wizt::VManagedObjectBase MemCore::ReferenceBase< VManagedObjectBase >

Public Member Functions

bool exception_safe_stereo_render (const RefPtr< RenderAble > &that, double &RenderTime, VRenderContext &Context, const MultiView &Eyes, RenderAble::SubContext &SC) noexcept
 Calls multiview_render() and handles possible exceptions.
 
- Public Member Functions inherited from Wizt::VManagedObjectBase
 VManagedObjectBase ()
 Constructor.
 
 ~VManagedObjectBase ()
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< VManagedObjectBase, VManagedObjectBase > &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 (VManagedObjectBase *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< VManagedObjectBase >
using reference_domain_t = VManagedObjectBase
 The type of the base class.
 
using SelfPtr_t = WeakPtr< VManagedObjectBase, VManagedObjectBase >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
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

Base class for render objects to implement a stereo render function that draws to the left and right eye directly as enabled by.

const GLenum buffers[] = {GL_BACK_LEFT, GL_BACK_RIGHT};
glDrawBuffers(2, buffers);

A fragment shader may then write to the left and right eye directly via

#version 440
layout(location = 0) out vec4 leftColor;
layout(location = 1) out vec4 rightColor;
void main (void)
{
leftColor = vec4(0,0,1,0);
rightColor = vec4(1,0,0,0);
}

However, there is only one depth buffer in this setup, so the usage is limited. Use class MultiviewRenderable and multiview_render() for situations when a depth buffer is needed separatedly for the left and right eye.