Author: ArcRiley
Date: 2008-02-07 05:46:43 -0500 (Thu, 07 Feb 2008)
New Revision: 834

Modified:
   trunk/pysoy/src/_datatypes/MaterialList.pxi
   trunk/pysoy/src/materials/Material.pxi
   trunk/pysoy/src/materials/soy.materials.pxd
   trunk/pysoy/src/meshes/Billboard.pxi
   trunk/pysoy/src/meshes/Liquid.pxi
   trunk/pysoy/src/meshes/Shape.pxi
   trunk/pysoy/src/meshes/Sun.pxi
   trunk/pysoy/src/textures/NormalisationCubeMap.pxi
   trunk/pysoy/src/textures/Texture.pxi
   trunk/pysoy/src/textures/soy.textures.pxd
   trunk/pysoy/src/widgets/Canvas.pxi
Log:
#902 - renamed _bind and _unbind functions


Modified: trunk/pysoy/src/_datatypes/MaterialList.pxi
===================================================================
--- trunk/pysoy/src/_datatypes/MaterialList.pxi 2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/_datatypes/MaterialList.pxi 2008-02-07 10:46:43 UTC (rev 
834)
@@ -85,17 +85,17 @@
     _mesh._verts._coreRenderArrayBumpPass()
     self._children.lock()
     for i from 0 <= i < self._children.current :
-      (<soy.materials.Material> self._children.list[i])._bind()
+      (<soy.materials.Material> self._children.list[i])._coreBind()
       _mesh._faces._coreRenderArray(self._ranges[i].offset, 
self._ranges[i].length)
-      (<soy.materials.Material> self._children.list[i])._unbind()
+      (<soy.materials.Material> self._children.list[i])._coreUnBind()
     self._children.unlock()
 
     _mesh._verts._coreRenderArray()
     self._children.lock()
     for i from 0 <= i < self._children.current :
-      (<soy.materials.Material> self._children.list[i])._bind()
+      (<soy.materials.Material> self._children.list[i])._coreBind()
       _mesh._faces._coreRenderArray(self._ranges[i].offset, 
self._ranges[i].length)
-      (<soy.materials.Material> self._children.list[i])._unbind()
+      (<soy.materials.Material> self._children.list[i])._coreUnBind()
     self._children.unlock()
 
 
@@ -118,17 +118,17 @@
     self._children.lock()
     for i from 0 <= i < self._children.current :
         if (<soy.materials.Material> self._children.list[i])._has_bumpmap():
-          (<soy.materials.Material> self._children.list[i])._bindBumpPass()
+          (<soy.materials.Material> self._children.list[i])._coreBindBumpPass()
           _mesh._faces._coreRenderBuffer(self._ranges[i].offset, 
self._ranges[i].length)
-          (<soy.materials.Material> self._children.list[i])._unbindBumpPass()
+          (<soy.materials.Material> 
self._children.list[i])._coreUnBindBumpPass()
     self._children.unlock()
 
     _mesh._verts._coreRenderBuffer()
     self._children.lock()
     for i from 0 <= i < self._children.current :
-      (<soy.materials.Material> self._children.list[i])._bind()
+      (<soy.materials.Material> self._children.list[i])._coreBind()
       _mesh._faces._coreRenderBuffer(self._ranges[i].offset, 
self._ranges[i].length)
-      (<soy.materials.Material> self._children.list[i])._unbind()
+      (<soy.materials.Material> self._children.list[i])._coreUnBind()
     self._children.unlock()
 
 

Modified: trunk/pysoy/src/materials/Material.pxi
===================================================================
--- trunk/pysoy/src/materials/Material.pxi      2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/materials/Material.pxi      2008-02-07 10:46:43 UTC (rev 
834)
@@ -93,7 +93,7 @@
           return 1
       return 0
 
