GlEnable GL_LINE_SMOOTH

BlitzMax Forums/BlitzMax Beginners Area/GlEnable GL_LINE_SMOOTH

Diornda,

Here is the code I use to get The antialiased line. Great thing about MAX is that you can "mix-and-match"
Global Width:Int=800
Global Height:Int=600
Global Depth:Int=32



Graphics 800,600,32,0


HideMouse
While Not KeyHit( KEY_ESCAPE )
	glColor3f(1.0,1.0,1.0)
	glLineWidth 1
	GlEnable GL_LINE_SMOOTH
	GlEnable GL_BLEND
	glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
	glHint GL_LINE_SMOOTH_HINT, GL_NICEST
	DrawLine(0,0,200,500)

	Framecounter_counter=Framecounter_counter+1
	If Framecounter_time=0 Then Framecounter_time=MilliSecs()
	If Framecounter_time+1001 <MilliSecs() Then
		Framecounter_framerate=Framecounter_counter
		Framecounter_counter=0
		Framecounter_time=MilliSecs()
	EndIf
	glColor3f(1.0,1.0,1.0)
	bglDrawText("FPS : "+Framecounter_framerate,800-(8*12),600-16-8)
	FlushMem
	Flip()
	Cls()


Wend
End