Changeset 702

Show
Ignore:
Timestamp:
09/14/03 14:59:32 (5 years ago)
Author:
sholloway
Message:

Added GL prefix to Execute/Select/Deselect

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Formats/GeoObject.py

    r380 r702  
    8080        def AddTraversal(self, traversal): 
    8181            GeoObject.GeoSubGroup.AddTraversal(self, traversal) 
    82             self.geoobj.AddElement(traversal.Execute) 
     82            self.geoobj.AddElement(traversal.GLExecute) 
    8383 
    8484        def AddMaterial(self, material): 
    8585            GeoObject.GeoSubGroup.AddMaterial(self, material) 
    86             self.geoobj.AddElement(material.Select) 
     86            self.geoobj.AddElement(material.GLSelect) 
    8787    GeoSubGroupFactory = DefaultGeoSubGroup 
    8888 
    8989    def SetVertices(self, Vertices): 
    9090        super(DefaultGeoObject, self).SetVertices(Vertices) 
    91         self.AddElement(self.Vertices.Select, -1) 
     91        self.AddElement(self.Vertices.GLSelect, -1) 
    9292 
    9393    def SetNormals(self, Normals): 
    9494        super(DefaultGeoObject, self).SetNormals(Normals) 
    95         self.AddElement(self.Normals.Select, -1) 
     95        self.AddElement(self.Normals.GLSelect, -1) 
    9696 
    9797    def SetTextureCoords(self, TexCoords): 
    9898        super(DefaultGeoObject, self).SetTextureCoords(TexCoords) 
    99         self.AddElement(self.TexCoords.Select, -1) 
     99        self.AddElement(self.TexCoords.GLSelect, -1) 
    100100 
    101101    _BoundingBox = None 
  • trunk/RBRapier/RBRapier/Formats/Lightwave/MeshedObject.py

    r398 r702  
    205205    def OptimizeMesh(self, level): 
    206206        TriStripifier = TriangleStripifier.TriangleStripifier() 
    207         TriStripifier.Selector = TriangleStripifier.ExperimentSelector(level, 3) 
     207        TriStripifier.GLSelector = TriangleStripifier.ExperimentGLSelector(level, 3) 
    208208        self.TraverseMesh(TriangleMesh.FaceEdgeMesh, TriStripifier, 'TriStrip') 
    209209 
  • trunk/RBRapier/RBRapier/Formats/Wavefront/MeshedObject.py

    r379 r702  
    6262        except AttributeError: pass 
    6363        self.Vertices = Vertices 
    64         self.AddElement(self.Vertices.Select, -1) 
     64        self.AddElement(self.Vertices.GLSelect, -1) 
    6565 
    6666    def SetNormals(self, Normals): 
     
    6868        except AttributeError: pass 
    6969        self.Normals = Normals 
    70         self.AddElement(self.Normals.Select, -1) 
     70        self.AddElement(self.Normals.GLSelect, -1) 
    7171 
    7272    def SetTextureCoords(self, TexCoords): 
     
    7474        except AttributeError: pass 
    7575        self.TexCoords = TexCoords 
    76         self.AddElement(self.TexCoords.Select, -1) 
     76        self.AddElement(self.TexCoords.GLSelect, -1) 
    7777 
    7878    def AddGroup(self, name): 
     
    155155    def OptimizeMesh(self, level): 
    156156        TriStripifier = TriangleStripifier.TriangleStripifier() 
    157         TriStripifier.Selector = TriangleStripifier.ExperimentSelector(level, 3) 
     157        TriStripifier.GLSelector = TriangleStripifier.ExperimentGLSelector(level, 3) 
    158158        self.TraverseMesh(TriangleMesh.FaceEdgeMesh, TriStripifier) 
    159159 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Accumulation.py

    r341 r702  
    4848        self.ModeValue = ModeValue 
    4949 
    50     def Execute(self, context): 
     50    def GLExecute(self, context): 
    5151        GL.glAccum(self.Mode, self.ModeValue) 
    52     Draw = Execute 
    5352 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Blending.py

    r685 r702  
    5252        self.DestinationFactor = DestinationFactor 
    5353 
    54     def Select(self, context): 
     54    def GLSelect(self, context): 
    5555        context.StateMgr.Enable(GL.GL_BLEND) 
    5656        GL.glBlendFunc(self.SourceFactor, self.DestinationFactor) 
    5757 
    58     def Deselect(self, context): 
     58    def GLDeselect(self, context): 
    5959        context.StateMgr.Disable(GL.GL_BLEND) 
    6060 
     
    8585        self.DestinationAlphaFactor = DestinationAlphaFactor 
    8686 
    87     def Select(self, context): 
     87    def GLSelect(self, context): 
    8888        SourceAlphaFactor = self.SourceAlphaFactor  
    8989        if SourceAlphaFactor is None: SourceAlphaFactor = self.SourceFactor  
     
    119119            self.Constant = constant 
    120120 
    121     def Select(self, context): 
     121    def GLSelect(self, context): 
    122122        ex = self._extensions.blend_color 
    123123        ex.glBlendColorEXT(*self.Constant.tolist()) 
     
    146146        self.Equation = Equation 
    147147 
    148     def Select(self, context): 
     148    def GLSelect(self, context): 
    149149        ex = self._extensions.blend_minmax 
    150150        ex.glBlendEquationEXT(self.Equation) 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Fog.py

    r697 r702  
    5353        self.Density = Density 
    5454 
    55     def Select(self, context): 
     55    def GLSelect(self, context): 
    5656        context.StateMgr.Enable(GL.GL_FOG) 
    5757        GL.glFog(GL.GL_FOG_COLOR, self.Color) 
     
    6161        GL.glFog(GL.GL_FOG_MODE, self.Mode) 
    6262 
    63     def Deselect(self, context): 
     63    def GLDeselect(self, context): 
    6464        context.StateMgr.Disable(GL.GL_FOG) 
    6565 
     
    7878    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    7979 
    80     def Execute(self, context): 
     80    def GLExecute(self, context): 
    8181        GL.glHint(GL.GL_FOG_HINT, self.Hint) 
    82     Draw = Execute 
    8382 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Lighting.py

    r369 r702  
    5555            setattr(self, name, value) 
    5656 
    57     def Select(self, context): 
     57    def GLSelect(self, context): 
    5858        context.StateMgr.Enable(GL.GL_LIGHTING) 
    5959        GL.glShadeModel(self.ShadeModel) 
     
    6565        #GL.glLightModel(GL.GL_LIGHT_MODEL_COLOR_CONTROL, self.SeperateSpecular) 
    6666 
    67     def Deselect(self, context): 
     67    def GLDeselect(self, context): 
    6868        context.StateMgr.Disable(GL.GL_LIGHTING) 
    6969 
     
    9494            setattr(self, name, value) 
    9595 
    96     def Select(self, context): 
     96    def GLSelect(self, context): 
    9797        LightId = GL.GL_LIGHT0 + self.LightNumber 
    9898        context.StateMgr.Enable(LightId) 
     
    102102        GL.glLightfv(LightId, GL.GL_POSITION, self.Position) 
    103103 
    104     def Deselect(self, context): 
     104    def GLDeselect(self, context): 
    105105        LightId = GL.GL_LIGHT0 + self.LightNumber 
    106106        context.StateMgr.Disable(LightId) 
     
    119119    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    120120 
    121     def Select(self, context): 
    122         self.__super.Select(context) 
     121    def GLSelect(self, context): 
     122        self.__super.GLSelect(context) 
    123123        const,linear,quadratic = self.Attenuation 
    124124        GL.glLightf(LightId, GL.GL_CONSTANT_ATTENUATION, const) 
     
    143143    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    144144 
    145     def Select(self, context): 
    146         self.__super.Select(context) 
     145    def GLSelect(self, context): 
     146        self.__super.GLSelect(context) 
    147147        LightId = GL.GL_LIGHT0 + self.LightNumber 
    148148        GL.glLightfv(LightId, GL.GL_SPOT_DIRECTION, self.SpotDirection) 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/LineRasterization.py

    r341 r702  
    4646        self.Size = Size 
    4747 
    48     def Select(self, context): 
     48    def GLSelect(self, context): 
    4949        GL.glLineWidth(self.Size) 
    5050 
    51     def Deselect(self, context): 
     51    def GLDeselect(self, context): 
    5252        GL.glLineWidth(1.) 
    5353 
     
    6969        self.Pattern = Pattern 
    7070 
    71     def Select(self, context): 
     71    def GLSelect(self, context): 
    7272        context.StateMgr.Enable(GL.GL_LINE_STIPPLE) 
    7373        GL.glLineStipple(self.Repeat, self.Pattern) 
    7474 
    75     def Deselect(self, context): 
     75    def GLDeselect(self, context): 
    7676        context.StateMgr.Disable(GL.GL_LINE_STIPPLE) 
    7777 
     
    8888    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    8989 
    90     def Select(self, context): 
     90    def GLSelect(self, context): 
    9191        GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, self.SmoothHint) 
    9292        context.StateMgr.Enable(GL.GL_LINE_SMOOTH) 
    9393 
    94     def Deselect(self, context): 
     94    def GLDeselect(self, context): 
    9595        context.StateMgr.Disable(GL.GL_LINE_SMOOTH) 
    9696 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/LogicalOperations.py

    r341 r702  
    4646        self.Mode = Mode 
    4747 
    48     def Draw(self, context): 
     48    def GLExecute(self, context): 
    4949        context.StateMgr.Enable(GL.GL_COLOR_LOGIC_OP) 
    5050        GL.glLogicOp(self.Mode) 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/Materials.py

    r363 r702  
    5050    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    5151 
    52     def Select(self, context): 
     52    def GLSelect(self, context): 
    5353        Face = self.Face 
    5454        value = self.Shininess 
     
    6868            GL.glMaterialfv(Face, GL.GL_EMISSION, value) 
    6969 
    70     def Deselect(self, context): 
     70    def GLDeselect(self, context): 
    7171        pass # Ah, what to do here? 
    7272 
     
    8787    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    8888 
    89     def Select(self, context): 
     89    def GLSelect(self, context): 
    9090        GL.glColorMaterial(self.Face, self.Parameter) 
    9191        context.StateMgr.Enable(GL.GL_COLOR_MATERIAL) 
    9292 
    93     def Deselect(self, context): 
     93    def GLDeselect(self, context): 
    9494        context.StateMgr.Disable(GL.GL_COLOR_MATERIAL) 
    9595         
  • trunk/RBRapier/RBRapier/Renderer/Appearance/PointRasterization.py

    r528 r702  
    4848        self.Size = Size 
    4949 
    50     def Select(self, context): 
     50    def GLSelect(self, context): 
    5151        GL.glPointSize(self.Size) 
    5252 
    53     def Deselect(self, context): 
     53    def GLDeselect(self, context): 
    5454        GL.glPointSize(1.) 
    5555 
     
    6262    SmoothHint = GL.GL_DONT_CARE 
    6363 
    64     def Select(self, context): 
     64    def GLSelect(self, context): 
    6565        GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, self.SmoothHint) 
    6666        context.StateMgr.Enable(GL.GL_POINT_SMOOTH) 
    6767 
    68     def Deselect(self, context): 
     68    def GLDeselect(self, context): 
    6969        context.StateMgr.Disable(GL.GL_POINT_SMOOTH) 
    7070 
     
    9494    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    9595 
    96     def Draw(self, context): 
     96    def GLExecute(self, context): 
    9797        pp = self._extensions.point_parameters 
    9898        pp.glPointParameterfvEXT(pp.GL_POINT_DISTANCE_ATTENUATION_EXT, self.Attenuation) 
  • trunk/RBRapier/RBRapier/Renderer/Appearance/PolygonRasterization.py

    r369 r702  
    4848        if CullFace is not None: self.CullFace = CullFace 
    4949 
    50     def Select(self, context): 
     50    def GLSelect(self, context): 
    5151        GL.glFrontFace(self.FrontFace) 
    5252        GL.glCullFace(self.CullFace) 
    5353        context.StateMgr.Enable(GL.GL_CULL_FACE) 
    5454 
    55     def Deselect(self, context): 
     55    def GLDeselect(self, context): 
    5656        context.StateMgr.Disable(GL.GL_CULL_FACE) 
    5757 
     
    7575        self.BackStyle = BackStyle 
    7676 
    77     def Select(self, context): 
     77    def GLSelect(self, context): 
    7878        FrontStyle = self.FrontStyle 
    7979        BackStyle = self.BackStyle 
     
    8484            GL.glPolygonMode(GL.GL_BACK, BackStyle) 
    8585 
    86     def Deselect(self, context): 
     86    def GLDeselect(self, context): 
    8787        GL.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL) 
    8888     
     
    103103    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    104104 
    105     def Select(self, context): 
     105    def GLSelect(self, context): 
    106106        context.StateMgr.Enable(self.Mode) 
    107107        GL.glPolygonOffset(self.Factor, self.Units) 
     
    124124    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    125125 
    126     def Select(self, context): 
     126    def GLSelect(self, context): 
    127127        context.StateMgr.Enable(GL.GL_POLYGON_STIPPLE) 
    128128        GL.glPolygonStipple(self.Stipple) 
    129129 
    130     def Deselect(self, context): 
     130    def GLDeselect(self, context): 
    131131        context.StateMgr.Disable(GL.GL_POLYGON_STIPPLE) 
    132132 
     
    145145    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    146146 
    147     def Select(self, context): 
     147    def GLSelect(self, context): 
    148148        context.StateMgr.Enable(GL.GL_POLYGON_SMOOTH) 
    149149        GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, self.SmoothHint) 
    150150 
    151     def Deselect(self, context): 
     151    def GLDeselect(self, context): 
    152152        context.StateMgr.Disable(GL.GL_POLYGON_SMOOTH) 
    153153 
  • trunk/RBRapier/RBRapier/Renderer/BufferMgr.py

    r688 r702  
    4444 
    4545class BufferEffector(BufferTracker): 
    46     def Execute(self, context): 
     46    def GLExecute(self, context): 
    4747        GL.glClear(self.Bitmask) 
    48     Draw = Execute 
    4948 
    5049class DynamicBufferEffector(DynamicBufferTracker): 
    51     def Execute(self, context): 
     50    def GLExecute(self, context): 
    5251        GL.glClear(self.Bitmask) 
    53     Draw = Execute 
    5452 
  • trunk/RBRapier/RBRapier/Renderer/ChangeBaseMgr.py

    r688 r702  
    116116            self._BitmaskNeedUpdate = False 
    117117 
    118     def Execute(self, context): 
     118    def GLExecute(self, context): 
    119119        pass 
    120     Draw = Execute 
    121120     
    122121#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • trunk/RBRapier/RBRapier/Renderer/DisplayList.py

    r432 r702  
    4444    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4545 
    46     def Execute(self, context): 
     46    def GLExecute(self, context): 
    4747        if self.__RecreateCache: 
    4848            if __debug__: 
     
    5252                self.__ListId = GL.glGenLists(1) 
    5353            GL.glNewList(self.__ListId, GL.GL_COMPILE) 
    54             super(DisplayList, self).Execute(context) 
     54            super(DisplayList, self).GLExecute(context) 
    5555            GL.glEndList() 
    5656            if __debug__:  
  • trunk/RBRapier/RBRapier/Renderer/Environment/Buffers.py

    r343 r702  
    5050            self.Value = Color 
    5151 
    52     def Execute(self, context): 
     52    def GLExecute(self, context): 
    5353        GL.glClearColor(*self.Value.tolist()) 
    54     Draw = Execute 
    5554 
    5655#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    5958    Mask = Vector.Vector4Property('Mask ', (1., 1., 1., 1.)) 
    6059 
    61     def Select(self, context): 
     60    def GLSelect(self, context): 
    6261        GL.glColorMask(*self.Mask.tolist()) 
    6362 
    64     def Deselect(self, context): 
     63    def GLDeselect(self, context): 
    6564        GL.glColorMask(1,1,1,1) 
    6665 
     
    8382        self.Value = Value 
    8483 
    85     def Execute(self, context): 
     84    def GLExecute(self, context): 
    8685        GL.glClearDepth(self.Value) 
    87     Draw = Execute 
    8886 
    8987#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    10199    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    102100 
    103     def Select(self, context): 
     101    def GLSelect(self, context): 
    104102        GL.glDepthMask(self.Mask) 
    105103 
    106     def Deselect(self, context): 
     104    def GLDeselect(self, context): 
    107105        GL.glDepthMask(1) 
     106 
    108107#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    109108 
     
    124123        self.Value = Value 
    125124 
    126     def Execute(self, context): 
     125    def GLExecute(self, context): 
    127126        GL.glClearStencil(self.Value) 
    128     Draw = Execute 
    129127 
    130128#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    145143        self.Mask = mask 
    146144 
    147     def Select(self, context): 
     145    def GLSelect(self, context): 
    148146        GL.glStencilMask(self.Mask) 
    149147 
    150     def Deselect(self, context): 
     148    def GLDeselect(self, context): 
    151149        GL.glStencilMask(-1) 
    152150 
     
    172170 
    173171    def AccumBits(): 
    174         return (GL.glGetInteger(GL.GL_ACCUM_RED_BITS),  
    175             GL.glGetInteger(GL.GL_ACCUM_GREEN_BITS), 
    176             GL.glGetInteger(GL.GL_ACCUM_BLUE_BITS), 
    177             GL.glGetInteger(GL.GL_ACCUM_ALPHA_BITS)) 
     172        bitflags = (GL.GL_ACCUM_RED_BITS, GL.GL_ACCUM_GREEN_BITS, GL.GL_ACCUM_BLUE_BITS, GL.GL_ACCUM_ALPHA_BITS) 
     173        return map(GL.glGetInteger, bitflags) 
    178174    AccumBits = staticmethod(AccumBits) 
    179175 
    180     def Execute(self, context): 
     176    def GLExecute(self, context): 
    181177        GL.glClearAccum(*self.Value.tolist()) 
    182     Draw = Execute 
    183178 
  • trunk/RBRapier/RBRapier/Renderer/Environment/FragmentTests.py

    r345 r702  
    4343    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4444 
    45     def Select(self, context): 
     45    def GLSelect(self, context): 
    4646        GL.glScissor(*self.Rectangle) 
    4747        context.StateMgr.Enable(GL.GL_SCISSOR_TEST) 
    4848 
    49     def Deselect(self, context): 
     49    def GLDeselect(self, context): 
    5050        context.StateMgr.Disable(GL.GL_SCISSOR_TEST) 
    5151 
     
    6767        self.Function = Function 
    6868 
    69     def Select(self, context): 
     69    def GLSelect(self, context): 
    7070        GL.glAlphaFunc(self.Function) 
    7171        context.StateMgr.Enable(GL.GL_ALPHA_TEST) 
    7272 
    73     def Deselect(self, context): 
     73    def GLDeselect(self, context): 
    7474        context.StateMgr.Disable(GL.GL_ALPHA_TEST) 
    7575 
     
    9393        self.Operation = Operation  
    9494 
    95     def Select(self, context): 
     95    def GLSelect(self, context): 
    9696        GL.glStencilFunc(self.Function) 
    9797        GL.glStencilOp(self.Operation) 
    9898        context.StateMgr.Enable(GL.GL_STENCIL_TEST) 
    9999 
    100     def Deselect(self, context): 
     100    def GLDeselect(self, context): 
    101101        context.StateMgr.Disable(GL.GL_STENCIL_TEST) 
    102102 
     
    118118        self.Function = Function 
    119119 
    120     def Select(self, context): 
     120    def GLSelect(self, context): 
    121121        GL.glDepthFunc(self.Function) 
    122122        context.StateMgr.Enable(GL.GL_DEPTH_TEST) 
    123123 
    124     def Deselect(self, context): 
     124    def GLDeselect(self, context): 
    125125        context.StateMgr.Disable(GL.GL_DEPTH_TEST) 
    126126 
  • trunk/RBRapier/RBRapier/Renderer/Environment/Selection.py

    r341 r702  
    3030#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3131 
    32 class SelectionBuffer(object): 
     32class GLSelectionBuffer(object): 
    3333    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3434    #~ Constants / Variables / Etc.  
    3535    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3636 
    37     SelectBufferSize = 127 
    38     _Selection = None 
     37    GLSelectBufferSize = 127 
     38    _selection = None 
    3939 
    4040    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    4242    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4343 
    44     def Execute(self, context): 
    45         del self.Selection 
    46         GL.glSelectBuffer(self.SelectBufferSize) 
     44    def GLSelect(self, context): 
     45        del self.GLSelection 
     46        GL.glGLSelectBuffer(self.GLSelectBufferSize) 
    4747        GL.glRenderMode(GL.GL_SELECT) 
    4848        GL.glInitNames() 
    4949        GL.glPushName(0) 
    50     Draw = Execute 
     50 
     51    def GLDeselect(self, context): 
     52        rawselection = GL.glRenderMode(GL.GL_RENDER) 
     53        self._SetRawGLSelection(rawselection) 
    5154 
    5255    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    5457    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    5558 
    56     def _getSelection(self): 
    57         if self._Selection is None: 
    58             self._Selection = GL.glRenderMode(GL.GL_RENDER) 
    59             #print "SelectionBuffer", self.SelectionBuffer 
    60             # TODO: Parse selection buffer 
    61         return self._Selection 
    62     def _setSelection(self, value): 
    63         self._Selection = value 
    64     def _delSelection(self): 
    65         del self._Selection 
    66     Selection = property(_getSelection, _setSelection, _delSelection) 
     59    def GetGLSelection(self): 
     60        return self._selection 
     61    def SetGLSelection(self, value): 
     62        self._selection = value 
     63    def DelGLSelection(self): 
     64        try: del self._selection 
     65        except AttributeError: pass 
     66    def _SetRawGLSelection(self, rawselection): 
     67        print "TODO: Parse selection buffer" 
     68        print "_SetRawGLSelection:", self.GLSelectionBuffer 
     69    GLSelection = property(GetGLSelection, SetGLSelection, DelGLSelection) 
     70 
  • trunk/RBRapier/RBRapier/Renderer/Geometry/ArrayTraversal.py

    r666 r702  
    103103    GenerateStatistics = GenerateStatistics 
    104104 
    105     def Execute(self, context): 
     105    def GLExecute(self, context): 
    106106        map(GL.glDrawArrays, self.primitives, self.starts, self.lengths) 
    107107        self.GenerateStatistics(context) 
     
    138138    GenerateStatistics = GenerateStatistics 
    139139 
    140     def Execute(self, context): 
     140    def GLExecute(self, context): 
    141141        map(NumericVertexArray.DrawElementsArray, self.primitives, self.data) 
    142142        self.GenerateStatistics(context) 
     
    176176        self.colors = [(.3 + .7*random.random(), .3 + .7*random.random(), .3 + .7*random.random()) for x in self.data] 
    177177 
    178     def Execute(self, context): 
     178    def GLExecute(self, context): 
    179179        _glDrawElements = NumericVertexArray.DrawElementsArray 
    180180        for color, primitive, indexes in zip(self.colors, self.primitives, self.data): 
  • trunk/RBRapier/RBRapier/Renderer/Geometry/VertexArrays.py

    r666 r702  
    5858            self.data = Numeric.asarray(data, format) 
    5959 
    60     def Select(self, context): 
     60    def GLSelect(self, context): 
    6161        context.ClientStateMgr.Enable(self._glArrayType) 
    6262        self._glArrayCall(self.data) 
    63     Execute = Select 
     63    GLExecute = GLSelect 
    6464 
    65     def Deselect(self, context): 
     65    def GLDeselect(self, context): 
    6666        context.ClientStateMgr.Disable(self._glArrayType) 
    6767 
  • trunk/RBRapier/RBRapier/Renderer/SequenceMgr.py

    r699 r702  
    9494        self.OnRemoveElement.Update(Element) 
    9595 
    96     def Execute(self, context): 
     96    def GLExecute(self, context): 
    9797        self.OnBeginExecute.Update(context) 
    9898        for priority, elementfn, element in self.Elements: 
     
    100100                elementfn(context) 
    101101        self.OnEndExecute.Update(context) 
    102     Draw = Execute 
    103102 
    104103    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    114113        if isinstance(Element, types.MethodType): 
    115114            ElementFn, Element = Element, Element.im_self 
    116         elif callable(getattr(Element, 'Execute', None)): 
    117             ElementFn = Element.Execute 
    118         elif callable(getattr(Element, 'Select', None)): 
    119             ElementFn = Element.Select 
     115        elif callable(getattr(Element, 'GLExecute', None)): 
     116            ElementFn = Element.GLExecute 
     117        elif callable(getattr(Element, 'GLSelect', None)): 
     118            ElementFn = Element.GLSelect 
    120119        else: 
    121120            raise ValueError, "Unsuppored element type %r: %r" % (type(Element), Element) 
     
    157156        self.ClientStateMgr = StateMgr.ClientStateManager() 
    158157 
    159     def Execute(self, context=None): 
     158    def GLExecute(self, context=None): 
    160159        self.Statistics = {} 
    161160        start = time.clock() 
     
    163162        self.StateMgr.Reset() 
    164163        self.ClientStateMgr.Reset() 
    165         Sequence.Execute(self, self) 
     164        Sequence.GLExecute(self, self) 
    166165        stop = time.clock() 
    167166        self.Statistics['stop'] = stop 
    168167        self.Statistics['duration'] = stop - start 
    169168        self.Statistics['persecond'] = 1./max(1e-9, stop-start) 
    170     Draw = Execute 
    171169 
  • trunk/RBRapier/RBRapier/Renderer/View/ClippingPlane.py

    r341 r702  
    5151            self.Equation = Equation 
    5252 
    53     def Select(self, context): 
     53    def GLSelect(self, context): 
    5454        PlaneIdx = GL.GL_CLIP_PLANE0 + self.PlaneNumber 
    5555        GL.glClipPlane(PlaneIdx, self.Equation.tolist()) 
    5656        context.StateMgr.Enable(PlaneIdx) 
    5757         
    58     def Deselect(self, context): 
     58    def GLDeselect(self, context): 
    5959        PlaneIdx = GL.GL_CLIP_PLANE0 + self.PlaneNumber 
    6060        context.StateMgr.Disable(PlaneIdx) 
  • trunk/RBRapier/RBRapier/Renderer/View/TransformationSettings.py

    r369 r702  
    4242    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4343 
    44     def Select(self, context): 
     44    def GLSelect(self, context): 
    4545        context.StateMgr.Enable(GL.GL_NORMALIZE) 
    4646 
    47     def Deselect(self, context): 
     47    def GLDeselect(self, context): 
    4848        context.StateMgr.Disable(GL.GL_NORMALIZE) 
    4949 
     
    6565        self.PerspectiveHint = PerspectiveHint 
    6666 
    67     def Execute(self, context): 
     67    def GLExecute(self, context): 
    6868        GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, self.PerspectiveHint) 
    69     Draw = Execute 
    7069 
  • trunk/RBRapier/RBRapier/Renderer/View/Transformations.py

    r634 r702  
    5555            self.Save = Save 
    5656 
    57     def Select(self, context): 
     57    def GLSelect(self, context): 
    5858        if self.Mode: GL.glMatrixMode(self.Mode) 
    5959        if self.Save: GL.glPushMatrix() 
    60         self.Execute(context) 
     60        self.GLExecute(context) 
    6161        if self.Mode: GL.glMatrixMode(GL.GL_MODELVIEW) 
    6262 
    63     def Deselect(self, context): 
     63    def GLDeselect(self, context): 
    6464        if self.Save: 
    6565            if self.Mode: 
     
    7373 
    7474class Composite(Transformations.Composite): 
    75     def Execute(self, context): 
     75    def GLExecute(self, context): 
    7676        for each in self.collection: 
    77             each.Draw(context) 
    78     Draw = Execute 
     77            each.GLExecute(context) 
    7978 
    8079class CompositeMgd(ManagedTransformationMixin, Composite): 
     
    8584 
    8685class Matrix(Transformations.Matrix): 
    87     def Execute(self, context): 
     86    def GLExecute(self, context): 
    8887        GL.glMultMatrixd(transpose(self.matrix).tolist()) 
    89     Draw = Execute 
    9088 
    9189class MatrixMgd(ManagedTransformationMixin, Matrix): 
     
    9391 
    9492class LoadMatrix(Transformations.Matrix): 
    95     def Execute(self, context): 
     93    def GLExecute(self, context): 
    9694        GL.glLoadMatrixd(transpose(self.matrix).tolist()) 
    97     Draw = Execute 
    9895 
    9996class LoadMatrixMgd(ManagedTransformationMixin, LoadMatrix): 
     
    10198 
    10299class Identity(Transformations.Identity): 
    103     def Execute(self, context): 
     100    def GLExecute(self, context): 
    104101        pass # Uh.... don't use this? 
    105     Draw = Execute 
    106102 
    107103class IdentityMgd(ManagedTransformationMixin, Identity): 
     
    109105 
    110106class LoadIdentity(Transformations.Identity): 
    111     def Execute(self, context): 
     107    def GLExecute(self, context): 
    112108        GL.glLoadIdentity() 
    113     Draw = Execute 
    114109 
    115110class LoadIdentityMgd(ManagedTransformationMixin, LoadIdentity): 
     
    117112 
    118113class Translate(Transformations.Translate): 
    119     def Execute(self, context): 
     114    def GLExecute(self, context): 
    120115        GL.glTranslated(*self.Direction[:3]) 
    121     Draw = Execute 
    122116 
    123117class TranslateMgd(ManagedTransformationMixin, Translate): 
     
    125119 
    126120class Scale(Transformations.Scale):