HDK
|
#include <RV_Render.h>
Classes | |
struct | DefaultDrawTask |
struct | DrawState |
struct | DrawTask |
struct | RenderState |
struct | rv_MemoryBarriers |
Public Types | |
using | Callback = UT_Function< void(RV_Instance *)> |
Public Member Functions | |
RV_Render (RV_Instance *inst) | |
~RV_Render () | |
RV_Render (const RV_Render &)=delete | |
RV_Render (RV_Render &&)=delete | |
RV_Instance * | instance () |
The instance associated with this render. More... | |
VkDevice | device () |
The raw vulkan device. More... | |
RV_VKCommandBuffer * | getCurrentCB () |
The currently recording command buffer. More... | |
int | beginFrame () |
void | endFrame (int frame_depth) |
bool | isInFrame () |
Returns true if currently rendering a frame. More... | |
bool | beginRendering (RV_ImageOp img_op=RV_IMAGE_LOAD) |
void | endRendering () |
End rendering. More... | |
bool | isRendering () |
void | resetRenderState () |
Reset the cached render state in this object to Vulkan defaults. More... | |
void | copyRenderState (RV_Render *other) |
Copy render state from another RV_Render. More... | |
void | copyRenderState (const RenderState *state) |
Copy saved render state from another RV_Render. More... | |
RenderState | getRenderState () |
RV_VKPipelineStateInfo * | getPipelineState () |
Return the current pipeline State. More... | |
void | resetPipeState () |
Reset the pipeline state to Vulkan defaults. More... | |
void | commitPipeState () |
Send the current pipeline state to the GPU. More... | |
void | pushPipeState () |
void | popPipeState () |
Restore the pipeline state from a previous pushPipeState(). More... | |
void | setSampleMask (uint32 mask) |
Set the sample mask for multisample rendering. More... | |
void | setColorMask (bool red, bool green, bool blue, bool alpha) |
Set the color channel mask. More... | |
void | setCullMode (bool enable, bool back_face=true, bool is_ccw=true) |
Set the primitive culling mode, for backface or frontface culling. More... | |
void | setLineWidth (float width) |
Set the width of line primitives (may not be supported on all platforms) More... | |
void | setPolygonMode (RV_PolygonMode mode) |
void | setDepthState (bool enable, RE_ZFunction func=RE_ZLESS, bool writing=true, float near=0.0, float far=1.0, bool clamp=false) |
Set the depth state for zbuffer operations. More... | |
RE_ZFunction | getDepthFunction () const |
Query the current depth function. More... | |
void | setDepthBias (bool enable, float zconst, float zslope, float clamp=0.f) |
Set the polygon depth bias to reduce z-fighting for overlapping objects. More... | |
bool | isDepthBiasEnabled () const |
Whether there is a depth bias set. More... | |
void | setReverseDepth (bool reverse) |
bool | isReverseDepth () const |
Query if reverse depth mapping is enabled. More... | |
int | getNDCNearPlane () const |
int | getNDCFarPlane () const |
void | setStencilEnable (bool enable) |
Enable stencil buffer rendering. Framebuffer must have a stencil buffer. More... | |
bool | getStencilEnable () const |
void | setStencilTest (RE_SFunction func, uint8 ref, uint8 compare_mask, bool set_back=true) |
Define the stencil test. More... | |
void | setStencilOp (RE_SOperation stencil_fail, RE_SOperation depth_fail, RE_SOperation pass, uint8 write_mask, bool set_back=true) |
void | setStencilBackTest (RE_SFunction func, uint8 ref, uint8 compare_mask) |
Define the stencil test for backfacing polygons. More... | |
void | setStencilBackOp (RE_SOperation stencil_fail, RE_SOperation depth_fail, RE_SOperation pass, uint8 write_mask) |
Define the stencil operation for backfacing polygons. More... | |
void | setViewport2DI (bool enable, const UT_DimRect &rect) |
Define the viewport for rendering. More... | |
void | setScissor2DI (bool enable, const UT_DimRect &rect) |
Define the scissor (clip) area. More... | |
void | setLogicOp (bool enable, RV_LogicOp=RV_LOGIC_NO_OP) |
Enable logic operations instead of color, plus the operation (AND,OR,etc) More... | |
void | setBlendEnable (bool blend) |
Enable framebuffer blending. More... | |
void | setBlendFunction (RE_BlendSourceFactor source_factor, RE_BlendDestFactor dest_factor) |
Set the blending weights for color and alpha. More... | |
void | setColorBlendFunction (RE_BlendSourceFactor source_factor, RE_BlendDestFactor dest_factor) |
Set the blending weights for color only. More... | |
void | setAlphaBlendFunction (RE_BlendSourceFactor source_factor, RE_BlendDestFactor dest_factor) |
Set the blending weights for alpha only. More... | |
void | setBlendEquation (RE_BlendEquation eq) |
Set the blending operator (add, subtract, multiply, etc) More... | |
void | setAlphaBlendEquation (RE_BlendEquation eq) |
Set the blending operator (add, subtract, multiply, etc) for Alpha Only. More... | |
bool | isDeferringDraws () const |
void | clearDraws () |
void | queueDraw (RV_Geometry *geo, int connect, int connect_num, const RV_OverrideList *override_list, int inst=-1) |
void | queueDraw (UT_UniquePtr< DrawTask > task) |
void | runDraws () |
bool | refreshBindings () |
bool | prepareForDraw () |
RV_PushConstants & | getPushConstants () |
const RV_PushConstants & | pushConstants () const |
RV_ShaderVariableSet * | getSet (int set_num) |
Return the bound variable set at index 'set_num'. More... | |
void | unbindSet (int set_num) |
Remove a bound variable set by index. More... | |
void | unbindSet (const RV_ShaderVariableSet *set) |
Remove a bound variable set by object. More... | |
bool | bindSet (RV_ShaderVariableSet *set, const RV_ShaderProgramBase *shr) |
Bind a variable set to the specific shader program. More... | |
bool | bindSet (const UT_UniquePtr< RV_ShaderVariableSet > &set) |
Bind a variable set to the current shader program. More... | |
void | pushShader () |
Store the current shader. More... | |
void | pushShader (RV_ShaderProgramBase *sh) |
Store the current shader and set the new shader to 'sh'. More... | |
void | popShader () |
Restore the previous shader saved by pushShader() More... | |
void | setShader (RV_ShaderProgramBase *sh) |
Set the current shader to 'sh'. More... | |
RV_ShaderProgramBase * | getShader () |
Get the current shader. More... | |
RV_ShaderCompute * | getComputeShader () |
RV_ShaderProgram * | getGraphicsShader () |
void | pushDrawFramebuffer () |
Save the current render framebuffer. More... | |
void | pushDrawFramebuffer (RV_Framebuffer *fb) |
Save the current render framebuffer and make a new framebuffer active. More... | |
void | popDrawFramebuffer () |
Restore the previously pushed framebuffer from pushDrawFramebuffer(). More... | |
void | bindDrawFramebuffer (RV_Framebuffer *fb) |
Make a new framebuffer active. More... | |
RV_Framebuffer * | getDrawFramebuffer () |
Get the current framebuffer (may be null) More... | |
const RV_OcclusionQuery * | getQuery () const |
Return the currently active occlusion query. More... | |
void | setQuery (RV_OcclusionQuery *q) |
Make occlusion query 'q' the active query (only 1 can be active at once) More... | |
int | getNumCommandBuffers () const |
get the number of parallel command buffers within our pool More... | |
void | flush (bool wait_for_finish) |
bool | runCompute (int wg_x, int wg_y, int wg_z) |
bool | runComputeIndirect (RV_VKBuffer *buf, exint offset=0) |
void | draw (RV_Geometry *geo, int connect_index, const RV_OverrideList *override_list=nullptr) |
Draw the geometry 'geo' with the given connectivity group. More... | |
void | drawInstanced (RV_Geometry *geo, int connect_index, int instance_group, const RV_OverrideList *override_list=nullptr) |
void | drawRange (RV_Geometry *geo, int connect_index, int connect_num, const RV_OverrideList *override_list=nullptr) |
Draw a range of connectivity groups. More... | |
void | drawInstancedRange (RV_Geometry *geo, int connect_index, int connect_num, int inst_group, const RV_OverrideList *override_list=nullptr) |
Draw using instancing a range of connectivity groups. More... | |
void | draw (UT_UniquePtr< DrawTask > task) |
Render a deferred draw task. More... | |
void | draw (const UT_Function< bool(RV_Render *)> &task) |
Render deferred draw using lambda. More... | |
int | getNumRenderThreads () const |
Get desired number of threads to use for parallel rendering. More... | |
RV_Render * | getThreadedRender (int &out_depth, int &out_idx) |
int | getRenderIndex () const |
void | returnThreadedRender (int depth) |
RV_Render * | getMainRender () |
void | enableThreadedRender () |
void | endThreadedRender () |
void | addPostThreadingCallback (const Callback &callback) |
bool | isMainRender () const |
check whether this RV_Render is doing a threaded task More... | |
bool | isThreadedRender () const |
check whether this RV_Render is doing a threaded task More... | |
bool | isThreading () const |
check whether this RV_Render is doing a threaded task More... | |
UT_TaskArena & | getTaskArena () |
void | dumpBoundState () |
void | addDebugBarrier () |
Add debug barrier that waits for all previous events. More... | |
void | addBufferBarrier (RV_BarrierScope scope, const VkBufferMemoryBarrier &barrier, RV_VKBuffer *buf) |
Add a barrier for buffer synchronization. More... | |
void | addImageBarrier (RV_BarrierScope scope, const VkImageMemoryBarrier &barrier, RV_VKImage *img) |
Add a barrier for image synchronization. More... | |
void | clearBarriers () |
Remove all currently added barriers. More... | |
void | executeAllBarriers () |
Execute all commands with barriers. More... | |
void | executeBarriers (RV_StageGroup stages) |
Execute all commands on some queues (graphics, compute, transfer). More... | |
void | initBarriers () |
void | beginAccelStructBuild () |
void | addAccelStruct (RV_VKAccelerationStructure *accel_struct) |
void | endAccelStructBuild () |
RV_VKAccelerationStructure * | getTopLevelAccelStruct () const |
const UT_Array < RV_AccelStructShaderInfo > & | getAccelStructShaderInfos () |
RV_StagingBufferPool * | getStagingPool () |
bool | copyBuffer (RV_VKBuffer *src, int src_vsize, RV_VKBuffer *dest, int dest_vsize, int length, int src_start=0, int dst_start=0) |
Static Public Member Functions | |
static void | init (RV_Instance *inst) |
static void | cleanup () |
Public Attributes | |
UT_Array< DrawState > | myRecordedDraws |
bool | myIsDeferring = false |
UT_FixedArray < rv_MemoryBarriers, RV_STAGE_NUM > | myWaitingBarriers |
UT_FixedArray< RV_BarrierScope, RV_STAGE_NUM > | myActiveBarriers |
UT_FixedArray< exint, RV_STAGE_NUM > | myBarrierGroupID = {} |
int | myFrameExecBarrierCount = 0 |
int | myFrameMemBarrierCount = 0 |
exint | myLastASCount = 0 |
Per-thread object for rendering Vulkan objects, which maintains the state and a cache of various Vulkan entities
Definition at line 80 of file RV_Render.h.
using RV_Render::Callback = UT_Function<void(RV_Instance*)> |
Definition at line 517 of file RV_Render.h.
RV_Render::RV_Render | ( | RV_Instance * | inst | ) |
RV_Render::~RV_Render | ( | ) |
|
delete |
|
delete |
void RV_Render::addAccelStruct | ( | RV_VKAccelerationStructure * | accel_struct | ) |
void RV_Render::addBufferBarrier | ( | RV_BarrierScope | scope, |
const VkBufferMemoryBarrier & | barrier, | ||
RV_VKBuffer * | buf | ||
) |
Add a barrier for buffer synchronization.
void RV_Render::addDebugBarrier | ( | ) |
Add debug barrier that waits for all previous events.
void RV_Render::addImageBarrier | ( | RV_BarrierScope | scope, |
const VkImageMemoryBarrier & | barrier, | ||
RV_VKImage * | img | ||
) |
Add a barrier for image synchronization.
Add callback to be executed on the main thread when threaded render tasks have finished
Definition at line 520 of file RV_Render.h.
void RV_Render::beginAccelStructBuild | ( | ) |
int RV_Render::beginFrame | ( | ) |
Start rendering a single frame, returns the current nesting level See RV_RenderAutoFrame
for RAII wrapper
bool RV_Render::beginRendering | ( | RV_ImageOp | img_op = RV_IMAGE_LOAD | ) |
Begin rendering to the current framebuffer. 'img_op' can be LOAD (keep contents), CLEAR (discard and set to a constant) or DONT_CARE.
void RV_Render::bindDrawFramebuffer | ( | RV_Framebuffer * | fb | ) |
Make a new framebuffer active.
bool RV_Render::bindSet | ( | RV_ShaderVariableSet * | set, |
const RV_ShaderProgramBase * | shr | ||
) |
Bind a variable set to the specific shader program.
bool RV_Render::bindSet | ( | const UT_UniquePtr< RV_ShaderVariableSet > & | set | ) |
Bind a variable set to the current shader program.
|
static |
void RV_Render::clearBarriers | ( | ) |
Remove all currently added barriers.
void RV_Render::clearDraws | ( | ) |
void RV_Render::commitPipeState | ( | ) |
Send the current pipeline state to the GPU.
bool RV_Render::copyBuffer | ( | RV_VKBuffer * | src, |
int | src_vsize, | ||
RV_VKBuffer * | dest, | ||
int | dest_vsize, | ||
int | length, | ||
int | src_start = 0 , |
||
int | dst_start = 0 |
||
) |
void RV_Render::copyRenderState | ( | const RenderState * | state | ) |
Copy saved render state from another RV_Render.
|
inline |
The raw vulkan device.
Definition at line 94 of file RV_Render.h.
void RV_Render::draw | ( | RV_Geometry * | geo, |
int | connect_index, | ||
const RV_OverrideList * | override_list = nullptr |
||
) |
Draw the geometry 'geo' with the given connectivity group.
void RV_Render::draw | ( | UT_UniquePtr< DrawTask > | task | ) |
Render a deferred draw task.
void RV_Render::draw | ( | const UT_Function< bool(RV_Render *)> & | task | ) |
Render deferred draw using lambda.
void RV_Render::drawInstanced | ( | RV_Geometry * | geo, |
int | connect_index, | ||
int | instance_group, | ||
const RV_OverrideList * | override_list = nullptr |
||
) |
Draw the geometry 'geo' with instancing with the given connectivity group abd given instance group
void RV_Render::drawInstancedRange | ( | RV_Geometry * | geo, |
int | connect_index, | ||
int | connect_num, | ||
int | inst_group, | ||
const RV_OverrideList * | override_list = nullptr |
||
) |
Draw using instancing a range of connectivity groups.
void RV_Render::drawRange | ( | RV_Geometry * | geo, |
int | connect_index, | ||
int | connect_num, | ||
const RV_OverrideList * | override_list = nullptr |
||
) |
Draw a range of connectivity groups.
void RV_Render::dumpBoundState | ( | ) |
void RV_Render::enableThreadedRender | ( | ) |
Shold not be called manually. call GR_Utils::renderParallelFor() instead Called on the main thread before using getThreadedRender
on parallel threads
void RV_Render::endAccelStructBuild | ( | ) |
End rendering a single frame, takes the nesting level returned from begin for error checking
void RV_Render::endRendering | ( | ) |
End rendering.
void RV_Render::endThreadedRender | ( | ) |
Shold not be called manually. call GR_Utils::renderParallelFor() instead Called on the main thread after using getThreadedRender()
on parallel threads. Disassociates all per-thread RV_Renders from the thread they were used on
void RV_Render::executeAllBarriers | ( | ) |
Execute all commands with barriers.
void RV_Render::executeBarriers | ( | RV_StageGroup | stages | ) |
Execute all commands on some queues (graphics, compute, transfer).
void RV_Render::flush | ( | bool | wait_for_finish | ) |
End the current command buffer and start a new one. Wait until it is executed if 'wait_for_finish' is true.
const UT_Array<RV_AccelStructShaderInfo>& RV_Render::getAccelStructShaderInfos | ( | ) |
RV_ShaderCompute* RV_Render::getComputeShader | ( | ) |
Get the current graphics shader. If the current shader is compute, return null.
RV_VKCommandBuffer* RV_Render::getCurrentCB | ( | ) |
The currently recording command buffer.
RE_ZFunction RV_Render::getDepthFunction | ( | ) | const |
Query the current depth function.
RV_Framebuffer* RV_Render::getDrawFramebuffer | ( | ) |
Get the current framebuffer (may be null)
RV_ShaderProgram* RV_Render::getGraphicsShader | ( | ) |
Get the current compute shader. If the current shader is graphics, return null.
RV_Render* RV_Render::getMainRender | ( | ) |
Get the RV_Render used on the main thread. Will be This, if not a thread-locall render
|
inline |
Definition at line 214 of file RV_Render.h.
|
inline |
return the current near and far plane in NDC space, based on if reverse Depth is enabled
Definition at line 213 of file RV_Render.h.
int RV_Render::getNumCommandBuffers | ( | ) | const |
get the number of parallel command buffers within our pool
int RV_Render::getNumRenderThreads | ( | ) | const |
Get desired number of threads to use for parallel rendering.
|
inline |
Return the current pipeline State.
Definition at line 150 of file RV_Render.h.
|
inline |
Definition at line 369 of file RV_Render.h.
|
inline |
Return the currently active occlusion query.
Definition at line 421 of file RV_Render.h.
int RV_Render::getRenderIndex | ( | ) | const |
Get the index of the current threaded render Returns 0 for the main render, and >1 for thread specific renders
RenderState RV_Render::getRenderState | ( | ) |
RV_ShaderVariableSet* RV_Render::getSet | ( | int | set_num | ) |
Return the bound variable set at index 'set_num'.
RV_ShaderProgramBase* RV_Render::getShader | ( | ) |
Get the current shader.
RV_StagingBufferPool* RV_Render::getStagingPool | ( | ) |
bool RV_Render::getStencilEnable | ( | ) | const |
UT_TaskArena& RV_Render::getTaskArena | ( | ) |
Shold not be called manually. call GR_Utils::parallelGpuTask2() instead Gets a task Arena with a concurrency limit equal to the parallel rendering limit
Shold not be called manually. call GR_Utils::renderParallelFor() instead Associate a unique RV_Render with the current thread and return it depth
output gives a call depth, used to pair get and return calls for error checking idx
output gives the index of the render used. May not always be the same when called on the same thread at different points. Used to match render with other thread-specific resources (e.g. GR_Uniform objects)
RV_VKAccelerationStructure* RV_Render::getTopLevelAccelStruct | ( | ) | const |
|
static |
void RV_Render::initBarriers | ( | ) |
|
inline |
The instance associated with this render.
Definition at line 92 of file RV_Render.h.
|
inline |
Definition at line 351 of file RV_Render.h.
bool RV_Render::isDepthBiasEnabled | ( | ) | const |
Whether there is a depth bias set.
|
inline |
Returns true if currently rendering a frame.
Definition at line 111 of file RV_Render.h.
bool RV_Render::isMainRender | ( | ) | const |
check whether this RV_Render is doing a threaded task
bool RV_Render::isRendering | ( | ) |
Query if Vulkan is rendering. Cannot upload buffers or textures while rendering.
|
inline |
Query if reverse depth mapping is enabled.
Definition at line 209 of file RV_Render.h.
bool RV_Render::isThreadedRender | ( | ) | const |
check whether this RV_Render is doing a threaded task
bool RV_Render::isThreading | ( | ) | const |
check whether this RV_Render is doing a threaded task
void RV_Render::popDrawFramebuffer | ( | ) |
Restore the previously pushed framebuffer from pushDrawFramebuffer().
void RV_Render::popPipeState | ( | ) |
Restore the pipeline state from a previous pushPipeState().
void RV_Render::popShader | ( | ) |
Restore the previous shader saved by pushShader()
bool RV_Render::prepareForDraw | ( | ) |
|
inline |
Definition at line 379 of file RV_Render.h.
void RV_Render::pushDrawFramebuffer | ( | ) |
Save the current render framebuffer.
void RV_Render::pushDrawFramebuffer | ( | RV_Framebuffer * | fb | ) |
Save the current render framebuffer and make a new framebuffer active.
void RV_Render::pushPipeState | ( | ) |
Save the existing state so that the state can be modified, then restored to its previous state with popPipeState()
void RV_Render::pushShader | ( | ) |
Store the current shader.
void RV_Render::pushShader | ( | RV_ShaderProgramBase * | sh | ) |
Store the current shader and set the new shader to 'sh'.
void RV_Render::queueDraw | ( | RV_Geometry * | geo, |
int | connect, | ||
int | connect_num, | ||
const RV_OverrideList * | override_list, | ||
int | inst = -1 |
||
) |
void RV_Render::queueDraw | ( | UT_UniquePtr< DrawTask > | task | ) |
bool RV_Render::refreshBindings | ( | ) |
void RV_Render::resetPipeState | ( | ) |
Reset the pipeline state to Vulkan defaults.
void RV_Render::resetRenderState | ( | ) |
Reset the cached render state in this object to Vulkan defaults.
Shold not be called manually. call GR_Utils::renderParallelFor() instead Called by the task when done using the thread local render (currently does nothing but could have per-task cleanup added)
Run the current compute shader with explicit workgroup sizes. Returns false if there is no compute shader bound.
bool RV_Render::runComputeIndirect | ( | RV_VKBuffer * | buf, |
exint | offset = 0 |
||
) |
Run the current compute shader with workgroup sizes stored in the given buffer. Returns false if there is no compute shader bound.
void RV_Render::runDraws | ( | ) |
void RV_Render::setAlphaBlendEquation | ( | RE_BlendEquation | eq | ) |
Set the blending operator (add, subtract, multiply, etc) for Alpha Only.
void RV_Render::setAlphaBlendFunction | ( | RE_BlendSourceFactor | source_factor, |
RE_BlendDestFactor | dest_factor | ||
) |
Set the blending weights for alpha only.
void RV_Render::setBlendEnable | ( | bool | blend | ) |
Enable framebuffer blending.
void RV_Render::setBlendEquation | ( | RE_BlendEquation | eq | ) |
Set the blending operator (add, subtract, multiply, etc)
void RV_Render::setBlendFunction | ( | RE_BlendSourceFactor | source_factor, |
RE_BlendDestFactor | dest_factor | ||
) |
Set the blending weights for color and alpha.
void RV_Render::setColorBlendFunction | ( | RE_BlendSourceFactor | source_factor, |
RE_BlendDestFactor | dest_factor | ||
) |
Set the blending weights for color only.
void RV_Render::setColorMask | ( | bool | red, |
bool | green, | ||
bool | blue, | ||
bool | alpha | ||
) |
Set the color channel mask.
void RV_Render::setCullMode | ( | bool | enable, |
bool | back_face = true , |
||
bool | is_ccw = true |
||
) |
Set the primitive culling mode, for backface or frontface culling.
Set the polygon depth bias to reduce z-fighting for overlapping objects.
void RV_Render::setDepthState | ( | bool | enable, |
RE_ZFunction | func = RE_ZLESS , |
||
bool | writing = true , |
||
float | near = 0.0 , |
||
float | far = 1.0 , |
||
bool | clamp = false |
||
) |
Set the depth state for zbuffer operations.
Set the width of line primitives (may not be supported on all platforms)
void RV_Render::setLogicOp | ( | bool | enable, |
RV_LogicOp | = RV_LOGIC_NO_OP |
||
) |
Enable logic operations instead of color, plus the operation (AND,OR,etc)
void RV_Render::setPolygonMode | ( | RV_PolygonMode | mode | ) |
Set the polygon draw mode - FILL (normal), LINES (outline), POINTS (vertices).
|
inline |
Make occlusion query 'q' the active query (only 1 can be active at once)
Definition at line 423 of file RV_Render.h.
void RV_Render::setReverseDepth | ( | bool | reverse | ) |
Convenience method to map near to 1.0 and far to 0.0 so that the depth state will be converted to the correct comparisons (LESS -> GREATER)
void RV_Render::setScissor2DI | ( | bool | enable, |
const UT_DimRect & | rect | ||
) |
Define the scissor (clip) area.
void RV_Render::setShader | ( | RV_ShaderProgramBase * | sh | ) |
Set the current shader to 'sh'.
void RV_Render::setStencilBackOp | ( | RE_SOperation | stencil_fail, |
RE_SOperation | depth_fail, | ||
RE_SOperation | pass, | ||
uint8 | write_mask | ||
) |
Define the stencil operation for backfacing polygons.
void RV_Render::setStencilBackTest | ( | RE_SFunction | func, |
uint8 | ref, | ||
uint8 | compare_mask | ||
) |
Define the stencil test for backfacing polygons.
void RV_Render::setStencilEnable | ( | bool | enable | ) |
Enable stencil buffer rendering. Framebuffer must have a stencil buffer.
void RV_Render::setStencilOp | ( | RE_SOperation | stencil_fail, |
RE_SOperation | depth_fail, | ||
RE_SOperation | pass, | ||
uint8 | write_mask, | ||
bool | set_back = true |
||
) |
Define the stencil operation based on the stencil test result. If 'set_back' is true, also set the same values for backfacing polygons.
void RV_Render::setStencilTest | ( | RE_SFunction | func, |
uint8 | ref, | ||
uint8 | compare_mask, | ||
bool | set_back = true |
||
) |
Define the stencil test.
void RV_Render::setViewport2DI | ( | bool | enable, |
const UT_DimRect & | rect | ||
) |
Define the viewport for rendering.
void RV_Render::unbindSet | ( | const RV_ShaderVariableSet * | set | ) |
Remove a bound variable set by object.
UT_FixedArray<RV_BarrierScope, RV_STAGE_NUM> RV_Render::myActiveBarriers |
Definition at line 588 of file RV_Render.h.
UT_FixedArray<exint, RV_STAGE_NUM> RV_Render::myBarrierGroupID = {} |
Definition at line 591 of file RV_Render.h.
int RV_Render::myFrameExecBarrierCount = 0 |
Definition at line 594 of file RV_Render.h.
int RV_Render::myFrameMemBarrierCount = 0 |
Definition at line 595 of file RV_Render.h.
bool RV_Render::myIsDeferring = false |
Definition at line 349 of file RV_Render.h.
exint RV_Render::myLastASCount = 0 |
Definition at line 599 of file RV_Render.h.
Definition at line 348 of file RV_Render.h.
UT_FixedArray<rv_MemoryBarriers, RV_STAGE_NUM> RV_Render::myWaitingBarriers |
Definition at line 584 of file RV_Render.h.