VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtVariableRateShadingImage Class Reference

Wrapper around Nvidia Variable Rate Shading Image functionality Creates a texture of the correct size for the provided channel. The texture factors in the shading rate Texel size (typically 16x16). The shading rate image format is R8UI it's texel values are used as lookups in the the currently bound shading rate image palette.

Inheritance diagram for makVrv::DtVariableRateShadingImage:
Inheritance graph
[legend]

Public Types

typedef std::vector< unsigned
char
VariableRatePixelBuffer
 

Public Member Functions

 DtVariableRateShadingImage (DtDe &de, DtOsgChannel *channel)
 
void initGLObjects (osg::State &state)
 
bool createShadingRateImageTextureForChannel (osg::State &state)
 
unsigned int imageWidth () const
 
unsigned int imageHeight () const
 
unsigned int shadingRateTexelWidth () const
 
unsigned int shadingRateTexelHeight () const
 
void useImageData (bool useData)
 
void dirtyImageData ()
 
std::vector
< VariableRatePixelBuffer > & 
imageData ()
 
DtGlRenderTexturetexture ()
 
void bindShadingImage (osg::State &state)
 
bool isInitalised ()
 
void reset ()
 

Static Public Member Functions

static void populateDataForvated (int width, int height, float centerX, float centerY, VariableRatePixelBuffer &data)
 
static void populateDataFocusRect (int width, int height, float focusMinX, float focusMinY, float focusMaxX, float focusMaxY, unsigned char focusVal, unsigned char contextVal, VariableRatePixelBuffer &data)
 

Protected Member Functions

virtual ~DtVariableRateShadingImage ()
 
void loadImageData (osg::State &state)
 

Protected Attributes

DtDemyDe
 
DtOsgChannelmyChannel
 
VariableRateShadingExtensionsmyExt
 
bool myIsInitalised
 
DtGlRenderTexturemyShadingRateTexture
 
GLint myShadingRateImageTexelWidth
 
GLint myShadingRateImageTexelHeight
 
std::vector
< VariableRatePixelBuffer
myShadingRateImageData
 
bool myUseImageData
 
bool myShadingRateTextureIsDirty
 

Private Member Functions

 DtVariableRateShadingImage (const DtVariableRateShadingImage &other)
 
DtVariableRateShadingImageoperator= (const DtVariableRateShadingImage &other)
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtVariableRateShadingImage::DtVariableRateShadingImage ( const DtVariableRateShadingImage other)
private

Copy Constructor not implemented – Copy Not Allowed.

makVrv::DtVariableRateShadingImage::DtVariableRateShadingImage ( DtDe de,
DtOsgChannel channel 
)

CTOR.

virtual makVrv::DtVariableRateShadingImage::~DtVariableRateShadingImage ( )
protectedvirtual

DTOR.

Member Function Documentation

DtVariableRateShadingImage& makVrv::DtVariableRateShadingImage::operator= ( const DtVariableRateShadingImage other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

void makVrv::DtVariableRateShadingImage::initGLObjects ( osg::State &  state)

initalise the gl extensions, get the image texel sizes and calculate the image size

bool makVrv::DtVariableRateShadingImage::createShadingRateImageTextureForChannel ( osg::State &  state)

create the shading rate image texture with correct dimensions for it's rendertexture accounting for texel sizes

unsigned int makVrv::DtVariableRateShadingImage::imageWidth ( ) const

return the texel width of the shading rate texture

unsigned int makVrv::DtVariableRateShadingImage::imageHeight ( ) const

return the texel height of the shading rate texture

unsigned int makVrv::DtVariableRateShadingImage::shadingRateTexelWidth ( ) const

return the shading rate texel width (number of pixels each texel covers)

unsigned int makVrv::DtVariableRateShadingImage::shadingRateTexelHeight ( ) const

return the shading rate texel height (number of pixels each texel covers)

void makVrv::DtVariableRateShadingImage::useImageData ( bool  useData)

should we use the image data array to populate the texture

void makVrv::DtVariableRateShadingImage::dirtyImageData ( )

flag the image data is dirty so it gets loaded on next bind call

std::vector<VariableRatePixelBuffer>& makVrv::DtVariableRateShadingImage::imageData ( )

return the data used to populate the shading rate texture

DtGlRenderTexture* makVrv::DtVariableRateShadingImage::texture ( )

/brief return the texture used as the shading rate image

void makVrv::DtVariableRateShadingImage::bindShadingImage ( osg::State &  state)

bind the shading rate texture

bool makVrv::DtVariableRateShadingImage::isInitalised ( )
inline

has initGLObject been called and succeeded

void makVrv::DtVariableRateShadingImage::reset ( void  )
inline

reset the initalised state so the image is rebuilt

static void makVrv::DtVariableRateShadingImage::populateDataForvated ( int  width,
int  height,
float  centerX,
float  centerY,
VariableRatePixelBuffer data 
)
static

convienince method to create forvated image data, centerX/Y are in normalise coords 0,0 at bottom left

static void makVrv::DtVariableRateShadingImage::populateDataFocusRect ( int  width,
int  height,
float  focusMinX,
float  focusMinY,
float  focusMaxX,
float  focusMaxY,
unsigned char  focusVal,
unsigned char  contextVal,
VariableRatePixelBuffer data 
)
static

convienince method to create focus rect image data, min/max x/y are in normalise coords 0,0 at bottom left.

void makVrv::DtVariableRateShadingImage::loadImageData ( osg::State &  state)
protected

load the image data into the texture

Member Data Documentation

DtDe& makVrv::DtVariableRateShadingImage::myDe
protected
DtOsgChannel* makVrv::DtVariableRateShadingImage::myChannel
protected
VariableRateShadingExtensions* makVrv::DtVariableRateShadingImage::myExt
protected
bool makVrv::DtVariableRateShadingImage::myIsInitalised
protected
DtGlRenderTexture* makVrv::DtVariableRateShadingImage::myShadingRateTexture
protected
GLint makVrv::DtVariableRateShadingImage::myShadingRateImageTexelWidth
protected
GLint makVrv::DtVariableRateShadingImage::myShadingRateImageTexelHeight
protected
std::vector<VariableRatePixelBuffer> makVrv::DtVariableRateShadingImage::myShadingRateImageData
protected
bool makVrv::DtVariableRateShadingImage::myUseImageData
protected
bool makVrv::DtVariableRateShadingImage::myShadingRateTextureIsDirty
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)