Fix a display issue with the wires
This commit is contained in:
parent
8a467bbeae
commit
881d9f44da
4 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue