~ubuntu-branches/ubuntu/intrepid/gnome-games/intrepid

« back to all changes in this revision

Viewing changes to glchess/src/lib/scene/opengl/opengl.py

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2008-10-21 00:30:34 UTC
  • mfrom: (1.1.58)
  • Revision ID: package-import@ubuntu.com-20081021003034-cb0iknvzten935zn
Tags: 1:2.24.1-0ubuntu1
* New upstream release (LP: #286667)
  - General:
    - Fix up compatiblity with Gtk/Glib 2.14
    - Reclassify Gnibbles as Arcade game not logic game
    - Read saved window configuration from correct GConf group (affects
      gnometris, gnibbles, gnobots)
  - Aisleriot:
    - Remove vestigal flowRoot elements from solitaire svg icons. They
      caused a black box when rendering.
    - Don't crash when the session manager terminates aisleriot
  - GLChess:
    - Fix crash in error handler when GGZ connection closed
    - Fix crash in empty scene when no AI engines available
    - Fix crash when have OpenGL libraries but cannot get valid display
    - Implement GGZ config parser instead of using Python config parser
      which does not handle '%' characters as GGZ does
    - Ignore GGZ server remove player/table for unknown players/tables
    - Handle exceptions loading OpenGL textures
    - Reset pause menu when starting new game
    - Only allow one new/load game dialog to be visible at once
    - Fix incorrect function call for single buffered 3D display
    - Handle fork() errors in AI processes
    - Fixes to compile in Solaris
    - Print failure to start message to stdout if cannot import GTK+
    - Handle invalid response from glRenderMode(GL_RENDER) and print
      debugging information
    - More logging messages about selection rendering bugs
    - After looking at failure case in PyOpenGL code we don't need to change
      render modes after failed to change to GL_SELECT
    - Fix potential bugs found by PyChecker
    - Fix crash when validly claiming a draw
    - Don't display failed to claim draw dialog when successfully claimed
      draw
  - GTali:
    - Undoing 5 of a kind reduces the score by 50 as there might be multiple
      scores (LP: #238978)
  - Sudoku:
    - Add not overwrite time and also remember to actually save the time in
      the file (LP: #279616)
    - Correct typo in error message that led to an exception
  - Gnotravex:
    - Stop paused tiles becoming visible after changing colour settings
  - Blackjack:
    - Fix compiler warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
        # Don't render to screen, just select
357
357
        # Selection buffer is large in case we select multiple squares at once (it generates an exception)
358
358
        glSelectBuffer(20)
359
 
        glRenderMode(GL_SELECT)
 
359
        
 
360
        # TEMP
 
361
        # Handle the failure case in bug #538252. By catching this we convert a crash
 
362
        # that would generate bugzilla report into the user input being ignored. This should
 
363
        # be removed once the problem has been fixed (assumed to be in PyGTK/OpenGL drivers).
 
364
        # Note that OpenGL may be in an invalid state when this fails.
 
365
        try:
 
366
            glRenderMode(GL_SELECT)
 
367
        except IndexError:
 
368
            print 'Failed to change to GL_SELECT render mode (Bug #538252)'
 
369
            return None
360
370
 
361
371
        glInitNames()
362
372
 
397
407
        if coord is None:
398
408
            return None
399
409
        
 
410
        # TEMP
 
411
        # Handle the failure case in bug #535256. By catching this we convert a crash
 
412
        # that would generate bugzilla report into the user input being ignored. This should
 
413
        # be removed once the problem has been fixed (assumed to be in PyGTK/OpenGL drivers).
 
414
        if len(coord) != 2:
 
415
            print 'Invalid response received from glRenderMode(GL_RENDER) (Bug #535256): coord=%s, viewport=%s' % (repr(coord), repr(viewport))
 
416
            return None
 
417
 
400
418
        # Convert from co-ordinates to LAN format
401
419
        rank = chr(ord('a') + coord[0])
402
420
        file = chr(ord('1') + coord[1])