gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/gui aqua.cpp aqua_ogl_glue.cpp aqua_ogl_g...


From: Markus Gothe
Subject: [Gnash-commit] gnash/gui aqua.cpp aqua_ogl_glue.cpp aqua_ogl_g...
Date: Mon, 23 Jul 2007 01:01:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  07/07/23 01:01:31

Modified files:
        gui            : aqua.cpp aqua_ogl_glue.cpp aqua_ogl_glue.h 
                         aquasup.h 

Log message:
        Fixes etc...

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua.cpp?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua_ogl_glue.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aqua_ogl_glue.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/aquasup.h?cvsroot=gnash&r1=1.9&r2=1.10

Patches:
Index: aqua.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/aqua.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- aqua.cpp    23 Jul 2007 00:37:19 -0000      1.14
+++ aqua.cpp    23 Jul 2007 01:01:31 -0000      1.15
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: aqua.cpp,v 1.14 2007/07/23 00:37:19 nihilus Exp $ */
+/* $Id: aqua.cpp,v 1.15 2007/07/23 01:01:31 nihilus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -63,6 +63,7 @@
   WindowRef    window          = (WindowRef) inUserData;
   OSStatus     err             = eventNotHandledErr;
  
+  GNASH_REPORT_FUNCTION;
   return err;  
 }
 static pascal OSStatus SimpleWindowEventHandlerProc(EventHandlerCallRef 
inCallRef, EventRef inEvent, void* inUserData);
@@ -86,38 +87,16 @@
 
 bool AquaGui::run()
 {
-    GNASH_REPORT_FUNCTION;
-    
-    RunApplicationEventLoop();
-    return true;
-}
-
-void AquaGui::renderBuffer()
-{
-    GNASH_REPORT_FUNCTION;
-    _glue.render();
-}
-
-void
-AquaGui::setInvalidatedRegions(const InvalidatedRanges& ranges)
-{
-       GNASH_REPORT_FUNCTION;
-    _glue.setInvalidatedRegions(ranges);
-}
-
-bool AquaGui::init(int argc, char ***argv) /* Self-explainatory */
-{
   OSErr                                                err;
   static const EventTypeSpec   sApplicationEvents[] =  {  {kEventClassCommand, 
kEventCommandProcess}  };
   
   GNASH_REPORT_FUNCTION;
-  
   BlockZero(&g, sizeof(g));
     
   g.mainBundle = CFBundleGetMainBundle();
   if (g.mainBundle == NULL) 
   {
-        err = -1;  
+               err = false;
         goto Bail;
   }
   
@@ -125,11 +104,11 @@
   if (err != noErr)goto Bail;
   if (g.mainNib == NULL)
   {
-       err = -1;
+               err = false;
        goto Bail;
   }
 
-  err = SetMenuBarFromNib(g.mainNib, CFSTR("MenuBar"));
+       err = SetMenuBarFromNib(g.mainNib, CFSTR("aqua"));
   if (err != noErr)goto Bail;
 
   InstallApplicationEventHandler(NewEventHandlerUPP(AppEventHandlerProc), 
GetEventTypeCount(sApplicationEvents), sApplicationEvents, 0, NULL);
@@ -147,15 +126,35 @@
   SendWindowGroupBehind(g.windowGroups[1], g.windowGroups[2]);
   SendWindowGroupBehind(g.windowGroups[0], g.windowGroups[1]);
   
+       RunApplicationEventLoop();
+    return true;
+
+Bail:
+       return err;    
+}
+
+void AquaGui::renderBuffer()
+{
+    GNASH_REPORT_FUNCTION;
+    _glue.render();
+}
+
+void
+AquaGui::setInvalidatedRegions(const InvalidatedRanges& ranges)
+{
+       GNASH_REPORT_FUNCTION;
+    _glue.setInvalidatedRegions(ranges);
+}
+
+bool AquaGui::init(int argc, char ***argv) /* Self-explainatory */
+{
+  GNASH_REPORT_FUNCTION;
+  
        _glue.init (argc, argv);
 
     _renderer = _glue.createRenderHandler();
     if(!_renderer)return false;    
     return true;
-
-
-Bail:  
-  return err;  
 }
 
 void AquaGui::setTimeout(unsigned int timeout)

Index: aqua_ogl_glue.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/aqua_ogl_glue.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- aqua_ogl_glue.cpp   23 Jul 2007 00:37:19 -0000      1.12
+++ aqua_ogl_glue.cpp   23 Jul 2007 01:01:31 -0000      1.13
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: aqua_ogl_glue.cpp,v 1.12 2007/07/23 00:37:19 nihilus Exp $ */
+/* $Id: aqua_ogl_glue.cpp,v 1.13 2007/07/23 01:01:31 nihilus Exp $ */
 
 
 #include "aqua_ogl_glue.h"
@@ -36,6 +36,9 @@
 {
 
 AquaOglGlue::AquaOglGlue()
+#ifdef FIX_I810_LOD_BIAS
+  : _tex_lod_bias(-1.2f)
+#endif
 {
 //    GNASH_REPORT_FUNCTION;
 }
@@ -64,8 +67,6 @@
     return true;
 }
 
-
-
 render_handler* AquaOglGlue::createRenderHandler()
 {
     GNASH_REPORT_FUNCTION;
@@ -99,11 +100,13 @@
     glDisable(GL_LIGHTING);
     glPushAttrib (GL_ALL_ATTRIB_BITS);         
 
+#ifdef FIX_I810_LOD_BIAS
+    glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 
_tex_lod_bias);
+#endif
     return true;
 }
 
-void
-AquaOglGlue::render()
+void AquaOglGlue::render()
 {
     GNASH_REPORT_FUNCTION;
     //SDL_GL_SwapBuffers();

Index: aqua_ogl_glue.h
===================================================================
RCS file: /sources/gnash/gnash/gui/aqua_ogl_glue.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- aqua_ogl_glue.h     23 Jul 2007 00:00:51 -0000      1.6
+++ aqua_ogl_glue.h     23 Jul 2007 01:01:31 -0000      1.7
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: aqua_ogl_glue.h,v 1.6 2007/07/23 00:00:51 nihilus Exp $ */
+/* $Id: aqua_ogl_glue.h,v 1.7 2007/07/23 01:01:31 nihilus Exp $ */
 
 #ifndef AQUA_OGL_GLUE_H
 #define AQUA_OGL_GLUE_H
@@ -41,8 +41,10 @@
     bool prepDrawingArea(int width, int height);
     void render();
   private:
+#ifdef FIX_I810_LOD_BIAS
+    float _tex_lod_bias;
+#endif
 };
-
 }
 
 #endif /* AQUA_OGL_GLUE_H */
\ No newline at end of file

Index: aquasup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/aquasup.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- aquasup.h   23 Jul 2007 00:00:51 -0000      1.9
+++ aquasup.h   23 Jul 2007 01:01:31 -0000      1.10
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: aquasup.h,v 1.9 2007/07/23 00:00:51 nihilus Exp $ */
+/* $Id: aquasup.h,v 1.10 2007/07/23 01:01:31 nihilus Exp $ */
 
 #ifndef __AQUASUP_H__
 #define __AQUASUP_H__
@@ -37,7 +37,7 @@
 
 namespace gnash {
 
-class AquaGui : public Gui
+class DSOEXPORT AquaGui : public Gui
 {
        private:
        
@@ -53,6 +53,9 @@
 
 #if defined(RENDERER_OPENGL)
     AquaOglGlue                _glue;
+#ifdef FIX_I810_LOD_BIAS
+    float                      _tex_lod_bias;
+#endif
 #endif
        
        public:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]