paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/core sdlloadso.c,NONE,1.1.2.1 sdlloadso.h


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/core sdlloadso.c,NONE,1.1.2.1 sdlloadso.h,NONE,1.1.2.1 Makefile.am,1.4.2.4,1.4.2.5 pgapplication.cpp,1.10.2.10,1.10.2.11 pgdriver.cpp,1.1.2.2,1.1.2.3
Date: Thu, 31 Oct 2002 05:38:06 -0500

Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv23350/src/core

Modified Files:
      Tag: devel-opengl
        Makefile.am pgapplication.cpp pgdriver.cpp 
Added Files:
      Tag: devel-opengl
        sdlloadso.c sdlloadso.h 
Log Message:
LOTS of updates.
This branch now largely works - actually outside of what seems to be a 
libstdc++ bug that triggers in paratest, all the tests now work except gltest 
and testdummy.
OpenGL driver DOES work, but isn't complete.  Also tends to crash when opengl 
isn't threadsafe... such as with Matrox G450 *sigh*.
Dummy driver still needs updates.


***** Error reading new file: [Errno 2] No such file or directory: 'sdlloadso.c'
***** Error reading new file: [Errno 2] No such file or directory: 'sdlloadso.h'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/Makefile.am,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -C2 -r1.4.2.4 -r1.4.2.5
*** Makefile.am 30 Oct 2002 09:16:29 -0000      1.4.2.4
--- Makefile.am 31 Oct 2002 10:38:03 -0000      1.4.2.5
***************
*** 18,21 ****
--- 18,22 ----
        pgtimerobject.cpp \
        pgdriver.cpp \
+       sdlloadso.c \
        pgattrib.cpp
  

Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.10.2.10
retrieving revision 1.10.2.11
diff -C2 -r1.10.2.10 -r1.10.2.11
*** pgapplication.cpp   30 Oct 2002 09:16:29 -0000      1.10.2.10
--- pgapplication.cpp   31 Oct 2002 10:38:03 -0000      1.10.2.11
***************
*** 81,89 ****
  static bool __drawable = false;
  void PARAGUI_ShutDownCode() {
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        PG_Draw::PG_Draw* dr = PG_Draw::PG_Draw::GetDefaultDrawable();
        // this is pretty much the only spot where it's safe to delete in
        // quite this manner...
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if (__drawable && dr != NULL) {
                dr->quit();
--- 81,87 ----
***************
*** 94,102 ****
                fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        }; */
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        
        // shutdown log
        PG_LogConsole::Done();
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  
        // shutdown SDL
--- 92,98 ----
***************
*** 104,108 ****
                SDL_Quit();
        };
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
  }
  
--- 100,103 ----
***************
*** 244,252 ****
        my_quitEventLoop = false;
  
-       PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
        assert(data);
  
        while(!my_quitEventLoop) {
-               PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
                
  #if 1
--- 239,245 ----
***************
*** 258,262 ****
  #endif
  
-               PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
                if(enableAppIdleCalls) {
                        if (SDL_PollEvent(&event) == 0) {
--- 251,254 ----
***************
*** 271,277 ****
                }
  
-               PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
                DrawCursor();
-               PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
        }
        return -1;
--- 263,267 ----
***************
*** 284,299 ****
        }
  
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        PG_RectList *widgetList = PG_Widget::GetWidgetList();
        PG_Application::RedrawBackground(my_mouse_position);
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
  
        drawable->SetClipRect(my_mouse_position);
        PG_RectList backlist = widgetList->Intersect(&my_mouse_position);
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        backlist.Blit(my_mouse_position);
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        drawable->SetClipRect(PG_Rect());
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        return;
  }
--- 274,284 ----
***************
*** 317,323 ****
        my_mouse_position.my_xpos = x;
        my_mouse_position.my_ypos = y;
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        drawable->BlitSurface(my_mouse_pointer, PG_Rect(), my_mouse_position);
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(!GetBulkMode() && bUpdate) {
                drawable->UpdateRects(1, &saved);
--- 302,306 ----
***************
*** 363,367 ****
                  return false;
          
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
          // screen->GetScreen()->flags |= SDL_GLSDL;
        screen = drawable->SetMode(event->w, event->h,
--- 346,349 ----
***************
*** 432,436 ****
          if (!surf)
                  return PG_Application::screen;
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
          
          PG_Application::screen = surf; // new 
PG_Draw::PG_DrawableSurface(surf);
--- 414,417 ----
***************
*** 444,454 ****
        SDL_EnableUNICODE(true);
  
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
          PG_Rect r = PG_Rect(0,0,screen->GetWidth(),screen->GetHeight());
-       PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
        PG_Widget::UpdateRect(r);
-       PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
        drawable->UpdateRects(1, &r);
-       PG_LogMSG("%s[%s:%i]", __FUNCTION__, __FILE__, __LINE__);
  
        return PG_Application::screen;
--- 425,431 ----
***************
*** 460,464 ****
                  return false;
          
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        my_background = LoadSurface(filename);
        // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
--- 437,440 ----
***************
*** 472,478 ****
                my_freeBackground = true;
                my_backmode = mode;
-               PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, 
__LINE__);
                
RedrawBackground(PG_Rect(0,0,screen->GetWidth(),screen->GetHeight()));
-               PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, 
__LINE__);
                return true;
        } else {
--- 448,452 ----
***************
*** 502,508 ****
        my_backmode = mode;
  
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        RedrawBackground(PG_Rect(0,0,screen->GetWidth(),screen->GetHeight()));
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        return true;
  }
