[fluxus] (no subject)

nik at fo.am nik at fo.am
Fri Dec 9 14:15:17 PST 2005


hi dave,

here is a small change, which makes the ortho projection a bit more in
scale with the perspective projection (also makes the editor pane more
visible). the coordinates could do with some tweaking if yr not too keen
on the square aspect ratio :)

bzp,
  nik


Index: libfluxus/src/Renderer.cpp
===================================================================
RCS file: /cvsroot/fluxus/fluxus/libfluxus/src/Renderer.cpp,v
retrieving revision 1.12
diff -u -r1.12 Renderer.cpp
--- libfluxus/src/Renderer.cpp	22 Nov 2005 23:56:59 -0000	1.12
+++ libfluxus/src/Renderer.cpp	9 Dec 2005 22:06:42 -0000
@@ -53,6 +53,10 @@
 m_Right(0.75),
 m_Front(1),
 m_Back(10000),
+m_OrthUp(-5.5),
+m_OrthDown(5.5),
+m_OrthLeft(-5.5),
+m_OrthRight(5.5),
 m_BackFaceCull(true),
 m_FaceOrderClockwise(false),
 m_FogDensity(0),
@@ -112,7 +116,7 @@
 						m_SelectInfo.size,m_SelectInfo.size,viewport);
 		}

-  		if (m_Ortho) glOrtho(m_Up,m_Down,m_Left,m_Right,m_Front,m_Back);
+  		if (m_Ortho)
glOrtho(m_OrthUp,m_OrthDown,m_OrthLeft,m_OrthRight,m_Front,m_Back);
   		else glFrustum(m_Up,m_Down,m_Left,m_Right,m_Front,m_Back);

     	glEnable(GL_BLEND);
Index: libfluxus/src/Renderer.h
===================================================================
RCS file: /cvsroot/fluxus/fluxus/libfluxus/src/Renderer.h,v
retrieving revision 1.9
diff -u -r1.9 Renderer.h
--- libfluxus/src/Renderer.h	9 Nov 2005 00:33:22 -0000	1.9
+++ libfluxus/src/Renderer.h	9 Dec 2005 22:06:42 -0000
@@ -154,6 +154,7 @@
 	bool m_ClearZBuffer;
 	bool m_DepthTest;
 	float m_Up,m_Down,m_Left,m_Right,m_Front,m_Back;
+	float m_OrthUp,m_OrthDown,m_OrthLeft,m_OrthRight;
 	bool m_BackFaceCull;
 	bool m_FaceOrderClockwise;
 	dColour m_FogColour;






More information about the Fluxus mailing list