Left Handed - Right handed Coordinate systems

Miscellaneous Forums/General Discussion/Left Handed - Right handed Coordinate systems

I had this problem with the render 2 texture module the y-axis was always flipped in OpenGL.

Here is my solution which is part of the module, maybe it will help?:
Function ViewportSet(X:Int=0,Y:Int=0,Width:Int=640,Height:Int=480,FlipY:Byte=False)
	?Win32
		If DX
			TD3D7Max2DDriver(_max2dDriver).viewport.dwX=x
			TD3D7Max2DDriver(_max2dDriver).viewport.dwY=y
			TD3D7Max2DDriver(_max2dDriver).viewport.dwWidth=width
			TD3D7Max2DDriver(_max2dDriver).viewport.dwHeight=height
			PrimaryDevice.device.SetViewport(TD3D7Max2DDriver(_max2dDriver).viewport)
		Else
	?
			If FlipY
				glViewport(X, Y, Width, Height)
				glMatrixMode(GL_PROJECTION)
				glPushMatrix()
				glLoadIdentity()
				gluOrtho2D(X, GraphicsWidth(), GraphicsHeight(),Y)
				glScalef(1, -1, 1)
				glTranslatef(0, -GraphicsHeight(), 0)
				glMatrixMode(GL_MODELVIEW)
			Else
				glViewport(X, Y, Width, Height)
				glMatrixMode(GL_PROJECTION)
				glLoadIdentity()
				glOrtho(X, GraphicsWidth(), GraphicsHeight(), Y, -1, 1)
				glMatrixMode(GL_MODELVIEW)
				glLoadIdentity()
			EndIf
	?Win32
		EndIf
	?
	'	Print "tRender : ViewportSet OK"
		Return True
	EndFunction