ports/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c
Pav Lucistnik 195e1f0a24 Geomorph is a height field generator and editor for the Linux
operating system.

A height field is a kind of topographic map.  It is a 2D projection
of a 3D landscape.

Geomorph generates square images and shows a 3D preview of the
resulting landscape.  The resulting 2D image can be processed with
a tool like Povray for rendering the landscape.

WWW: http://geomorph.sourceforge.net/

PR:		ports/94521
Submitted by:	Dmitry Marakasov <amdmi3@mail.ru>
2006-03-18 17:13:52 +00:00

34 lines
1.2 KiB
C

--- src/hf/gl_preview.c.orig Wed Nov 23 06:44:22 2005
+++ src/hf/gl_preview.c Mon Mar 6 12:59:24 2006
@@ -337,10 +337,10 @@
// printf ("Realize Event\n");
gl_preview_struct *gl_hf;
- gl_hf = ((hf_wrapper_struct *) data)->gl_preview;
GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
+ gl_hf = ((hf_wrapper_struct *) data)->gl_preview;
/*** OpenGL BEGIN ***/
if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
@@ -588,6 +588,8 @@
gint i;
camera_struct *camera;
gl_preview_struct *gl_hf;
+ GdkGLContext *glcontext;
+ GdkGLDrawable *gldrawable;
gl_hf = ((hf_wrapper_struct *) data)->gl_preview;
camera = gl_hf->cameras[gl_hf->current_camera_id];
/* Draw only on the last expose event. */
@@ -600,8 +602,8 @@
// printf("************* GL DRAWING 2 ************** - HFW: %d\n", data);
- GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
+ glcontext = gtk_widget_get_gl_context (widget);
+ gldrawable = gtk_widget_get_gl_drawable (widget);
/*** OpenGL BEGIN ***/
if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))