Hi, would you mind posting some runnable example code I can copy/paste into blitz3d 1108?
Of course :)
Const tex_color = 1 ; Color texture
Const tex_alpha = 2 ; Alpha texture (Include alpha channel data)
Const tex_mask = 4 ; Masked texture (black is transparent)
Const tex_mipmap = 8 ; Create texture mipmaps
Const tex_clampu = 16 ; Restrict U texture coords from "bleeding over"
Const tex_clampv = 32 ; Restrict V texture coords from "bleeding over"
Const tex_envshpere = 64 ; Load texture as a spherical environment map
Const tex_vram = 256 ; Force texture graphics to vram
Const tex_highcolor = 512 ; Forces texture graphics to be 32-bits per pixel
Const tex_mipmap_OFF = 1024 ; Turn mipmap OFF
Graphics3D 800,600,0,2
SetBuffer BackBuffer()
ClearTextureFilters()
light=CreateLight()
RotateEntity light,45,45,0
cube=CreateCube()
w=256
tex1=CreateTexture(w,w, tex_color, tex_mipmap_OFF)
For i=0 To 10000
Color Rand(255),Rand(255),Rand(255)
Plot Rand(0,255),Rand(0,255)
Next
EntityTexture cube, tex1
CopyRect 0, 0, 256, 256, 0, 0, BackBuffer(), TextureBuffer(tex1)
camera=CreateCamera()
CameraRange camera,0.001,50
TranslateEntity camera,0,0,-1.4
While KeyHit(1)=0
TurnEntity cube,0,.1,0
RenderWorld()
Flip
Delay 10
Wend
End
Hi, you need to use 'Or' to combine multiple flags together (which sounds very counter-intuitive!) For example, this works for me:
tex1=CreateTexture(w,w, tex_color Or tex_mipmap_OFF)
By using a comma here, you're actually creating a 1024 'frame' texture!
You can also use plain additon to combine flags, ie: '+', but then you have to be careful to only use each flag exactly once. Still, I think this is what most b3d coders used, and it makes a bit more logical sense I guess.
In retrospect, I think Blitz3D should have had '|' and '&' and maybe '~' operators too.
Bye!
Mark