Comparing walktest between NR and OR:
	- Fog is missing.
	- Halos are missing.
	- Lens-flare is missing.
	- Snow is missing. (Fixed)
	- 2D sprites (bird, CS logo, ...) are missing. (Fixed)
	- The torus in the street is missing (bezier mesh needs porting).
	- Procedural textures are not working (rotating cube is black) (Fixed)
	- Frame based interpolation for spr3d doesn't appear to be working.
	  In OR the animation of the pulsating box is smooth. In NR it
	  is choppy. Frame based interpolation should take care of the smooth
	  animation. In OR this is done by giving two vertex arrays to the
	  renderer in G3DTriangleMesh. Does the NR not support this yet? (Fixed)
	- Mixmode of fountain is wrong. Seems to use COPY instead of ADD.
	  (Fixed)
	- The rotating door is full bright in NR and dark in OR (in OR it
	  is actually too dark but in NR it is too bright).
	- The start room of flarge has a multi-layered texture. We need
	  to implement the equivalent functionality in NR.
	- The spiked sprite in the main hall is green in OR and white in NR.
	- The semi-transparent window left of the rotating door doesn't
	  seem to be transparent with NR. (Fixed)
	- The NR still has portal clipping portals in some situations.
	- The space warping portal in the dungeon that goes back to the main
	  hall is simply black with NR.
	- partsys level: hazes are missing.

Things that need to be done in new renderer:

	- iThingState->ReplaceMaterial() will not work in NR.
	- Support static LOD. This is a special case of a hierarchical mesh
	  where only one of the children is drawn based on distance
	  related conditions.
	- Make csShader a csObject so it can be supported in regions.
	  Also add iRegion->PrepareShaders().
	- Meshes remaining to be ported:
		- spr2d (and the particle systems)
		- haze
		- beziermesh
		- lightning
		- terrfunc (disabled from jam build!)
		- terrbig (disabled from jam build!)
		- bcterr
		- sprcal3d
		- stars
	- Software renderer (partially done).
	- Working loaders for all new features (partially done).
	- Fog (can/should be implemented through shaders).
	- Portals.
		- Basic portals, DONE
		- Z-filling not done
		- Floating portals not done
	- Debug lines and everything related to debugging support in g3d.
	- Correct usage of cullers - DONE.
	- Isometric engine.
	- Shadows (needs fixing).
	- Variable system DONE
	- Materials DONE
	- Pseudo VP with similar functionality as old texture layers.
	- Fix smoothed things. 
	- Better error handling. Everything is too crashy.
	- Fix lightmapped things to use an appropriate shader so that it
	  doesn't get very slow in case only two TU's are available.
	  (Actually, it doesn't cause a slowdown. Tho might still be nice to
	   have appropriate shaders nevertheless)


What happens in one frame using the new renderer (assuming the generic
render loop) in pseudo-code:

	csView->Draw():
	  csEngine->Draw (camera, clipper)
	    // Engine immediatelly passes control to the default render
	    // loop.
	    defaultRenderLoop(=csRenderLoop)->Draw (camera, clipper)
	      csEngine->ControlMeshes ()

	      create rview
	      StartDraw (camera, clipper, rview)
	      	initialize rview

	      csGraphics3D->SetClipper(clipper)
	      csGraphics3D->ResetNearPlane()

	      // Prepare to draw the current sector.
	      camsec = camera->GetSector ()
	      csSector(camsec)->PrepareDraw (rview)
	        GetVisibilityCuller()
		sector callbacks

	      // Perform all steps in this renderloop. The default renderloop
	      // has two steps.
	      // First step is for rendering the base meshes.
	      STEP1: csGenericRenderStep(ambient,ZUSE,Zoff=true)->Perform (rview, camsec)

	        // Visibility culling.
	        VisTest(rview, callback)
		  for each visible mesh:
		    callback.ObjectVisible(mesh)
		      if mesh->DrawTest(rview, movable) fails return
		      // Mesh is visible, add all render meshes to the
		      // callback structure.
		      meshList.AddRenderMeshes (mesh->GetRenderMeshes(), mesh->GetRenderPriority ())

		// Sort on render priority (shouldn't this sort on shader
		// too?)
		sorted_rmeshes = callback.meshList.GetSortedMeshList()
		foreach set of rmesh with same shader:
		  // Render all render meshes with same shader together.
		  RenderMeshes(g3d, shader, sameShaderMeshes)
		    get best shader technique from shader
		    foreach pass in technique:
		      pass->Activate(0)
		      foreach rmesh from sameShaderMeshes:
			shader->SelectMaterial (rmesh->GetMaterial())
			pass->SetupState (rmesh)
			set mixmode
			g3d->DrawMesh (rmesh)
			pass->ResetState()
		      pass->Deactivate()

	      // Second step is for lighting without shadows.
	      STEP2: csLightIterRenderStep()->Perform (rview, camsec)
		foreach light in camsec:
		  if rview->TestBSphere()
	            csGenericRenderStep(diffuse,ZTEST,Zoff=false)->Perform(rview, camsec, light)
		      // Same procedure as above, note: this calls VisTest()
		      // again which is very expensive!!!
		      ...

	      csGraphics3D->SetClipper(0)

