6 |
from gfx.libpaper.texcoords import TexGenXYRepeatUnit |
from gfx.libpaper.texcoords import TexGenXYRepeatUnit |
7 |
from gfx.libpaper.params import * |
from gfx.libpaper.params import * |
8 |
from gzz.vob.vobs import SolidBgVob |
from gzz.vob.vobs import SolidBgVob |
9 |
|
import gfx.libutil.texture |
10 |
|
|
11 |
import gfx.libpaper.texcomb_NV1X |
import gfx.libpaper.texcomb_NV1X |
12 |
import gfx.libpaper.texcomb_NV2X |
import gfx.libpaper.texcomb_NV2X |
143 |
print "Warning: not returning optimized paper because" |
print "Warning: not returning optimized paper because" |
144 |
print "GL_SGIS_generate_mipmap extension is required but not available" |
print "GL_SGIS_generate_mipmap extension is required but not available" |
145 |
return pap |
return pap |
146 |
if GL.workaroundStupidBuggyAtiDrivers: |
if GL.workaroundStupidBuggyAtiDrivers: |
147 |
print "Warning: not returning optimized paper because" |
print "Warning: not returning optimized paper because" |
148 |
print "copyTexImage2D has problems on ATI drivers" |
print "copyTexImage2D has problems on ATI drivers" |
149 |
return pap |
return pap |
170 |
BindTexture TEXTURE_2D %(texid)s |
BindTexture TEXTURE_2D %(texid)s |
171 |
TexParameter TEXTURE_2D TEXTURE_MAX_ANISOTROPY_EXT 2 |
TexParameter TEXTURE_2D TEXTURE_MAX_ANISOTROPY_EXT 2 |
172 |
TexParameter TEXTURE_2D GENERATE_MIPMAP_SGIS TRUE |
TexParameter TEXTURE_2D GENERATE_MIPMAP_SGIS TRUE |
173 |
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER NEAREST |
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR |
174 |
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER NEAREST |
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR |
175 |
BindTexture TEXTURE_2D 0 |
BindTexture TEXTURE_2D 0 |
176 |
""" % locals()) |
""" % locals()) |
177 |
print "READ: ", 0, vs.getSize().height-1-s, s, s |
print "READ: ", 0, vs.getSize().height-1-s, s, s |
178 |
tex.copyTexImage2D(w.getRenderingSurface(), "FRONT", "TEXTURE_2D", 0, |
tex.copyTexImage2D(w.getRenderingSurface(), "FRONT", "TEXTURE_2D", 0, |
179 |
"RGB", 0, vs.getSize().height-1-s, |
"RGB", 0, vs.getSize().height-1-s, |
180 |
s, s, 0) |
s, s, 0) |
181 |
|
|
182 |
|
gfx.libutil.texture.printTex(tex.getTexId()) |
183 |
|
|
184 |
npap = PaperHanger() |
npap = PaperHanger() |
185 |
npap.setNPasses(1) |
npap.setNPasses(1) |