How to draw using opengl after renderworld?

BlitzMax Forums/MiniB3D Module/How to draw using opengl after renderworld?

Sanctus(Posted 2007) [#1]
Hi I'm trying to draw something after using the renderworld using opengl and nothing is shown....
Function RenderGrid(l:Byte,s:Int)
	glColor3f(0.5,0.5,0.5)
	glBegin(GL_TRIANGLE_STRIP)
	
	
	For Local i:Int = -l/2 To l/2
		glVertex2f(i,-1)
		glVertex2f(i,1)
		
		glVertex2f(-1,l)
		glVertex2f(1,l)
	
	Next
	glEnd()
End Function

here is the function that I call after RenderWorld()
somehow nothing shows up.. :(
Can someone help me?


LAB[au](Posted 2007) [#2]
You Flip after all that? (not right after renderworld!)


Sanctus(Posted 2007) [#3]
RenderWorld()
rendergrid(4,3)
Flip

This is how my code looks so I guess its ok.
But still the grid refuzes to show up.


klepto2(Posted 2007) [#4]
Try it this way:
RenderWorld()
Camera.Update()
renderGrid(4,3)
Flip


This will restore the Marices after the renderworld command.
I dont know if this is working but this could be the reason.


Sanctus(Posted 2007) [#5]
Uhuuu 10X man ;)