Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

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

(2 edits)

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

Hi Mark, 

I replaced the code: 

tex1=CreateTexture(w,w, tex_color, tex_mipmap_OFF) 

Per:

tex1=CreateTexture(w,w, tex_color Or tex_mipmap_OFF) 

Nothing changed, and then by: tex1=CreateTexture(w,w, tex_color + tex_mipmap_OFF) 

And it had no effect, it remains blurred. Thanks for your attention.

(1 edit)

Hi,

I installed from scratch with blitz3d1109setup.exe, replaced the line of code that was broken and it worked!

Can you try reinstalling Blitz3D from scratch and trying again?

But seriously dude, you should really be using Unity - it's free and it can do anything Blitz3D can do and much more!

Hello, 

I uninstalled the "Blitz3DSetup1108" version and installed "Blitz3DSetup1109" and it worked!!, thank you very much for your help, I am very grateful. 

I prefer Blitz3D to Unity because it's light, fast and powerful, it works on modest machines and the Basic language is wonderful!, thanks.

Yay, good news!

 It kind of suggests this fix has never been in a release before 1109...still, it's there now.