[Gambas-user] glu.buildmipmaps error

piet at ...3034... piet at ...3034...
Sun Nov 18 14:40:44 CET 2012


 

once again with fancy code :D 

Hi, 

I'm using opengl for 2D
Projektion with textures. 

running following code rises me an error:
"Speicherzugriffsfehler(11)" (which means sth. like memory-access-error)


 ---------------------- 

Dim xx1, xx2 as Image 

Dim textures as new
Integer[2] 

gl.MatrixMode(gl.PROJECTION)
gl.LoadIdentity
gl.Ortho(0,
screen.Width, screen.Height, 0, 0,
1)
gl.MatrixMode(gl.MODELVIEW)
gl.Disable(gl.DEPTH_TEST)
gl.Enable(gl.TEXTURE_2D)


textures = gl.GenTextures(2) 

xx1 =
Image.Load("xx1.png")
Gl.BindTexture(Gl.TEXTURE_2D,
textures[0])
Glu.Build2DMipmaps(xx1) ' this is where the error appears


xx2 = Image.Load("xx2.png")
gl.BindTexture(gl.TEXTURE_2D,
textures[1])
Glu.Build2DMipmaps(xx2)

Gl.TexParameteri(Gl.TEXTURE_2D,
Gl.TEXTURE_MIN_FILTER,
Gl.LINEAR_MIPMAP_NEAREST)
Gl.TexParameteri(Gl.TEXTURE_2D,
Gl.TEXTURE_MAG_FILTER, Gl.LINEAR) 

---------------------------- 

Thank
you v. m. for help, 

Piet 
 



More information about the User mailing list