mirror of
https://github.com/aap/librw.git
synced 2025-12-19 17:09:51 +00:00
stencil clear
This commit is contained in:
@@ -1206,6 +1206,8 @@ clearCamera(Camera *cam, RGBA *col, uint32 mode)
|
||||
mask |= GL_COLOR_BUFFER_BIT;
|
||||
if(mode & Camera::CLEARZ)
|
||||
mask |= GL_DEPTH_BUFFER_BIT;
|
||||
if(mode & Camera::CLEARSTENCIL)
|
||||
mask |= GL_STENCIL_BUFFER_BIT;
|
||||
glDepthMask(GL_TRUE);
|
||||
glClear(mask);
|
||||
glDepthMask(rwStateCache.zwrite);
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "rwgl3impl.h"
|
||||
|
||||
int renderpassfudge = 2;
|
||||
|
||||
namespace rw {
|
||||
namespace gl3 {
|
||||
|
||||
@@ -65,6 +67,8 @@ drawInst_GSemu(InstanceDataHeader *header, InstanceData *inst)
|
||||
void
|
||||
drawInst(InstanceDataHeader *header, InstanceData *inst)
|
||||
{
|
||||
if(getAlphaBlend() == renderpassfudge)
|
||||
return;
|
||||
if(rw::GetRenderState(rw::GSALPHATEST))
|
||||
drawInst_GSemu(header, inst);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user