1 package org.newdawn.slick.opengl.renderer;
2
3
4
5
6
7
8
9 public class DefaultLineStripRenderer implements LineStripRenderer {
10
11 private final SGL GL = Renderer.get();
12
13
14
15
16 public void end() {
17 GL.glEnd();
18 }
19
20
21
22
23 public void setAntiAlias(boolean antialias) {
24 if (antialias) {
25 GL.glEnable(SGL.GL_LINE_SMOOTH);
26 } else {
27 GL.glDisable(SGL.GL_LINE_SMOOTH);
28 }
29 }
30
31
32
33
34 public void setWidth(float width) {
35 GL.glLineWidth(width);
36 }
37
38
39
40
41 public void start() {
42 GL.glBegin(SGL.GL_LINE_STRIP);
43 }
44
45
46
47
48 public void vertex(float x, float y) {
49 GL.glVertex2f(x,y);
50 }
51
52
53
54
55 public void color(float r, float g, float b, float a) {
56 GL.glColor4f(r, g, b, a);
57 }
58
59
60
61
62 public void setLineCaps(boolean caps) {
63 }
64
65
66
67
68 public boolean applyGLLineFixes() {
69 return true;
70 }
71
72 }