-  cdef void _bind(self) :
+  cdef void _coreBind(self) :
     cdef gl.GLfloat _ambient[4]
     cdef gl.GLfloat _diffuse[4]
     cdef gl.GLfloat _specular[4]
@@ -121,7 +121,7 @@
         gl.glMaterialfv(gl.GL_FRONT, gl.GL_EMISSION, _emissive)
 
     if self._color :
-      (<soy.textures.Texture> self._color)._bind()
+      (<soy.textures.Texture> self._color)._coreBind()
 
     if self._has_bumpmap():
         gl.glEnable(gl.GL_BLEND)
@@ -132,9 +132,9 @@
         gl.glEnable(gl.GL_BLEND)
         gl.glBlendFunc(self._blend_func_src, self._blend_func_dst)
 
-  cdef void _unbind(self) :
+  cdef void _coreUnBind(self) :
     if self._color :
-      (<soy.textures.Texture> self._color)._unbind()
+      (<soy.textures.Texture> self._color)._coreUnBind()
 
     if self._has_bumpmap():
         gl.glDisable(gl.GL_BLEND)
@@ -146,21 +146,21 @@
     if self._shadeless:
         gl.glEnable(gl.GL_LIGHTING)
 
-  cdef void _bindBumpPass(self) :
+  cdef void _coreBindBumpPass(self) :
       if self._has_bumpmap():
 
         if not _normalisation_cube_map._was_created:
             _normalisation_cube_map._generate(32,32)
 
         gl.glActiveTexture(gl.GL_TEXTURE0)
-        (<soy.textures.Texture> self._normal)._bind()
+        (<soy.textures.Texture> self._normal)._coreBind()
 
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_COMBINE_RGB,  gl.GL_REPLACE);
 
         gl.glActiveTexture(gl.GL_TEXTURE1)
-        _normalisation_cube_map._bind()
+        _normalisation_cube_map._coreBind()
 
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_COMBINE);
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_SOURCE0_RGB,  gl.GL_TEXTURE);
@@ -169,14 +169,14 @@
 
         gl.glActiveTexture(gl.GL_TEXTURE0)
 
-  cdef void _unbindBumpPass(self) :
+  cdef void _coreUnBindBumpPass(self) :
       if self._has_bumpmap():
         gl.glActiveTexture(gl.GL_TEXTURE0)
-        (<soy.textures.Texture> self._normal)._unbind()
+        (<soy.textures.Texture> self._normal)._coreUnBind()
         gl.glTexEnvi(gl.GL_TEXTURE_ENV, gl.GL_TEXTURE_ENV_MODE, gl.GL_MODULATE)
 
         gl.glActiveTexture(gl.GL_TEXTURE1)
-        _normalisation_cube_map._unbind()
+        _normalisation_cube_map._coreUnBind()
 
         gl.glActiveTexture(gl.GL_TEXTURE0)
 

Modified: trunk/pysoy/src/materials/soy.materials.pxd
===================================================================
--- trunk/pysoy/src/materials/soy.materials.pxd 2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/materials/soy.materials.pxd 2008-02-07 10:46:43 UTC (rev 
834)
@@ -39,9 +39,9 @@
   cdef int              _blend_func_dst
 
   # C Functions
-  cdef void   _bind(self)
-  cdef void   _unbind(self)
-  cdef void   _bindBumpPass(self)
-  cdef void   _unbindBumpPass(self)
+  cdef void   _coreBind(self)
+  cdef void   _coreUnBind(self)
+  cdef void   _coreBindBumpPass(self)
+  cdef void   _coreUnBindBumpPass(self)
   cdef int    _is_transparent(self)
   cdef int    _has_bumpmap(self)

Modified: trunk/pysoy/src/meshes/Billboard.pxi
===================================================================
--- trunk/pysoy/src/meshes/Billboard.pxi        2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/meshes/Billboard.pxi        2008-02-07 10:46:43 UTC (rev 
834)
@@ -29,7 +29,7 @@
     cdef void _coreRender(self, void* _body):
         cdef float mmat[16]
 
