mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
SoftGPU: Fix texture vertex preview in debugger.
This commit is contained in:
parent
262c3483cf
commit
94c138fd83
1 changed files with 7 additions and 3 deletions
|
@ -536,15 +536,15 @@ bool TransformUnit::GetCurrentSimpleVertices(int count, std::vector<GPUDebugVert
|
|||
DrawingCoords drawPos = ScreenToDrawing(screenPos);
|
||||
|
||||
if (gstate.vertType & GE_VTYPE_TC_MASK) {
|
||||
vertices[i].u = vert.uv[0];
|
||||
vertices[i].v = vert.uv[1];
|
||||
vertices[i].u = vert.uv[0] * (float)gstate.getTextureWidth(0);
|
||||
vertices[i].v = vert.uv[1] * (float)gstate.getTextureHeight(0);
|
||||
} else {
|
||||
vertices[i].u = 0.0f;
|
||||
vertices[i].v = 0.0f;
|
||||
}
|
||||
vertices[i].x = drawPos.x;
|
||||
vertices[i].y = drawPos.y;
|
||||
vertices[i].z = 1.0;
|
||||
vertices[i].z = drawPos.z;
|
||||
if (gstate.vertType & GE_VTYPE_COL_MASK) {
|
||||
memcpy(vertices[i].c, vert.color, sizeof(vertices[i].c));
|
||||
} else {
|
||||
|
@ -553,5 +553,9 @@ bool TransformUnit::GetCurrentSimpleVertices(int count, std::vector<GPUDebugVert
|
|||
}
|
||||
}
|
||||
|
||||
// The GE debugger expects these to be set.
|
||||
gstate_c.curTextureWidth = gstate.getTextureWidth(0);
|
||||
gstate_c.curTextureHeight = gstate.getTextureHeight(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue