# HG changeset patch # User David Bryant # Date 1282805093 -34200 # Node ID 85589f7a3a280ef5d2d00c53174c23b590cb086c # Parent deb9d9fae854b76552bedfc8d2d69caf897e0434 Changed the builder to ignore all directories named "nobuild". Removed gl example. diff -r deb9d9fae854 -r 85589f7a3a28 builder.d --- a/builder.d Thu Aug 26 16:08:21 2010 +0930 +++ b/builder.d Thu Aug 26 16:14:53 2010 +0930 @@ -81,6 +81,8 @@ // * Everything depends on the parents and descendants of its explicit imports, // up to but not including the common ancestor, transitively. // +// Directories beginning with '.' or named "nobuild" are ignored. +// // TODO - add doc, data @@ -964,7 +966,7 @@ // load local products // foreach (string name; listdir(path)) { - if (name[0] != '.') { + if (name[0] != '.' && name != "nobuild") { string p = join(path, name); if (isdir(p)) { foreach (node; mChildren) { diff -r deb9d9fae854 -r 85589f7a3a28 doodle/main/prog/gl_example.d --- a/doodle/main/prog/gl_example.d Thu Aug 26 16:08:21 2010 +0930 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -// File stolen from Gtkd - -module main.prog.gl_example; - -private import gtk.DrawingArea; -private import glgtk.GLCapability; -private import glgdk.GLDrawable; -private import glgdk.GLConfig; -private import glgdk.GLContext; -private import gtkglc.glgdktypes; - -private import gtkglc.gl; -private import gtkglc.glu; - -private import gdk.Event; - -private import gtk.Widget; - -private import gtk.Main; -private import gtk.MainWindow; - -/** - * This is a Simple class extending the DrawingArea widget. - * A really simple Demo illustrating OpenGL with DUI - * It uses the new GLCapability mixin to add the GL capabilities to the widget. - * This example is provided under the terms of the GPL License. - * Note the initialization of the GLCapabilities on the constructor. - * - * @author pac@tuxfamily.org - */ -class SimpleGL : DrawingArea { - GLfloat width; - GLfloat height; - - /** need to include the mixin to add GL capabilities to this widget */ - mixin GLCapability; - - /** - * Construct a simple DrawingArea and sets the GLCapabilities - */ - this() { - super(300, 300); - setGLCapability(); // set the GL capabilities for this widget - } - - /** - * put any gl initializations here - * returns true to consume the event - */ - bool initGL() { - resizeGL(null); - return true; - } - - /** - * This method is called every time the window must be paint or repaint - * This is where you put the OpenGL call to draw something. - * This method call be called directly by the application without an event object - * to force redrawing of the scene. - * returns true to consume the event - */ - bool drawGL(GdkEventExpose* event = null) { - glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glLoadIdentity (); - - gluLookAt(0, 0, 10, 0, 0, 0, 0, 1,0); //Set the camera position - - //Just Draw a tri-colored triangle - glBegin(GL_TRIANGLES); - glColor3f(1.0f,0.0f,0.0f); - glVertex3f( 0.0f, 1.0f, 0.0f); - glColor3f(0.0f,1.0f,0.0f); - glVertex3f(-1.0f,-1.0f, 0.0f); - glColor3f(0.0f,0.0f,1.0f); - glVertex3f( 1.0f,-1.0f, 0.0f); - glEnd(); - - return true; - } - - /** - * This method is called when the window is resized - * returns true to consume the event - */ - bool resizeGL(GdkEventConfigure* event = null) { - GLfloat w; - GLfloat h; - - if ( event == null ) { - w = getWidth(); - h = getHeight(); - } - else { - w = event.width; - h = event.height; - } - - width = w; - height = h; - - glViewport (0, 0, cast(int)w, cast(int)h); //Adjust the viewport according to new window dimensions - - /* - * Update the projection Matrix accoding to the new dimension - * and reset the OpenGL state to MODELVIEW - */ - glMatrixMode (GL_PROJECTION); - glLoadIdentity (); - gluPerspective(20, w/h, 0.1, 10); - glMatrixMode (GL_MODELVIEW); - - return true; - } -} - -private import glgdk.GLdInit; - -void main(string[] args) -{ - Main.init(args); - GLdInit.init(args); - - SimpleGL simpleGL = new SimpleGL(); - MainWindow window = new MainWindow("Simplest OpenGL Example"); - window.add(simpleGL); - window.showAll(); - - Main.run(); -}