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

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

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

revision 1.47 by tjl, Fri Nov 8 10:46:49 2002 UTC revision 1.48 by jvk, Sat Nov 9 18:32:52 2002 UTC
# Line 516  def getIrregu(invert, x0, y0, x1, y1, ou Line 516  def getIrregu(invert, x0, y0, x1, y1, ou
516                   vecmul(vecadd((x1,y1,0,1),nvec), w1)                   vecmul(vecadd((x1,y1,0,1),nvec), w1)
517                   ]                   ]
518    
519      texcoords = [ [ vecmul((x0,y0,0,texscale), w0),      if 1:
520                      vecmul((x0,y0,0,texscale), w1),          texcoords = [ [ vecmul((x0,y0,0,texscale), w0),
521                      vecmul((x1,y1,0,texscale), w0),                          vecmul((x0,y0,0,texscale), w1),
522                      vecmul((x1,y1,0,texscale), w1)                          vecmul((x1,y1,0,texscale), w0),
523                      ]                          vecmul((x1,y1,0,texscale), w1)
524                    ]                          ]
525                          ]
526        else:
527            texcoords = [ [ vecmul((x0-nvec[0],y0-nvec[1],0,texscale), w0),
528                            vecmul((x0+nvec[0],y0+nvec[1],0,texscale), w1),
529                            vecmul((x1-nvec[0],y1-nvec[1],0,texscale), w0),
530                            vecmul((x1+nvec[0],y1+nvec[1],0,texscale), w1)
531                            ]
532                          ]
533    
534      angle = atan2(y1 - y0, x1 - x0) - texangle      angle = atan2(y1 - y0, x1 - x0) - texangle
535    
# Line 543  def getIrregu(invert, x0, y0, x1, y1, ou Line 551  def getIrregu(invert, x0, y0, x1, y1, ou
551      PushAttrib ENABLE_BIT TEXTURE_BIT      PushAttrib ENABLE_BIT TEXTURE_BIT
552    
553      BindTexture TEXTURE_2D %(texid)s      BindTexture TEXTURE_2D %(texid)s
554        #TexParameter TEXTURE_2D TEXTURE_MAX_ANISOTROPY_EXT 2.0
555      TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR      TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR
556      TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR      TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
557      Enable TEXTURE_2D      Enable TEXTURE_2D

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

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