trying to use the drawimage as a background

Blitz3D Forums/Blitz3D Programming/trying to use the drawimage as a background

dman(Posted 2010) [#1]
How can I use the draw image as a background and have other draw image on top of it.

when I try putting the background first then the others it works but I when I put a certain amount of draw image the background do not show.


Is there a way to have a background without using the draw image?


D4NM4N(Posted 2010) [#2]
If you are drawing to the backbuffer ( setbuffer backbuffer() ) then as long as you draw the background first and everything else on top BEFORE flip then the background will not disapear.

I seem to remember there is a way of setting a static background but it is not much good and i have never used it. I have always drawn the hierachy normally starting with the bkg.

If you are drawing 3d as well via renderworld though it is a little different. By calling renderworld you will overwrite the backbuffer unless you set the correct "cameraClsMode".

Last edited 2010


dman(Posted 2010) [#3]
how do I get a static background what command can I use?
I have tried to put everything after the background image, but the background disappears.


Matty(Posted 2010) [#4]
Are you trying to render 3d over a background image?
If so look into the cameraclsmode command - draw your image, then set the cameracls mode such that the colorbuffer is not refreshed and then perform your render world.

Are you trying to draw 2d images over the top of a 2d background, in which case ensure that the first image which is drawn each frame is the 2d background.

Please provide a few more details so that we can assist.

Thanks,
Matt


dman(Posted 2010) [#5]
I'm using graphics3d with 2d like the draw image command and drawing the background. I put the background first.

but it seems that some are not getting displayed.

some are still being display in the back of the background image.

maybe its like you said about rendering the 3d over the background.

I will check it out.


jfk EO-11110(Posted 2010) [#6]
If it is really the backbround then you better use DrawBlock. If you will then draw more images ontop of the background using DrawImage, make sure their Transparency / mask color is set right (MaskImage).