Exemplo n.º 1
0
void
Canvas::DrawHLine(int x1, int x2, int y, Color color)
{
  color.Set();

  const GLvalue v[] = { GLvalue(x1), GLvalue(y), GLvalue(x2), GLvalue(y) };
  glVertexPointer(2, GL_VALUE, 0, v);
  glDrawArrays(GL_LINE_STRIP, 0, 2);
}
Exemplo n.º 2
0
void
Canvas::DrawLine(int ax, int ay, int bx, int by)
{
  pen.Bind();

  const GLvalue v[] = { GLvalue(ax), GLvalue(ay), GLvalue(bx), GLvalue(by) };
  glVertexPointer(2, GL_VALUE, 0, v);
  glDrawArrays(GL_LINE_STRIP, 0, 2);

  pen.Unbind();
}
Exemplo n.º 3
0
void
Canvas::DrawHLine(int x1, int x2, int y, Color color)
{
  color.Set();

  const RasterPoint v[] = {
    { GLvalue(x1), GLvalue(y) },
    { GLvalue(x2), GLvalue(y) },
  };

  const ScopeVertexPointer vp(v);
  glDrawArrays(GL_LINE_STRIP, 0, ARRAY_SIZE(v));
}
Exemplo n.º 4
0
void
Canvas::DrawLine(int ax, int ay, int bx, int by)
{
#ifdef USE_GLSL
  OpenGL::solid_shader->Use();
#endif

  pen.Bind();

  const RasterPoint v[] = {
    { GLvalue(ax), GLvalue(ay) },
    { GLvalue(bx), GLvalue(by) },
  };

  const ScopeVertexPointer vp(v);
  glDrawArrays(GL_LINE_STRIP, 0, ARRAY_SIZE(v));

  pen.Unbind();
}