mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
- fixed untextured vertex order and removed some test code.
This commit is contained in:
parent
a253b15334
commit
fa6ba84094
3 changed files with 4 additions and 4 deletions
|
@ -479,7 +479,7 @@ public:
|
|||
glVertexAttribPointer(VATTR_COLOR, 4, GL_UNSIGNED_BYTE, true, sizeof(F2DDrawer::TwoDVertex), &TDiO->color0);
|
||||
glEnableVertexAttribArray(VATTR_VERTEX);
|
||||
glEnableVertexAttribArray(VATTR_TEXCOORD);
|
||||
//glEnableVertexAttribArray(VATTR_COLOR);
|
||||
glEnableVertexAttribArray(VATTR_COLOR);
|
||||
glDisableVertexAttribArray(VATTR_VERTEX2);
|
||||
glDisableVertexAttribArray(VATTR_NORMAL);
|
||||
}
|
||||
|
@ -504,7 +504,6 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
|
|||
{
|
||||
// Change from BGRA to RGBA
|
||||
std::swap(v.color0.r, v.color0.b);
|
||||
v.color0 = 0xffffffff;
|
||||
}
|
||||
auto vb = new F2DVertexBuffer;
|
||||
vb->UploadData(&vertices[0], vertices.Size(), &indices[0], indices.Size());
|
||||
|
@ -604,5 +603,7 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
|
|||
glDisable(GL_SCISSOR_TEST);
|
||||
gl_RenderState.SetVertexBuffer(nullptr);
|
||||
gl_RenderState.EnableTexture(true);
|
||||
gl_RenderState.SetTextureMode(TM_MODULATE);
|
||||
gl_RenderState.ResetColor();
|
||||
delete vb;
|
||||
}
|
|
@ -243,7 +243,6 @@ bool FRenderState::ApplyShader()
|
|||
}
|
||||
else if (mColormapState == CM_SPECIAL2D)
|
||||
{
|
||||
activeShader->muFixedColormap.Set(2);
|
||||
activeShader->muFixedColormap.Set(1);
|
||||
float startr = mObjectColor.r / 255;
|
||||
float startg = mObjectColor.g / 255;
|
||||
|
|
|
@ -455,8 +455,8 @@ void F2DDrawer::AddColorOnlyQuad(int x1, int y1, int w, int h, PalEntry color)
|
|||
auto ptr = &mVertices[dg.mVertIndex];
|
||||
ptr->Set(x1, y1, 0, 0, 0, color); ptr++;
|
||||
ptr->Set(x1, y1 + h, 0, 0, 0, color); ptr++;
|
||||
ptr->Set(x1 + w, y1 + h, 0, 0, 0, color); ptr++;
|
||||
ptr->Set(x1 + w, y1, 0, 0, 0, color); ptr++;
|
||||
ptr->Set(x1 + w, y1 + h, 0, 0, 0, color); ptr++;
|
||||
AddIndices(dg.mVertIndex, 6, 0, 1, 2, 1, 3, 2);
|
||||
AddCommand(&dg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue