gtkglarea r92 - trunk/examples



Author: samh
Date: Thu Mar  6 19:11:02 2008
New Revision: 92
URL: http://svn.gnome.org/viewvc/gtkglarea?rev=92&view=rev

Log:
  * Add a small message to warn the user that even if they see the texture,
    fragment shaders are only working properly if it is coloured.


Modified:
   trunk/examples/shaders.c

Modified: trunk/examples/shaders.c
==============================================================================
--- trunk/examples/shaders.c	(original)
+++ trunk/examples/shaders.c	Thu Mar  6 19:11:02 2008
@@ -392,6 +392,7 @@
 
   GtkWidget* window;
   GtkWidget* button_quit;
+  GtkWidget* message;
   GtkWidget* box_main;
   GtkWidget* glarea;
 
@@ -405,6 +406,12 @@
 
   glarea = create_glarea ();
 
+  /* Information message */
+
+  message = gtk_label_new ("If the above drawing consists only of\n"
+                           "shades of grey, your hardware or your\n"
+                           "drivers do not support fragment shaders.");
+
   /* Quit button */
 
   button_quit = gtk_button_new_with_label ("Quit");
@@ -436,11 +443,13 @@
   /* it, it's contents are already there. Otherwise they    */
   /* might see each widget come up.                         */
 
-  gtk_box_pack_start (GTK_BOX(box_main), glarea,      FALSE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX(box_main), glarea,      TRUE,  TRUE, 0);
+  gtk_box_pack_start (GTK_BOX(box_main), message,     FALSE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX(box_main), button_quit, FALSE, TRUE, 0);
   gtk_container_add (GTK_CONTAINER(window), box_main);
 
   gtk_widget_show (glarea);
+  gtk_widget_show (message);
   gtk_widget_show (button_quit);
   gtk_widget_show (box_main);
   gtk_widget_show (window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]