--- 476,480 ----
***************
*** 510,514 ****
  /**  */
  void PG_Application::RedrawBackground(const PG_Rect& rect) {
-       PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__);
        /*static*/ PG_Rect 
screenrect(0,0,screen->GetWidth(),screen->GetHeight());
  
--- 482,485 ----
***************
*** 520,526 ****
        //PG_Application::LockScreen();
  
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(!my_background) {
-               fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
                SDL_Color c = my_backcolor;
                screen->FillRect(fillrect, SDL_MapRGB(screen->GetFormat(), c.r, 
c.g, c.b));
--- 491,495 ----
***************
*** 528,532 ****
                return;
        }
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        if(my_backmode == BKMODE_STRETCH &&
           (my_background->GetWidth() != screen->GetWidth() ||
--- 497,500 ----
***************
*** 542,560 ****
                                
my_background->ScaleSurface(static_cast<Uint16>(screen->GetWidth()), 
static_cast<Uint16>(screen->GetHeight()));
                }
-               fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
                drawable->GetClipRect(fillrect);
                drawable->SetClipRect(rect);
-               fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
                drawable->BlitSurface(my_scaled_background, PG_Rect(), 
PG_Rect());
-               fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
                drawable->SetClipRect(fillrect);
  
        } else {
!               // fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, 
__LINE__);
!               PG_LogDBG("ParaGUI app[%s]: %s:%i", __FILE__, __FUNCTION__, 
__LINE__);
!               PG_LogMSG("tile creator %s", 
my_background->GetCreator()->GetName().c_str());
                screen->DrawTile(screenrect, rect, my_background);
        }
-       fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
        
        //PG_Application::UnlockScreen();
--- 510,523 ----
                                
my_background->ScaleSurface(static_cast<Uint16>(screen->GetWidth()), 
static_cast<Uint16>(screen->GetHeight()));
                }
                drawable->GetClipRect(fillrect);
                drawable->SetClipRect(rect);
                drawable->BlitSurface(my_scaled_background, PG_Rect(), 
PG_Rect());
                drawable->SetClipRect(fillrect);
  
        } else {
!               // PG_LogDBG("ParaGUI app[%s]: %s:%i", __FILE__, __FUNCTION__, 
__LINE__);
!               // PG_LogMSG("tile creator %s", 
my_background->GetCreator()->GetName().c_str());
                screen->DrawTile(screenrect, rect, my_background);
        }
        
        //PG_Application::UnlockScreen();

Index: pgdriver.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/Attic/pgdriver.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** pgdriver.cpp        24 Oct 2002 16:08:13 -0000      1.1.2.2
--- pgdriver.cpp        31 Oct 2002 10:38:03 -0000      1.1.2.3
***************
*** 33,64 ****
  
  /* hidden SDL API - docs included */
! /* beginning of SDL_loadso.h */
! #include "begin_code.h"
! /* Set up for C function definitions, even when using C++ */
! #ifdef __cplusplus
! extern "C" {
! #endif
! 
! /* This function dynamically loads a shared object and returns a pointer
!  * to the object handle (or NULL if there was an error).
!  * The 'sofile' parameter is a system dependent name of the object file.
!  */
! extern DECLSPEC void *SDL_LoadObject(const char *sofile);
! 
! /* Given an object handle, this function looks up the address of the
!  * named function in the shared object and returns it.  This address
!  * is no longer valid after calling SDL_UnloadObject().
!  */
! extern DECLSPEC void *SDL_LoadFunction(void *handle, const char *name);
! 
! /* Unload a shared object from memory */
! extern DECLSPEC void SDL_UnloadObject(void *handle);
! 
! /* Ends C function definitions when using C++ */
! #ifdef __cplusplus
! }
! #endif
! #include "close_code.h"
! /* end of SDL_loadso.h */
  
  typedef void* (*pg_bootdriver)(void);
--- 33,37 ----
  
  /* hidden SDL API - docs included */
! #include "sdlloadso.h"
  
  typedef void* (*pg_bootdriver)(void);
***************
*** 83,86 ****
--- 56,60 ----
    filename = (std::string)name + (std::string)".so";
  #endif
+   /* PG_LogDBG("ParaGUI[%s]: %s:%i", __FILE__, __FUNCTION__, __LINE__); */
    /* PG_LogDBG("PGDriver[%s]: Opening driver '%s'.", name, filename.c_str()); 
*/
  
***************
*** 134,143 ****
    if (driverh != NULL) {
      if (driver != NULL) {
!       driver->prerm();
        if (PG_Draw::PG_Draw::GetDefaultDrawable() == driver) {
        PG_Draw::PG_Draw::SetDefaultDrawable(prevdriver);
        };
!       driver->postrm();
!       delete driver;
        driver = NULL;
      };
--- 108,117 ----
    if (driverh != NULL) {
      if (driver != NULL) {
!       /* driver->prerm(); */
        if (PG_Draw::PG_Draw::GetDefaultDrawable() == driver) {
        PG_Draw::PG_Draw::SetDefaultDrawable(prevdriver);
        };
!       /* driver->postrm(); */
!       /* delete driver; */
        driver = NULL;
      };
***************
*** 151,154 ****
--- 125,129 ----
    PG_Draw::PG_Draw* v;
    /* v = PG_Draw::PG_Draw::GetDefaultDrawable(); */
+   // PG_LogMSG("%s[%s:%i]: driver %p", __FUNCTION__, __FILE__, __LINE__, 
driver);
    v = app.GetDrawingEnvironment();
    if (v == driver) return; /* already attached */





reply via email to

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