Split the screen in two, and call frame_core_depth for each eyes

Property definitions

gamnit :: stereoscopic_view $ App :: frame_core_stereoscopic
	# Split the screen in two, and call `frame_core_depth` for each eyes
	protected fun frame_core_stereoscopic(display: GamnitDisplay)
	do
		var half_width = display.width / 2

		# Left eye
		glViewport(0, 0, half_width, display.height)
		world_camera.mvp_matrix = world_camera.mvp_matrix_left
		frame_core_depth display

		# Right eye
		glViewport(half_width, 0, half_width, display.height)
		world_camera.mvp_matrix = world_camera.mvp_matrix_right
		frame_core_depth display

		# We reset the viewport for selection
		glViewport(0, 0, display.width, display.height)

		# Check for errors
		var gl_error = glGetError
		assert gl_error == gl_NO_ERROR else print gl_error
	end
lib/gamnit/depth/stereoscopic_view.nit:66,2--87,4