mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Correct scissor for TexrectDrawer.
This commit is contained in:
parent
00b9de68e0
commit
638e8791fc
|
@ -442,6 +442,7 @@ void OGLRender::TexrectDrawer::add()
|
||||||
m_pBuffer = frameBufferList().getCurrent();
|
m_pBuffer = frameBufferList().getCurrent();
|
||||||
m_otherMode = gDP.otherMode._u64;
|
m_otherMode = gDP.otherMode._u64;
|
||||||
m_Z = (gDP.otherMode.depthSource == G_ZS_PRIM) ? gDP.primDepth.z : gSP.viewport.nearz;
|
m_Z = (gDP.otherMode.depthSource == G_ZS_PRIM) ? gDP.primDepth.z : gSP.viewport.nearz;
|
||||||
|
m_scissor = gDP.scissor;
|
||||||
|
|
||||||
m_ulx = pRect[0].x;
|
m_ulx = pRect[0].x;
|
||||||
m_uly = pRect[0].y;
|
m_uly = pRect[0].y;
|
||||||
|
@ -481,6 +482,8 @@ bool OGLRender::TexrectDrawer::draw()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const u64 otherMode = gDP.otherMode._u64;
|
const u64 otherMode = gDP.otherMode._u64;
|
||||||
|
const gDPScissor scissor = gDP.scissor;
|
||||||
|
gDP.scissor = m_scissor;
|
||||||
gDP.otherMode._u64 = m_otherMode;
|
gDP.otherMode._u64 = m_otherMode;
|
||||||
OGLVideo & ogl = video();
|
OGLVideo & ogl = video();
|
||||||
OGLRender & render = ogl.getRender();
|
OGLRender & render = ogl.getRender();
|
||||||
|
@ -583,6 +586,7 @@ bool OGLRender::TexrectDrawer::draw()
|
||||||
|
|
||||||
m_numRects = 0;
|
m_numRects = 0;
|
||||||
gDP.otherMode._u64 = otherMode;
|
gDP.otherMode._u64 = otherMode;
|
||||||
|
gDP.scissor = scissor;
|
||||||
gDP.changed |= CHANGED_COMBINE | CHANGED_SCISSOR | CHANGED_RENDERMODE;
|
gDP.changed |= CHANGED_COMBINE | CHANGED_SCISSOR | CHANGED_RENDERMODE;
|
||||||
textureCache().activateTexture(0, pCurTex0);
|
textureCache().activateTexture(0, pCurTex0);
|
||||||
CombinerInfo::get().update();
|
CombinerInfo::get().update();
|
||||||
|
|
|
@ -217,6 +217,7 @@ private:
|
||||||
GLint m_enableAlphaTestLoc;
|
GLint m_enableAlphaTestLoc;
|
||||||
GLint m_textureFilterModeLoc;
|
GLint m_textureFilterModeLoc;
|
||||||
GLint m_textureBoundsLoc;
|
GLint m_textureBoundsLoc;
|
||||||
|
gDPScissor m_scissor;
|
||||||
CachedTexture * m_pTexture;
|
CachedTexture * m_pTexture;
|
||||||
FrameBuffer * m_pBuffer;
|
FrameBuffer * m_pBuffer;
|
||||||
};
|
};
|
||||||
|
|
12
src/gDP.h
12
src/gDP.h
|
@ -108,6 +108,12 @@ struct gDPLoadTileInfo {
|
||||||
u32 dxt;
|
u32 dxt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct gDPScissor
|
||||||
|
{
|
||||||
|
u32 mode;
|
||||||
|
f32 ulx, uly, lrx, lry;
|
||||||
|
};
|
||||||
|
|
||||||
struct gDPInfo
|
struct gDPInfo
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
@ -218,11 +224,7 @@ struct gDPInfo
|
||||||
|
|
||||||
u32 depthImageAddress;
|
u32 depthImageAddress;
|
||||||
|
|
||||||
struct
|
gDPScissor scissor;
|
||||||
{
|
|
||||||
u32 mode;
|
|
||||||
f32 ulx, uly, lrx, lry;
|
|
||||||
} scissor;
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user