-        self._material._bind()
+        self._material._coreBind()
         gl.glPushMatrix()
         gl.glDisable(gl.GL_LIGHTING)
 
@@ -62,7 +62,7 @@
 
         gl.glEnable(gl.GL_LIGHTING)
         gl.glPopMatrix()
-        self._material._unbind()
+        self._material._coreUnBind()
     property size:
         '''Billboard.size
 

Modified: trunk/pysoy/src/meshes/Liquid.pxi
===================================================================
--- trunk/pysoy/src/meshes/Liquid.pxi   2008-02-07 10:36:56 UTC (rev 833)
+++ trunk/pysoy/src/meshes/Liquid.pxi   2008-02-07 10:46:43 UTC (rev 834)
@@ -99,9 +99,9 @@
     gl.glDisable(gl.GL_FOG)
     #
     #RENDER SURFACE
-    self._liquid_mat._bind()
+    self._liquid_mat._coreBind()
     self._coreRender_surf()
-    self._liquid_mat._unbind()
+    self._liquid_mat._coreUnBind()
     gl.glDisable(gl.GL_STENCIL_TEST)
 
   property size:

Modified: trunk/pysoy/src/meshes/Shape.pxi
===================================================================
--- trunk/pysoy/src/meshes/Shape.pxi    2008-02-07 10:36:56 UTC (rev 833)
+++ trunk/pysoy/src/meshes/Shape.pxi    2008-02-07 10:46:43 UTC (rev 834)
@@ -38,7 +38,7 @@
     _shapeclass = ode.dGeomGetClass(_shape._geomID)
     #
     # Bind the material
-    self._material._bind()
+    self._material._coreBind()
     #
     # Render the specific shape
     if _shapeclass == ode.dSphereClass :
@@ -51,7 +51,7 @@
       self._coreRenderRay(_shape)
     #
     # Unbind the material
-    self._material._unbind()
+    self._material._coreUnBind()
 
   cdef void _coreRenderSphere(self, soy.shapes.Shape _shape) :
     cdef gl.GLUquadricObj* _quadric

Modified: trunk/pysoy/src/meshes/Sun.pxi
===================================================================
--- trunk/pysoy/src/meshes/Sun.pxi      2008-02-07 10:36:56 UTC (rev 833)
+++ trunk/pysoy/src/meshes/Sun.pxi      2008-02-07 10:46:43 UTC (rev 834)
@@ -69,7 +69,7 @@
 
         if self._spike_mat:
             gl.glPolygonOffset(0,0)
-            self._spike_mat._bind()
+            self._spike_mat._coreBind()
 
             angle = 360.0 / self._num_spikes
 
@@ -92,11 +92,11 @@
 
                 gl.glPopMatrix()
 
-            self._spike_mat._unbind()
+            self._spike_mat._coreUnBind()
 
         if self._aura_mat:
             gl.glPolygonOffset(0, -1)
-            self._aura_mat._bind()
+            self._aura_mat._coreBind()
             angle = 360.0 / self._circle_verts
 
             gl.glBegin(gl.GL_TRIANGLE_FAN)
@@ -112,11 +112,11 @@
 
             gl.glEnd()
             
-            self._aura_mat._unbind()
+            self._aura_mat._coreUnBind()
 
         if self._center_mat:
             gl.glPolygonOffset( 0.0, -4)
-            self._center_mat._bind()
+            self._center_mat._coreBind()
             angle = 360.0 / self._circle_verts
 
             gl.glBegin(gl.GL_TRIANGLE_FAN)
@@ -132,7 +132,7 @@
 
             gl.glEnd()
             
-            self._center_mat._unbind()
+            self._center_mat._coreUnBind()
 
 
         gl.glDisable(gl.GL_POLYGON_OFFSET_FILL)

Modified: trunk/pysoy/src/textures/NormalisationCubeMap.pxi
===================================================================
--- trunk/pysoy/src/textures/NormalisationCubeMap.pxi   2008-02-07 10:36:56 UTC 
(rev 833)
+++ trunk/pysoy/src/textures/NormalisationCubeMap.pxi   2008-02-07 10:46:43 UTC 
(rev 834)
@@ -196,13 +196,13 @@
 
 
 
-    cdef void _bind(self):
+    cdef void _coreBind(self):
         py.PyThread_acquire_lock(self._mutex,1)
 
         gl.glEnable(self._textureTarget)
         gl.glBindTexture(self._textureTarget, self._textureID)
 
-    cdef void _unbind(self):
+    cdef void _coreUnBind(self):
         gl.glDisable(self._textureTarget)
         gl.glBindTexture(self._textureTarget, 0)
 

Modified: trunk/pysoy/src/textures/Texture.pxi
===================================================================
--- trunk/pysoy/src/textures/Texture.pxi        2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/textures/Texture.pxi        2008-02-07 10:46:43 UTC (rev 
834)
@@ -111,7 +111,7 @@
       return <char *> self._texels
 
 
-  cdef void _bind(self) :
+  cdef void _coreBind(self) :
     py.PyThread_acquire_lock(self._mutex,1)
     if self._textureTarget == gl.GL_TEXTURE_1D :
       gl.glEnable(gl.GL_TEXTURE_1D)
@@ -163,7 +163,7 @@
     #  raise ValueError('Image size exceeds max texture size, which is %d 
pixels for each side'%max_size)
 
 
-  cdef void _unbind(self) :
+  cdef void _coreUnBind(self) :
     if self._textureTarget == gl.GL_TEXTURE_1D :
       gl.glDisable(gl.GL_TEXTURE_1D)
     elif self._textureTarget == gl.GL_TEXTURE_2D :

Modified: trunk/pysoy/src/textures/soy.textures.pxd
===================================================================
--- trunk/pysoy/src/textures/soy.textures.pxd   2008-02-07 10:36:56 UTC (rev 
833)
+++ trunk/pysoy/src/textures/soy.textures.pxd   2008-02-07 10:46:43 UTC (rev 
834)
@@ -47,8 +47,8 @@
   # C functions
   cdef int          _loadPacket0(self, unsigned char*, int) 
   cdef int          _loadPacket1(self, unsigned char*, int) 
-  cdef void         _bind(self)
-  cdef void         _unbind(self)
+  cdef void         _coreBind(self)
+  cdef void         _coreUnBind(self)
   cdef void         _resize(self, int, int, int, int)
   cdef int          _squareup(self, int)
 
@@ -76,6 +76,6 @@
 cdef class NormalisationCubeMap(Texture):
   cdef int                    _was_created
   cdef void                   _generate(self,int,int)
-  cdef void                   _bind(self)
-  cdef void                   _unbind(self)
+  cdef void                   _coreBind(self)
+  cdef void                   _coreUnBind(self)
 

Modified: trunk/pysoy/src/widgets/Canvas.pxi
===================================================================
--- trunk/pysoy/src/widgets/Canvas.pxi  2008-02-07 10:36:56 UTC (rev 833)
+++ trunk/pysoy/src/widgets/Canvas.pxi  2008-02-07 10:46:43 UTC (rev 834)
@@ -74,7 +74,7 @@
   cdef void _coreRender(self) :
     if not self._texture :
       return
-    (<soy.textures.Texture> self._texture)._bind()
+    (<soy.textures.Texture> self._texture)._coreBind()
 
     if (<soy.textures.Texture> self._texture)._chans & 1:
         gl.glDisable(gl.GL_BLEND)
@@ -105,4 +105,4 @@
         gl.glDisable(gl.GL_BLEND)
 
 
-    (<soy.textures.Texture> self._texture)._unbind()
+    (<soy.textures.Texture> self._texture)._coreUnBind()

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to