Demo-1   <<--BACK            HOME            UP --^           NEXT-->>  Demo-3
side4linux, a simple integrated development environment!
 

GNOMECGL Demo-2  Load, Re-Compile and Run the 'Bdesign3d' project's visuals, an OpenGL 3D Project.

Purpose: 
Requirements:

Exercise-1: Load basic Project and re-compile it.
  1. Open 'side4linux' and click on 'Project>Open Project' in the Main Menue.
  2. Select 'DEMOS>SIDEdemos>GNOMECGL>Bdesign3d>bdesign3d.prf' as in figure-1 below and click on 'Open' in the Dialog Box.
  3. Re-Build the Project to ensure that it links with your installation's dynamic libraries.
  4. 'Build>Autogen Project'
  5. 'Build>Make Clean'
  6. Notice the 'Build Status Window' ( third from left at the bottom of the screen ) says 'Pbuild: OK!'.  If not check the 'Output Window' for errors like missing library.
  7. Now open the Glade-3 GUI builder program, 'Edit Project>Edit Project Visuals with Glade-3'
  8. ( un-dock the windows and shrink the Main window to about one third screen size )
  9. Click on the 'mainWindow' widget in the 'Inspector' window and open down to 'hbox2' ( figure-2 ).
  10. Double click on  'mainWindow' in the 'Inspector' window to make it appear in the 'Glade-3 Main window' ( figure-3 ).
  11. Notice the highlighted 'hatched area' in the middle of the 'mainWindow' widget, in 'main.c' there will be inserted here a 'glarea' Widget ( line 100 ).
  12. Now close the Glade-3 GUI Builder program.
  13. Click on 'Open-TXT' and open 'main.c'.
  14. Notice in line 99 ,     glareaContainer = glade_xml_get_widget(gladeXML,"hbox2"); // gets us the pointer to 'hbox2'.
  15. Notice in line 100 ,   gtk_container_add(GTK_CONTAINER(glareaContainer),GTK_WIDGET(glarea));
  16. This is our 'glarea' widget where we can render OpenGL images using OpenGL commands.
  17. Notice in line 100 ,   GLarea_Init3d(glarea); // comment this out if you need 2d
  18. This is different to the template as the auto-generated template is setup for 2D.

Fig-1

Fig-2

Fig-3

Exercise-2: Run the Project and Discover other features.
  1. Change to another workspace and open a terminal program in 'SIDE/DEMOS/SIDEdemos/GNOMECGL/Bdesign3d/src'.
  2. We will 'run' the Program 'bdesign3d' in a terminal.
  3. and run the program ( ./bdesign3d ) notice the full stop and forward slash to run a program in the current directory to get the following messages ( or similar ),
  4. then click on the 'ReDraw' Tool button in the program to create a 3D wire-frame cube. Try some of the other Tool butons to rotate/rescale/clear etc.
db@wks1:~/Data/Projects/SIDE/DEMOS/SIDEdemos/GNOMECGL/Sample1/src$ ./bdesign3d

Trying local 'glade' file
Local 'glade' file found!
gdk_gl_choose_visual() visual depth = 24
Mesa: CPU vendor: GenuineIntel
Mesa: MMX cpu detected.
Mesa: SSE cpu detected.
Mesa: Not testing OS support for SSE, leaving enabled.
Mesa: Mesa 7.0.2 DEBUG build Jan 12 2008 13:36:46

Opening 'Bdesgin3d' number of arguements = 1

 opening string is './bdesign3d' ''
OpenGL supported



Fig-4


We will provide other demos as 'side4linux' develops to cover GNOME visual programming and integration into a real world machine controller.

GUI interface made with Gtk and Glade GUI demo built with Glade