mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Add an offset field that we'll need later
This commit is contained in:
parent
92ffef2626
commit
1c49d5718c
@ -718,6 +718,7 @@ void DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
|
||||
di.cullMode = cullMode;
|
||||
di.vertexCount = vertexCount;
|
||||
di.vertDecodeIndex = numDrawVerts_;
|
||||
di.offset = 0;
|
||||
|
||||
_dbg_assert_(numDrawVerts_ <= MAX_DEFERRED_DRAW_VERTS);
|
||||
_dbg_assert_(numDrawInds_ <= MAX_DEFERRED_DRAW_INDS);
|
||||
@ -782,7 +783,7 @@ void DrawEngineCommon::DecodeInds() {
|
||||
for (; i < numDrawInds_; i++) {
|
||||
const DeferredInds &di = drawInds_[i];
|
||||
|
||||
int indexOffset = drawVertexOffsets_[di.vertDecodeIndex];
|
||||
int indexOffset = drawVertexOffsets_[di.vertDecodeIndex] + di.offset;
|
||||
bool clockwise = true;
|
||||
if (gstate.isCullEnabled() && gstate.getCullMode() != di.cullMode) {
|
||||
clockwise = false;
|
||||
|
@ -228,6 +228,7 @@ protected:
|
||||
u8 indexType;
|
||||
s8 prim;
|
||||
u8 cullMode;
|
||||
u16 offset;
|
||||
};
|
||||
|
||||
enum { MAX_DEFERRED_DRAW_VERTS = 128 }; // If you change this to more than 256, change type of DeferredInds::vertDecodeIndex.
|
||||
|
Loading…
x
Reference in New Issue
Block a user