iv::TranslucentElem Class Reference

#include <TranslucentElem.hpp>

Public Member Functions

 TranslucentElem (Elem *elem)
 
void status (iv::TableDebugView *view)
 
Elemelem ()
 
const Elemelem () const
 
TranslucentElempreblend (float4 val)
 
TranslucentElemtranslucent (bool val)
 

Public Attributes

ClientMarker cm
 
DirtyAttr< float4attr_preblend
 Enables blending in fragment shader - blends into a fixed color rather than into the current content of framebuffer. This allows us to emulate blending in static scenes without requiring specific draw order. More...
 
DirtyAttr< bool > attr_translucent
 Item will be drawn as translucent - enables blending and draws after all opaque elements sorted by depth with other translucent objects. More...
 

Detailed Description

Elements that can be translucent. This provides 'preblend' and 'allow_translucent' initialization parameters. If you want to handle translucency youself, you don't need to use this, this is just a simple helper class.

By default, items will be rendered without blending (to allow sorting based on opengl state switches and therefore improve performance).

Definition at line 16 of file TranslucentElem.hpp.

Constructor & Destructor Documentation

◆ TranslucentElem()

iv::TranslucentElem::TranslucentElem ( Elem elem)

Definition at line 6 of file TranslucentElem.cpp.

Member Function Documentation

◆ status()

void iv::TranslucentElem::status ( iv::TableDebugView view)

Definition at line 14 of file TranslucentElem.cpp.

◆ elem() [1/2]

const Elem * iv::TranslucentElem::elem ( )

Definition at line 24 of file TranslucentElem.cpp.

◆ elem() [2/2]

const Elem* iv::TranslucentElem::elem ( ) const

◆ preblend()

TranslucentElem * iv::TranslucentElem::preblend ( float4  val)

Definition at line 34 of file TranslucentElem.cpp.

◆ translucent()

TranslucentElem * iv::TranslucentElem::translucent ( bool  val)

Definition at line 40 of file TranslucentElem.cpp.

Member Data Documentation

◆ cm

ClientMarker iv::TranslucentElem::cm

Definition at line 19 of file TranslucentElem.hpp.

◆ attr_preblend

DirtyAttr< float4 > iv::TranslucentElem::attr_preblend

Enables blending in fragment shader - blends into a fixed color rather than into the current content of framebuffer. This allows us to emulate blending in static scenes without requiring specific draw order.

Definition at line 28 of file TranslucentElem.hpp.

◆ attr_translucent

DirtyAttr< bool > iv::TranslucentElem::attr_translucent

Item will be drawn as translucent - enables blending and draws after all opaque elements sorted by depth with other translucent objects.

Definition at line 29 of file TranslucentElem.hpp.


The documentation for this class was generated from the following files: