/[gzz]/gzz/gfx/libpaper/textures.py
ViewVC logotype

Diff of /gzz/gfx/libpaper/textures.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by Vegai, Thu Nov 14 13:44:54 2002 UTC revision 1.37 by Vegai, Thu Nov 14 14:59:16 2002 UTC
# Line 10  Line 10 
10  #       OFFS3  #       OFFS3
11    
12    
13    import gzz.gfx.gl
14  import java  import java
15  from math import exp  from math import exp
16    
# Line 49  class NamedTexture: Line 50  class NamedTexture:
50    
51    
52  initialized = 0  initialized = 0
53  def init():  def init(texture_components, texture_format):
54      """Creates and returns textures.""" # XXX need more doc here      """Creates and returns textures.""" # XXX need more doc here
55      global initialized      global initialized
56      initialized = 1      initialized = 1
# Line 343  def getPaperTexture(type, gen): Line 344  def getPaperTexture(type, gen):
344    
345  class Textures:  class Textures:
346      textures = None      textures = None
347        paperopt = gzz.gfx.gl.PaperOptions.instance()
348      def __init__(self, seed):      def __init__(self, seed):
349            text_comps, text_form = texture_components, texture_format
350          if not self.textures:          if not self.textures:
351              self.textures = init()              
352              print "DEBUG: Textures created"              if not self.paperopt.use_opengl_1_1:
353                    text_comps, text_form = 2, 'LUMINANCE_ALPHA'
354    
355                self.textures = init(text_comps, text_form)
356                print "Textures created: components: %d, format: %s" % (text_comps, text_form)
357                
358          rnd = java.util.Random(seed)          rnd = java.util.Random(seed)
359    
360          hyper = rnd.nextGaussian()*5          hyper = rnd.nextGaussian()*5

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26