/[gzz]/gzz/gfx/demo/irregu4.py
ViewVC logotype

Diff of /gzz/gfx/demo/irregu4.py

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

revision 1.8 by jvk, Wed Nov 13 14:10:09 2002 UTC revision 1.9 by jvk, Wed Nov 13 16:28:44 2002 UTC
# Line 36  class IrreguScene: Line 36  class IrreguScene:
36          self.xs = 1          self.xs = 1
37          self.ys = 1          self.ys = 1
38          self.scale = 1          self.scale = 1
39            self.shape = 0
40          self.texslicing = 0          self.texslicing = 0
41          self.flags = 255          self.flags = 255
42    
# Line 218  class IrreguScene: Line 219  class IrreguScene:
219          outer_code = code % {"tex" : texRGBA.getTexId(),          outer_code = code % {"tex" : texRGBA.getTexId(),
220                               "color" : "0 0 0 0" }                               "color" : "0 0 0 0" }
221    
222            shape = self.shape
223          texscale = 1.0          texscale = 1.0
224          linewidth = 2          linewidth = 2
225          refsize = 128          refsize = 128
# Line 237  class IrreguScene: Line 239  class IrreguScene:
239              AlphaFunc GEQUAL 1.0              AlphaFunc GEQUAL 1.0
240              """  % texINTENSITY.getTexId()              """  % texINTENSITY.getTexId()
241    
242          self.outer = GLRen.createIrregularEdge(          self.outer = GLRen.createIrregularEdge(shape,
243              texscale, linewidth, refsize, scale_pow,              texscale, linewidth, refsize, scale_pow,
244              border0, border1, texslicing,              border0, border1, texslicing,
245              "0 0 0 1 0 0 0 0", "",              "0 0 0 1 0 0 0 0", "",
# Line 252  class IrreguScene: Line 254  class IrreguScene:
254          if (self.flags & 4) == 0:          if (self.flags & 4) == 0:
255              stdcode += "Disable ALPHA_TEST\n"              stdcode += "Disable ALPHA_TEST\n"
256                            
257          self.inner = GLRen.createIrregularEdge(          self.inner = GLRen.createIrregularEdge(shape,
258              texscale, linewidth, refsize, scale_pow,              texscale, linewidth, refsize, scale_pow,
259              border0, border1, texslicing,              border0, border1, texslicing,
260              ("0 0 0 0 0 0 0 0", "1 1 1 1 0 0 0 0")[self.flags >> 1 & 1], "",              ("0 0 0 0 0 0 0 0", "1 1 1 1 0 0 0 0")[self.flags >> 1 & 1], "",
# Line 260  class IrreguScene: Line 262  class IrreguScene:
262              SLICE_1D + Y_COLOR + (self.flags >> 4 & 1) * INSIDE, stdcode, 1.0)              SLICE_1D + Y_COLOR + (self.flags >> 4 & 1) * INSIDE, stdcode, 1.0)
263    
264          if GL.hasExtension("GL_NV_register_combiners") and 0:          if GL.hasExtension("GL_NV_register_combiners") and 0:
265              self.outer = GLRen.createIrregularEdge(              self.outer = GLRen.createIrregularEdge(shape,
266                  texscale, linewidth, refsize, scale_pow,                  texscale, linewidth, refsize, scale_pow,
267                  border0, border1, texslicing,                  border0, border1, texslicing,
268                  "1 1 1 1 0 0 0 0", "", 3, 0,                  "1 1 1 1 0 0 0 0", "", 3, 0,
# Line 273  class IrreguScene: Line 275  class IrreguScene:
275              1):              1):
276              outer_code = code2 % {"tex" : texINTENSITY.getTexId(),              outer_code = code2 % {"tex" : texINTENSITY.getTexId(),
277                                    "color" : "0 0 0 0" }                                    "color" : "0 0 0 0" }
278              self.outer = GLRen.createIrregularEdge(              self.outer = GLRen.createIrregularEdge(shape,
279                  texscale, linewidth, refsize, scale_pow,                  texscale, linewidth, refsize, scale_pow,
280                  border0, border1, texslicing,                  border0, border1, texslicing,
281                  "1 1 1 1 0 0 0 0", "", 0, 1,                  "1 1 1 1 0 0 0 0", "", 0, 1,
# Line 354  class IrreguScene: Line 356  class IrreguScene:
356          elif "1" <= k <= "9":          elif "1" <= k <= "9":
357              self.flags ^= 1 << int(k) - 1              self.flags ^= 1 << int(k) - 1
358              self.initcode()              self.initcode()
359            elif "F1" <= k <= "F9":
360                self.shape = int(k[1:]) - 1
361                self.initcode()
362                    
363    
364    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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