Changeset 198
- Timestamp:
- 01/07/07 14:18:34 (2 years ago)
- Files:
-
- downloads/duit.tar.gz (modified) (previous)
- downloads/duit.zip (modified) (previous)
- trunk/compdDuit.bat (modified) (1 diff)
- trunk/makeAll.bat (modified) (1 diff)
- trunk/srcgl/glgtk/GLCapability.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/compdDuit.bat
r180 r198 1 #!/bin/sh2 1 del duit.lib 3 2 compd src/atk src/cairoLib src/gdk src/glib src/gobject src/gthread src/gtk src/lib src/pango -I src;~/dmd/src/phobos -olib duit trunk/makeAll.bat
r196 r198 6 6 call compdDuitTests.bat 7 7 8 rem compdDuitgl.bat8 rem compdDuitgl.bat 9 9 rem TODO compdDuitSimpleGL.bat 10 10 rem TODO compdDuit.ShapesGL.bat 11 11 12 12 rem you can now run 13 rem ./DuitTests13 rem ./DuitTests 14 14 rem TODO ./SimpleGL 15 15 rem TODO ./ShapesGL trunk/srcgl/glgtk/GLCapability.d
r191 r198 137 137 bit glDrawFrame(Widget widget) 138 138 { 139 //printf("GLCapabilityT.glDrawFrame \n" ); 140 GLContext context = GLWidget.getGLContext(widget); 141 GLDrawable drawable = GLWidget.getGLDrawable(widget); 142 143 /*** OpenGL BEGIN ***/ 144 if ( !drawable.glBegin(context) ) 145 { 146 return false; 147 } 139 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 1\n" ); 140 GLContext context = GLWidget.getGLContext(widget); 141 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 2\n" ); 142 GLDrawable drawable = GLWidget.getGLDrawable(widget); 143 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 3\n" ); 144 145 /*** OpenGL BEGIN ***/ 146 if ( !drawable.glBegin(context) ) 147 { 148 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 4\n" ); 149 return false; 150 } 151 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 5\n" ); 148 152 149 153 /*** do user actions ***/ 150 154 bit consumeEvent = typeof(this).drawGL(null); 151 155 156 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 6\n" ); 152 157 //writefln("glDrawFrame"); 153 158 /*** flush ***/ 154 159 if ( drawable.isDoubleBuffered() ) 155 160 { 156 drawable.swapBuffers(); 157 } 158 else 159 { 160 glFlush (); 161 } 162 163 drawable.glEnd(); 161 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 7\n" ); 162 drawable.swapBuffers(); 163 } 164 else 165 { 166 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 8\n" ); 167 glFlush (); 168 } 169 170 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 9\n" ); 171 drawable.glEnd(); 172 debug(drawFrame)printf("GLCapabilityT.glDrawFrame 10\n" ); 164 173 165 174 … … 170 179 } 171 180 181 bool alreadyRealized; 182 183 bool getAlreadyRealized() 184 { 185 return alreadyRealized; 186 } 187 172 188 void realizeFrame(Widget widget) 173 189 { 174 175 //printf("GLCapabilityT.realizeFrame \n" ); 190 if ( alreadyRealized ) 191 { 192 // return; 193 } 194 alreadyRealized = true; 195 printf("GLCapabilityT.realizeFrame \n" ); 176 196 GLContext context = GLWidget.getGLContext(widget); 177 197 GLDrawable drawable = GLWidget.getGLDrawable(widget);
