Fastextension - renderworld with alpha

Blitz3D Forums/Blitz3D Userlibs/Fastextension - renderworld with alpha

dogzer(Posted 2009) [#1]
Is there a way to use the renderworld() function with a value of transparency using fastextension functions?
Or, is there a way to acomplish something similar?


MikhailV(Posted 2009) [#2]
See example: FastExt_Example_TextureCreateAndRender.bb
You need use RT-texture for it (texture for rendering with flags FE_RENDER and/or FE_ZRENDER).


dogzer(Posted 2009) [#3]
I ran against a little problem. If the texture is bigger than 512x512 things doesnt work quite well.

I also have the FastImage library, is there a way to do renderworld operation realtime into a fastimage image?


Vorderman(Posted 2009) [#4]
I'm using Copyrect to copy from the Backbuffer into the Blitz texture that a FastExt image points to, and it seems to work very well. I'm using a 1024x1024 texture for this.

B3D_texture = CreateTexture(1024,1024)
F_EXT_image = CreateImageEx(B3D_texture,1024,1024,FI_AUTOFLAGS)

;in main loop:
RenderWorld 
CopyRect 0,0,1024,768,0,0,BackBuffer(),TextureBuffer(B3D_texture)


I can then draw the image full-screen with alpha with no problems -

SetAlpha alpha#
SetScale 1.0 , 1.0
DrawImageEx F_EXT_image,0,0