Fix a display issue with the wires

This commit is contained in:
Aaron Mueller 2011-12-07 21:42:42 +01:00 committed by Kai Lauterbach
parent 37608b6b24
commit b92b8953a6
4 changed files with 9 additions and 3 deletions

View file

@ -92,8 +92,8 @@ void display() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
setScene();
drawLEDs(RENDER_MODE);
drawWires();
drawLEDs(RENDER_MODE);
}
// Picking function

View file

@ -16,7 +16,7 @@ gboolean on_drawing_area_configure_event(GtkWidget *widget, GdkEventConfigure *e
if (!gdk_gl_drawable_gl_begin(glDrawable, glContext)) return FALSE;
setScene();
gdk_gl_drawable_gl_end(glDrawable);
return FALSE;
}
@ -45,3 +45,8 @@ void on_drawing_area_realize(GtkWidget *widget, gpointer data) {
gdk_gl_drawable_gl_end(glDrawable);
}
void on_drawing_area_key_press_event(GtkWidget *widget, gpointer data) {
g_print("pressed");
}

View file

@ -73,7 +73,7 @@ int main(int argc, char *argv[]) {
drawingArea = glade_xml_get_widget(xml, "drawing_area");
gtk_widget_set_gl_capability(drawingArea, glConfig, NULL, TRUE, GDK_GL_RGBA_TYPE);
gtk_widget_show(window);
gtk_main();

View file

@ -101,6 +101,7 @@
<property name="height_request">500</property>
<property name="visible">True</property>
<signal name="expose_event" handler="on_drawing_area_expose_event"/>
<signal name="key_press_event" handler="on_drawing_area_key_press_event"/>
<signal name="realize" handler="on_drawing_area_realize" after="yes"/>
<signal name="configure_event" handler="on_drawing_area_configure_event" after="yes"/>
</widget>