VR-Forces 4.10 Class Documentation
 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. More...

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

Public Types

typedef std::vector< unsigned
char
VariableRatePixelBuffer
 

Public Member Functions

 DtVariableRateShadingImage (DtDe &de, DtOsgChannel *channel)
 CTOR. More...
 
void initGLObjects (osg::State &state)
 initalise the gl extensions, get the image texel sizes and calculate the image size More...
 
void createShadingRateImageTextureForChannel (osg::State &state)
 create the shading rate image texture with correct dimensions for it's rendertexture accounting for texel sizes More...
 
unsigned int imageWidth () const
 return the texel width of the shading rate texture More...
 
unsigned int imageHeight () const
 return the texel height of the shading rate texture More...
 
unsigned int shadingRateTexelWidth () const
 return the shading rate texel width (number of pixels each texel covers) More...
 
unsigned int shadingRateTexelHeight () const
 return the shading rate texel height (number of pixels each texel covers) More...
 
void useImageData (bool useData)
 should we use the image data array to populate the texture More...
 
void dirtyImageData ()
 flag the image data is dirty so it gets loaded on next bind call More...
 
std::vector
< VariableRatePixelBuffer > & 
imageData ()
 return the data used to populate the shading rate texture More...
 
DtGlRenderTexturetexture ()
 /brief return the texture used as the shading rate image More...
 
void bindShadingImage (osg::State &state)
 bind the shading rate texture More...
 
bool isInitalised ()
 has initGLObject been called and succeeded More...
 

Static Public Member Functions

static void populateDataForvated (int width, int height, float centerX, float centerY, VariableRatePixelBuffer &data)
 convienince method to create forvated image data, centerX/Y are in normalise coords 0,0 at bottom left More...
 
static void populateDataFocusRect (int width, int height, float focusMinX, float focusMinY, float focusMaxX, float focusMaxY, unsigned char focusVal, unsigned char contextVal, VariableRatePixelBuffer &data)
 convienince method to create focus rect image data, min/max x/y are in normalise coords 0,0 at bottom left. More...
 

Protected Member Functions

virtual ~DtVariableRateShadingImage ()
 DTOR. More...
 
void loadImageData (osg::State &state)
 load the image data into the texture More...
 

Protected Attributes

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

Private Member Functions

 DtVariableRateShadingImage (const DtVariableRateShadingImage &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtVariableRateShadingImageoperator= (const DtVariableRateShadingImage &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Detailed Description

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

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

void 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

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
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)