GregMiscellaneous: zzogl-pg: A few minor changes.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3985 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-10-31 07:10:21 +00:00
parent 28b01737a4
commit 07ecc09711
4 changed files with 44 additions and 24 deletions

View File

@ -88,6 +88,38 @@ struct VertexGPU
{
f = ((s16)(v).f << 7) | 0x7f;
}
void set_xy(s16 x1, s16 y1)
{
x = x1;
y = y1;
}
void set_xyz(s16 x1, s16 y1, u32 z1)
{
x = x1;
y = y1;
z = z1;
}
void set_st(float s1, float t1)
{
s = s1;
t = t1;
}
void set_stq(float s1, float t1, float q1)
{
s = s1;
t = t1;
q = q1;
}
void set_xyzst(s16 x1, s16 y1, u32 z1, float s1, float t1)
{
set_xyz(x1, y1, z1);
set_st(s1, t1);
}
};
extern GSconf conf;

View File

@ -38,9 +38,7 @@ void Prim()
VB& curvb = vb[prim->ctxt];
if (curvb.CheckPrim()) Flush(prim->ctxt);
curvb.curprim._val = prim->_val;
curvb.curprim.prim = prim->prim;
curvb.SetCurrentPrim();
}
// return true if triangle SHOULD be painted.

View File

@ -651,32 +651,16 @@ bool ZZCreate(int _width, int _height)
VertexGPU* pvert = &verts[0];
pvert->x = -0x7fff;
pvert->y = 0x7fff;
pvert->z = 0;
pvert->s = 0;
pvert->t = 0;
pvert->set_xyzst(-0x7fff, 0x7fff, 0, 0, 0);
pvert++;
pvert->x = 0x7fff;
pvert->y = 0x7fff;
pvert->z = 0;
pvert->s = 1;
pvert->t = 0;
pvert->set_xyzst(0x7fff, 0x7fff, 0, 1, 0);
pvert++;
pvert->x = -0x7fff;
pvert->y = -0x7fff;
pvert->z = 0;
pvert->s = 0;
pvert->t = 1;
pvert->set_xyzst(-0x7fff, -0x7fff, 0, 0, 1);
pvert++;
pvert->x = 0x7fff;
pvert->y = -0x7fff;
pvert->z = 0;
pvert->s = 1;
pvert->t = 1;
pvert->set_xyzst(0x7fff, -0x7fff, 0, 1, 1);
pvert++;
glBufferDataARB(GL_ARRAY_BUFFER, 4*sizeof(VertexGPU), &verts[0], GL_STATIC_DRAW);

View File

@ -45,6 +45,12 @@ class VB
return false;
}
void SetCurrentPrim()
{
curprim._val = prim->_val;
curprim.prim = prim->prim;
}
void CheckFrame(int tbp);
// context specific state