package com.tk.img.opengl;

import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2;
import com.jogamp.opengl.GLAutoDrawable;

public class GLHLine implements IGLObject
{

	private float x1 = 0;
	private float x2 = 511;
	private float y = 511;

	public void setY(float y) {
		this.y = y;
	}

	@Override
	public void draw(GLAutoDrawable drawable)
	{
		GL2 gl = drawable.getGL().getGL2();
		gl.glBegin(GL.GL_LINES);


		gl.glColor3f(1.0f, 0.51f, 0.98f); // #FF83FA

		gl.glVertex2d(x1, y); // start point
		gl.glVertex2d(x2, y); // end point

		gl.glEnd();
	}

}

@@ -403,16 +403,97 @@
 GL2();%0D%0A
+%0D%0A%09%09//gl.glPointSize(5.0f);%0D%0A%0D%0A%09%09gl.glLineWidth(2.0f); // call before glBegin%0D%0A%0D%0A
 %09%09gl.glB
@@ -514,18 +514,16 @@
 ES);%0D%0A%0D%0A
-%0D%0A
 %09%09gl.glC

add glLineWidth() before glBegin()