mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-25 00:35:34 +00:00
Use vertex arrays for drawing points in addition to lines
This commit is contained in:
parent
8fc4fdf10b
commit
20f5167d27
|
@ -1048,15 +1048,17 @@ GL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points,
|
||||||
int count)
|
int count)
|
||||||
{
|
{
|
||||||
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
|
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
|
||||||
int i;
|
|
||||||
|
|
||||||
GL_SetDrawingState(renderer);
|
GL_SetDrawingState(renderer);
|
||||||
|
|
||||||
data->glBegin(GL_POINTS);
|
data->glTranslatef(0.5f, 0.5f, 0.0f);
|
||||||
for (i = 0; i < count; ++i) {
|
data->glVertexPointer(2, GL_FLOAT, 0, points);
|
||||||
data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y);
|
data->glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
}
|
|
||||||
data->glEnd();
|
data->glDrawArrays(GL_POINTS, 0, count);
|
||||||
|
|
||||||
|
data->glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
data->glTranslatef(-0.5f, -0.5f, 0.0f);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue