PKG_CHECK_MODULES([bin_familia], [gtk+-3.0 libxml-2.0 gmodule-2.0 gtkglext-3.0])
+AX_CHECK_GL
+AS_IF([test X$no_gl = Xyes],
+ [AC_MSG_FAILURE([OpenGL is required.])])
+AX_CHECK_GLU
+AM_CONDITIONAL([GLU],[test "$no_glu" != yes])
+
+
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
#include "../debug.h"
#include "drawing_area.h"
+#include "../graphics/individual.h"
/**
* The "draw" signal handler. All the OpenGL re-drawing should
return FALSE;
}
-// glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix ();
glLoadIdentity ();
+ glTranslatef(0, 0, -10);
glColor3f (1.0, 1.0, 1.0);
- glBegin(GL_TRIANGLES);
- glVertex3f( 0.0f, 1.0f, 0.0f); // Top
- glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
- glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
- glEnd();
+ graphics_render_individual();
glPopMatrix ();
gtk_widget_end_gl (widget, TRUE);
w = allocation.width;
h = allocation.height;
+ aspect = w / h;
/*** OpenGL BEGIN ***/
if (!gtk_widget_begin_gl (widget))
return FALSE;
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
-
-// if (w > h) {
- aspect = w / h;
-// glFrustum (-aspect, aspect, -1.0, 1.0, 5.0, 60.0);
-// }
-// else {
-// aspect = h / w;
- glFrustum (-1.0, 1.0, -aspect, aspect, 5.0, 60.0);
-// }
-
- glMatrixMode (GL_MODELVIEW);
+ gluPerspective (60.0, aspect, 1.0, 60.0);
+ glMatrixMode(GL_MODELVIEW);
gtk_widget_end_gl (widget, FALSE);
/*** OpenGL END ***/