Rendering To ImageBuffer

Blitz3D Forums/Blitz3D Programming/Rendering To ImageBuffer

Whats My Face(Posted 2009) [#1]
I was wondering how you could render to the image buffer. RenderWorld seems to only render to the back buffer regardless of which buffer I have set.


Warner(Posted 2009) [#2]
Yes, I believe you can only render to the backbuffer. However, after that, you can CopyRect it onto an imagebuffer.


xtremegamr(Posted 2009) [#3]
Yep, you can only render to the BackBuffer.

I'm curious, though; why would you want to render to an ImageBuffer?

EDIT: It's in the Blitz Help Docs, too. Here's an excerpt from the help file for RenderWorld:


Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( ). Every camera not hidden by HideEntity( ) or with a CameraProjMode( ) of 0 is rendered. Rendering to other buffers is currently not supported by Blitz3D.




jfk EO-11110(Posted 2009) [#4]
People often want to render to a texture, however you'll need to render to the backbuffer and then copyrect to the texturebuffer, so if you want to "render to a texture", make sure to use Texture flag 256, so the transfer from backbuffer to texturebuffer is faster than with standard textures.


Whats My Face(Posted 2009) [#5]
I actually wanted to have all the black area from one render masked and so I could render it over another render of a different world. Thanks for the help I finally got it to work.


Ross C(Posted 2009) [#6]
Try the fastlibs library. It has a command to copy alpha i believe, and a command for rendering straight to a texture. Not sure about rendering straight to an image buffer though...


Flemmonk(Posted 2009) [#7]
SetBuffer ImageBuffer(Image, Frame)