mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
small fixes, still some probs...
This commit is contained in:
@@ -51,7 +51,7 @@ def load_textures():
|
||||
glBindTexture(GL_TEXTURE_2D, textures[0])
|
||||
# create texture with freej layer size
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, layer.geo.w, layer.geo.h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, "" );
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, None );
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ def load_textures():
|
||||
glBindTexture(GL_TEXTURE_2D, textures[0])
|
||||
# create texture with freej layer size
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, layer.geo.w, layer.geo.h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, "" );
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, None );
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ def init():
|
||||
|
||||
def load_textures():
|
||||
|
||||
# nehe texture
|
||||
texturefile = os.path.join('data','nehe.bmp')
|
||||
# here set image file
|
||||
texturefile = os.path.join('..','..','..','doc','ipernav.png')
|
||||
textureSurface = pygame.image.load(texturefile)
|
||||
textureData = pygame.image.tostring(textureSurface, "RGBX", 1)
|
||||
|
||||
@@ -71,7 +71,7 @@ def load_textures():
|
||||
# freej texture
|
||||
glBindTexture(GL_TEXTURE_2D, textures[1])
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, layer.geo.w, layer.geo.h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, "" );
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, None );
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ def init():
|
||||
|
||||
def load_textures():
|
||||
|
||||
# nehe texture
|
||||
texturefile = os.path.join('data','nehe.bmp')
|
||||
# here set image file
|
||||
texturefile = os.path.join('..','..','..','doc','ipernav.png')
|
||||
textureSurface = pygame.image.load(texturefile)
|
||||
textureData = pygame.image.tostring(textureSurface, "RGBX", 1)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ def init():
|
||||
def load_textures():
|
||||
global textures
|
||||
# nehe texture
|
||||
texturefile = os.path.join('data','flower.png')
|
||||
texturefile = os.path.join('..','..','..','doc','ipernav.png')
|
||||
textureSurface = pygame.image.load(texturefile)
|
||||
textureData = pygame.image.tostring(textureSurface, "RGBX", 1)
|
||||
|
||||
@@ -95,7 +95,7 @@ def load_textures():
|
||||
glBindTexture(GL_TEXTURE_2D, textures[idx])
|
||||
lay = layers[idx]
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, lay.geo.w, lay.geo.h, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, "" );
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, None );
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user