Changeset 369
- Timestamp:
- 11/12/02 15:15:28 (6 years ago)
- Files:
-
- trunk/RBRapier/RBRapier/Renderer/Appearance/Lighting.py (modified) (5 diffs)
- trunk/RBRapier/RBRapier/Renderer/Appearance/PolygonRasterization.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Renderer/Geometry/ArrayTraversal.py (modified) (4 diffs)
- trunk/RBRapier/RBRapier/Renderer/SequenceMgr.py (modified) (4 diffs)
- trunk/RBRapier/RBRapier/Renderer/View/TransformationSettings.py (modified) (2 diffs)
- trunk/RBRapier/RBRapier/Renderer/View/Transformations.py (modified) (5 diffs)
- trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleLister.py (modified) (1 diff)
- trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py (modified) (1 diff)
- trunk/RBRapier/demo/Lightwave/scene.py (modified) (4 diffs)
- trunk/RBRapier/doc/DesignLayout.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBRapier/RBRapier/Renderer/Appearance/Lighting.py
r341 r369 42 42 TwoSided = 0 43 43 ShadeModel = GL.GL_SMOOTH 44 SeperateSpecular = GL.GL_SINGLE_COLOR # GL.GL_SEPARATE_SPECULAR_COLOR45 44 AmbientColor = Vector.ColorVectorProperty('Ambient', (.2, .2, .2, 1.)) 45 46 # The following is not supported at the moment by PyOpenGL -- no constants! 47 #SeperateSpecular = GL.GL_SINGLE_COLOR # GL.GL_SEPARATE_SPECULAR_COLOR 46 48 47 49 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 49 51 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 52 51 def __init__(self, TwoSided=0, LocalViewer=0):52 self.TwoSided = TwoSided53 self.LocalViewer = LocalViewer53 def __init__(self, **kw): 54 for name,value in kw.iteritems(): 55 setattr(self, name, value) 54 56 55 57 def Select(self, context): … … 59 61 GL.glLightModel(GL.GL_LIGHT_MODEL_TWO_SIDE, self.TwoSided) 60 62 GL.glLightModel(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, self.LocalViewer) 61 GL.glLightModel(GL.GL_LIGHT_MODEL_COLOR_CONTROL, self.SeperateSpecular) 63 64 # The following is not supported at the moment by PyOpenGL -- no constants! 65 #GL.glLightModel(GL.GL_LIGHT_MODEL_COLOR_CONTROL, self.SeperateSpecular) 62 66 63 67 def Deselect(self, context): … … 85 89 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 90 87 def __init__(self, LightNumber=None ):91 def __init__(self, LightNumber=None, **kw): 88 92 self.LightNumber = LightNumber 93 for name,value in kw.iteritems(): 94 setattr(self, name, value) 89 95 90 96 def Select(self, context): … … 130 136 131 137 SpotDirection = Vector.UnitVector3Property('SpotDirection', (0., 0., -1.)) 132 SpotExponent = None #0.0133 SpotCutoff = None #180.0138 SpotExponent = 0.0 139 SpotCutoff = 180.0 134 140 135 141 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Renderer/Appearance/PolygonRasterization.py
r341 r369 43 43 #~ Public Methods 44 44 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 46 def __init__(self, FrontFace=None, CullFace=None): 47 if FrontFace is not None: self.FrontFace = FrontFace 48 if CullFace is not None: self.CullFace = CullFace 45 49 46 50 def Select(self, context): trunk/RBRapier/RBRapier/Renderer/Geometry/ArrayTraversal.py
r351 r369 42 42 'tristrip': GL.GL_TRIANGLE_STRIP, 43 43 } 44 _ReversePrimitiveMap = dict([(y,x) for (x,y) in _PrimitveMap.iteritems()])45 44 45 _PrimitveStatsMap = { 46 GL.GL_POINTS: ('points', lambda count: count), 47 48 GL.GL_LINES: ('lines', lambda count: count/2), 49 GL.GL_LINE_STRIP: ('lines', lambda count: count-1), 50 51 GL.GL_TRIANGLES: ('triangles', lambda count: count/3), 52 GL.GL_TRIANGLE_FAN: ('triangles', lambda count: count-2), 53 GL.GL_TRIANGLE_STRIP: ('triangles', lambda count: count-2), 54 } 55 46 56 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 57 #~ Definitions … … 49 59 50 60 def GenerateStatistics(self, context): 51 context.Statistics[self.PrimitiveName] = self._PrimitiveCount + context.Statistics.get(self.PrimitiveName, 0) 61 StatName, StatResults = self._StatsData 62 try: 63 context.Statistics[StatName] += StatResults 64 except KeyError: 65 context.Statistics[StatName] = StatResults 52 66 53 67 class RangedTraversal(object): … … 66 80 def __init__(self, primitive, rangecollection): 67 81 self.primitive = _PrimitveMap.get(primitive, primitive) 68 self.PrimitiveName = _ReversePrimitiveMap.get(self.primitive, str(primitive))69 82 self.rangecollection = rangecollection 70 83 84 StatName, StatCalc = _PrimitveStatsMap[self.primitive] 85 StatResults = 0 71 86 for RangeStart, RangeEnd in self.datacollection: 72 self._PrimitiveCount += RangeEnd - RangeStart 87 StatResults += StatCalc(RangeEnd - RangeStart) 88 self._StatsData = StatName, StatResults 73 89 74 90 GenerateStatistics = GenerateStatistics … … 104 120 def __init__(self, primitive, datacollection, format=None): 105 121 self.primitive = _PrimitveMap.get(primitive, primitive) 106 self.PrimitiveName = _ReversePrimitiveMap.get(self.primitive, str(primitive))107 122 if format is None: format = self._DefaultFormat 108 123 self.datacollection = [Numeric.asarray(data, format) for data in datacollection] 109 124 125 StatName, StatCalc = _PrimitveStatsMap[self.primitive] 126 StatResults = 0 110 127 for each in self.datacollection: 111 self._PrimitiveCount += len(each) 128 StatResults += StatCalc(len(each)) 129 self._StatsData = StatName, StatResults 112 130 113 131 self._glDrawElements = self._glDrawElementsCall[format] trunk/RBRapier/RBRapier/Renderer/SequenceMgr.py
r362 r369 43 43 class SequenceBase(object): 44 44 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 #~ Constants / Variables / Etc. 46 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 48 SetupPhase = -2 49 ManagerPhase = -1 50 GeneralPhase = 0 51 PostPhase = 1 52 53 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 54 #~ Public Methods 46 55 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 53 62 self.OnEndExecute = SubjectList() 54 63 55 def AddElement(self, Element, priority=0): 64 def AddSetupElement(self, Element, PriorityDelta=0): 65 self._AddElement(Element, self.SetupPhase + PriorityDelta) 66 67 def AddManagerElement(self, Element, PriorityDelta=0): 68 self._AddElement(Element, self.ManagerPhase + PriorityDelta) 69 70 def AddPostElement(self, Element, PriorityDelta=0): 71 self._AddElement(Element, self.PostPhase + PriorityDelta) 72 73 def AddElement(self, Element, priority=None): 74 if priority is None: 75 priority = self.GeneralPhase 76 self._AddElement(Element, priority) 77 78 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 80 def RemoveElement(self, Element): 81 self.Elements[:] = [x for x in self.Elements if x[-1] != Element] 82 self.OnRemoveElement.Update(Element) 83 84 def Execute(self, context): 85 self.OnBeginExecute.Update(context) 86 for priority, elementfn, element in self.Elements: 87 if getattr(element, 'Active', 1): 88 elementfn(context) 89 self.OnEndExecute.Update(context) 90 Draw = Execute 91 92 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 93 #~ Protected Methods 94 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 96 def _AddElement(self, Element, priority=0): 56 97 if priority <= 0: 57 98 idx = bisect.bisect_right(self.Elements, (priority, _MatchAll, _MatchAll)) … … 71 112 self.OnAddElement.Update(Element) 72 113 73 def RemoveElement(self, Element):74 self.Elements[:] = [x for x in self.Elements if x[-1] != Element]75 self.OnRemoveElement.Update(Element)76 77 def Execute(self, context):78 self.OnBeginExecute.Update(context)79 for priority, elementfn, element in self.Elements:80 if getattr(element, 'Active', 1):81 elementfn(context)82 self.OnEndExecute.Update(context)83 Draw = Execute84 85 114 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 86 115 87 116 class Sequence(SequenceBase): 117 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 #~ Public Methods 119 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 88 121 def __init__(self, ManagerAttribute=0, ManageBuffer=0): 89 122 SequenceBase.__init__(self) … … 92 125 self.AttributeMgr = AttributeMgr.AttributeEffector() 93 126 else: self.AttributeMgr = AttributeMgr.AttributeTracker() 94 self.Add Element(self.AttributeMgr,-1)127 self.AddManagerElement(self.AttributeMgr) 95 128 96 129 if ManageBuffer: 97 130 self.BufferMgr = BufferMgr.BufferEffector() 98 131 else: self.BufferMgr = BufferMgr.BufferTracker() 99 self.Add Element(self.BufferMgr,-1)132 self.AddManagerElement(self.BufferMgr) 100 133 101 134 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Renderer/View/TransformationSettings.py
r341 r369 50 50 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51 51 52 class PerspectiveHint(object) 52 class PerspectiveHint(object): 53 53 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 54 #~ Constants / Variables / Etc. … … 56 56 57 57 AttributeChange = AttributeChangeElement(GL.GL_TRANSFORM_BIT) 58 PerspectiveHint = GL _DONT_CARE58 PerspectiveHint = GL.GL_DONT_CARE 59 59 60 60 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trunk/RBRapier/RBRapier/Renderer/View/Transformations.py
r341 r369 48 48 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 49 50 def __init__(self, Mode=None, Save=0 ):51 Transformations.Composite.__init__(self)50 def __init__(self, Mode=None, Save=0, *args, **kw): 51 super(ManagedTransformationMixin, self).__init__(*args, **kw) 52 52 self.Mode = Mode 53 53 self.Save = Save … … 59 59 if self.Mode: GL.glMatrixMode(GL.GL_MODELVIEW) 60 60 61 def Deselect(self ):61 def Deselect(self, context): 62 62 if self.Save: 63 63 if self.Mode: … … 82 82 83 83 class Matrix(Transformations.Matrix): 84 def Draw(self, context):84 def Execute(self, context): 85 85 GL.glMultMatrixd(transpose(self.matrix).tolist()) 86 86 Draw = Execute 87 87 88 88 class LoadMatrix(Transformations.Matrix): 89 def Draw(self, context):89 def Execute(self, context): 90 90 GL.glLoadMatrixd(transpose(self.matrix).tolist()) 91 91 Draw = Execute 92 92 93 93 class Identity(Transformations.Identity): 94 def Draw(self, context):94 def Execute(self, context): 95 95 pass # Uh.... don't use this? 96 96 Draw = Execute 97 97 98 98 class LoadIdentity(Transformations.Identity): 99 def Draw(self, context):99 def Execute(self, context): 100 100 GL.glLoadIdentity() 101 101 Draw = Execute 102 102 103 103 class Translate(Transformations.Translate): 104 def Draw(self, context):104 def Execute(self, context): 105 105 GL.glTranslated(*self.Direction[:3]) 106 106 Draw = Execute 107 107 108 108 class Scale(Transformations.Scale): 109 def Draw(self, context):109 def Execute(self, context): 110 110 GL.glScaled(*self.Scale[:3]) 111 111 Draw = Execute 112 112 113 113 class Rotate(Transformations.Rotate): 114 def Draw(self, context):114 def Execute(self, context): 115 115 GL.glRotated(self.Angle, *self.Axis[:3]) 116 116 Draw = Execute 117 117 118 118 class Quaternion(Quaternion.Quaternion): 119 def Draw(self, context):119 def Execute(self, context): 120 120 GL.glMultMatrixd(transpose(self.asArray4x4()).tolist()) 121 121 Draw = Execute 122 122 123 123 class LinearMappingMatrix(Transformations.LinearMappingMatrix): 124 def Draw(self, context):124 def Execute(self, context): 125 125 GL.glMultMatrixd(transpose(self.asArray4x4()).tolist()) 126 126 Draw = Execute 127 127 128 128 class LookAt(Transformations.LookAt): 129 def Draw(self, context):129 def Execute(self, context): 130 130 args= self.Eye.tolist() + self.Center.tolist() + self.Up.tolist() 131 131 GLU.gluLookAt(*args) … … 133 133 134 134 class SphericalLookAt(Transformations.SphericalLookAt): 135 def Draw(self, context):135 def Execute(self, context): 136 136 args= self.Eye.tolist() + self.Center.tolist() + self.Up.tolist() 137 137 GLU.gluLookAt(*args) … … 139 139 140 140 class Shear(Transformations.Shear): 141 def Draw(self, context):141 def Execute(self, context): 142 142 GL.glMultMatrixd(transpose(self.matrix).tolist()) 143 143 Draw = Execute 144 144 145 145 class Skew(Transformations.Skew): 146 def Draw(self, context):146 def Execute(self, context): 147 147 GL.glMultMatrixd(transpose(self.matrix).tolist()) 148 148 Draw = Execute 149 149 150 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 151 #~ Title 152 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 153 150 154 class Orthographic(Projections.Orthographic): 151 def Draw(self, context):155 def Execute(self, context): 152 156 GL.glOrtho(self.Left, self.Right, self.Bottom, self.Top, self.Near, self.Far) 153 157 Draw = Execute 154 158 155 159 class Frustum(Projections.Frustum): 156 def Draw(self, context):160 def Execute(self, context): 157 161 GL.glFrustum(self.Left, self.Right, self.Bottom, self.Top, self.Near, self.Far) 158 162 Draw = Execute 159 163 160 164 class Perspective(Projections.Perspective): 161 def Draw(self, context):165 def Execute(self, context): 162 166 GL.glFrustum(self.Left, self.Right, self.Bottom, self.Top, self.Near, self.Far) 163 167 Draw = Execute trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleLister.py
r366 r369 28 28 result = [] 29 29 if TaskProgress: 30 TaskProgress.SetProgressRange(0, len(mesh.Faces)/.9)30 subtask = TaskProgress.NewSubtask('Triangle mesh listing', 0, len(mesh.Faces)/.9) 31 31 mesh.Faces.sort() 32 TaskProgress.Percentage = 0.132 subtask.Percentage = 0.1 33 33 for face in mesh.Faces: 34 34 result.extend(face.v) 35 TaskProgress+= 135 subtask += 1 36 36 else: 37 37 mesh.Faces.sort() trunk/RBRapier/RBRapier/Tools/Geometry/Analysis/TriangleStripifier.py
r366 r369 434 434 CleanFacesTask = 0 435 435 if TaskProgress: 436 StripifyTask = TaskProgress.NewSubtask(" Stripify triangles", 0, len(mesh.Faces))436 StripifyTask = TaskProgress.NewSubtask("Triangle mesh stripification", 0, len(mesh.Faces)) 437 437 if bCleanFaces: 438 438 CleanFacesTask = TaskProgress.NewSubtask("Clean faces", 0, len(mesh.Faces)) trunk/RBRapier/demo/Lightwave/scene.py
r366 r369 32 32 from RBRapier.Renderer.Environment import FragmentTests 33 33 from RBRapier.Renderer.View import Viewport 34 from RBRapier.Renderer.View import Transformations 35 from RBRapier.Renderer.View import TransformationSettings 36 from RBRapier.Renderer.Appearance import PolygonRasterization 37 from RBRapier.Renderer.Appearance import Lighting 34 38 35 39 from RBRapier.Formats.Lightwave import MeshedObject … … 52 56 53 57 self.ClearColor = Buffers.ClearColor((0.,0.,0.,0.)) 54 self.Sequence.AddElement(self.ClearColor.Execute, -2) 58 self.Sequence.AddSetupElement(self.ClearColor.Execute) 59 55 60 self.ClearDepth = Buffers.ClearDepth(1.) 56 self.Sequence.AddElement(self.ClearDepth.Execute, -2) 61 self.Sequence.AddSetupElement(self.ClearDepth.Execute) 62 57 63 self.DepthTest = FragmentTests.DepthTest() 58 self.Sequence.AddElement(self.DepthTest.Select, -1) 64 self.Sequence.AddSetupElement(self.DepthTest.Select) 65 66 self.Normalization = TransformationSettings.Normalization() 67 self.Sequence.AddSetupElement(self.Normalization.Select) 68 69 self.Culling = PolygonRasterization.FaceCulling() 70 self.Sequence.AddSetupElement(self.Culling.Select) 71 72 self.Lighting = Lighting.LightingModel() 73 self.Sequence.AddElement(self.Lighting.Select) 74 75 self.Lights = [] 76 self.Lights.append(Lighting.Light(0)) 77 self.Lights[0].Specular = 0., 0., 1. 78 self.Lights[0].Diffuse = .3, .3, .4 79 self.Lights.append(Lighting.Light(1)) 80 self.Lights[1].Specular = 1., 0., 0. 81 self.Lights[1].Diffuse = .4, .3, .3 82 self.Lights.append(Lighting.SpotLight(2, SpotCutoff=10., SpotExponent=16.)) 83 self.Lights[2].Position = (0., .4, 0., 1.) 84 self.Lights[2].SpotDirection = (0., -1., 0., 0.) 85 86 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 87 60 88 self.Viewport = Viewport.Viewport() 61 self.Sequence.AddElement(self.Viewport, -2) 89 self.Sequence.AddElement(self.Viewport.Execute) 90 91 self.Projection = Transformations.ManagedComposite(GL.GL_PROJECTION) 92 self.Sequence.AddElement(self.Projection.Select) 93 self.Sequence.AddPostElement(self.Projection.Deselect) 94 95 self.Projection.Add(Transformations.LoadIdentity()) 96 self.Projection.Perspective = Transformations.Perspective(8) 97 self.Projection.Add(self.Projection.Perspective) 98 self.Projection.Translate = Transformations.Translate((0, -0.05, -1.5)) 99 self.Projection.Add(self.Projection.Translate) 100 self.Projection.Rotate = Transformations.Rotate(30, (1, 0, 0)) 101 self.Projection.Add(self.Projection.Rotate) 102 103 self.Sequence.AddElement(self.Lights[2].Select) 104 105 self.ModelView = Transformations.ManagedComposite() 106 self.ModelView.Add(Transformations.LoadIdentity()) 107 self.ModelView.Rotate = Transformations.Rotate(60, (0, 1, 0)) 108 self.ModelView.Rotate.AngleDelta = 1. 109 self.ModelView.Add(self.ModelView.Rotate) 110 self.Sequence.AddElement(self.ModelView.Select) 111 self.Sequence.AddElement(self.Lights[0].Select) 112 self.Sequence.AddPostElement(self.ModelView.Deselect) 113 114 self.LightXForm = Transformations.ManagedComposite(Save=1) 115 self.LightXForm.Rotate = Transformations.Rotate(60, (0, 1, 0)) 116 self.LightXForm.Rotate.AngleDelta = -6. 117 self.LightXForm.Add(self.LightXForm.Rotate) 118 self.Sequence.AddElement(self.LightXForm.Select) 119 self.Sequence.AddElement(self.Lights[1].Select) 120 self.Sequence.AddElement(self.LightXForm.Deselect) 62 121 63 122 self.GeoObj = self.LigthwaveLWO('data/ki162a.lwo', 1, 3) … … 67 126 #self.GeoObj = self.LigthwaveLWO('data/SIM.LWO', 1, 3) 68 127 69 #GL.glEnable(GL.GL_NORMALIZE)70 #GL.glEnable(GL.GL_COLOR_MATERIAL)71 GL.glEnable(GL.GL_LIGHTING)72 GL.glEnable(GL.GL_LIGHT0)73 GL.glEnable(GL.GL_CULL_FACE)74 75 #for each in self.Sequence.Elements: print each76 77 128 def StripColoredLigthwaveLWO(self, name, *args, **kw): 78 129 builder = MeshedObject.MeshedObjectBuilder() 130 builder.GeoObjectFactory = GeoObject.DefaultGeoObject 79 131 builder.IndexedTraversal = ArrayTraversal.ColoredIndexedCollectionTraversal 80 132 GeoObj = builder.Build(open(name, 'rb'), *args, **kw) … … 89 141 return GeoObj 90 142 91 frustum = (-1,1,-1,1,1,100) 92 xlate = (0,0,-30) 93 rotate = (30, 1,0,0) 143 Animate = 1 94 144 def Render(self, subject, canvas): 145 # Recalculate the viewport 95 146 self.Viewport.SetRectangle(canvas.GetClientRect().asTuple()) 96 97 GL.glMatrixMode(GL.GL_PROJECTION) 98 GL.glLoadIdentity() 99 # Tiny 100 #GL.glOrtho(-.01,.01,-0.005,.01,-0.1,0.1) 101 102 # Small 103 #GL.glOrtho(-.1,.1,-.1,.2,-1,1) 104 105 GL.glFrustum(-.05,.05,-.025,.075,1,10) 106 GL.glTranslatef(0, 0, -2.5) 107 GL.glRotatef(30, 1, 0, 0) 108 109 # Medium 110 #GL.glOrtho(-0.5,0.5,-0.25,0.75,-1,1) 111 112 # Large 113 #GL.glFrustum(*self.frustum) 114 #GL.glTranslatef(*self.xlate) 115 #GL.glRotatef(*self.rotate) 116 117 GL.glMatrixMode(GL.GL_MODELVIEW) 118 GL.glRotatef(1., 0, 1, 0) 119 #GL.glRotatef(.7, 1, 0, 0) 120 147 self.Projection.Perspective.AspectRatio = self.Viewport.AspectRatio 148 # Draw the stuffage! =) 121 149 self.Sequence.Execute(None) 122 #print self.Sequence.Statistics 150 # Animation 151 if self.Animate: 152 self.ModelView.Rotate.Angle += self.ModelView.Rotate.AngleDelta 153 self.LightXForm.Rotate.Angle += self.LightXForm.Rotate.AngleDelta trunk/RBRapier/doc/DesignLayout.xml
r341 r369 108 108 109 109 <package name='Managers'> 110 <module name='States'> 111 Both client and global states 112 Uses a checkpoint model 113 </module> 114 <module name='Attributes'> 115 Uses a checkpoint model 116 </module> 117 <module name='BufferClearing'> 118 Most effecient when clearing multiple buffers together... 119 </module> 110 <module name='States'/> 111 <module name='ClientStates'/> 112 <module name='Attributes'/> 113 <module name='BufferClearing'/> 120 114 <module name='Display List Cache' /> 121 115 </package>
