Can Blitz3d play at being 2D

Blitz3D Forums/Blitz3D Programming/Can Blitz3d play at being 2D

PaulJG(Posted 2003) [#1]
I know blitz3d is capable of putting 2d effects over the 3d buffer before flipping the display, but..

would/should this work ??....

How about if my 3d display was just rendered to a texture, then used regular 2d commands to run my program. (ie.. displaying the texture as an image)

Would I still have full 2d command control ? and could I use external API functions ?? (such as windows and menus)

Sorta BlitzPlus is reverse.. the power of window commands, but using B3D. (I'm thinking about writing an APP)

Just curious.. ;)


Todd(Posted 2003) [#2]
I'm not exactly sure what you mean, but you can just do SetBuffer(ImageBuffer(Image)) before you call RenderWorld(), and the 3d scene will be rendered onto the Image. You can then do any of the normal 2d commands with that image.


PaulJG(Posted 2003) [#3]
Using some of these 2d extended DLL functions to create a proper windows app, (with message boxes and the such) - which can still display a 3d view from a blitz3d display running in the background.


Ross C(Posted 2003) [#4]
actually i don't beleive that works, setbuffer imagebuffer(image) then renderworld. renderworld renders to the backbuffer no matter what. :o)


Todd(Posted 2003) [#5]
@joker: Yeah you're right :) I seemed to remember being able to do that before. Nevermind me, I'm wrong.


Hotcakes(Posted 2003) [#6]
DirectX doesn't support rendering to textures.

Would I still have full 2d command control ? and could I use external API functions ?? (such as windows and menus)


Seems to me the best way to go about it would be to use BlitzPlus in software rendering mode + an OpenGL userlib.

If you -have- to use B3D (ie too stingy to buy Blitz+ <grin>) you would probably still want to go the + OpenGL userlib route, but you'd also need a WinAPI userlib for the Windows stuff... or one of the nice Blitz-coded GUIs out there... Personally, it's all a bit too hacky for me.


Mustang(Posted 2003) [#7]
DirectX doesn't support rendering to textures.


Yes it does, even DX7...

http://www.gamasutra.com/features/19991112/pallister_pfv.htm


PaulJG(Posted 2003) [#8]
Hmmm.. think I'll not even try to attempt it - thanks for the advice !.

Dont want to go down the Blitzpro+OpenGL path just yet, once you do that you lose all those nice things you take for granted in B3D.. (collisions, animation etc..)

btw.. being able to render to a texture is a very easy thing to do. ;)

Think I'll stick with the Fullernators BlitzUI which I've just found.


BlitzSupport(Posted 2003) [#9]

DirectX doesn't support rendering to textures.



Yes it does, even DX7...

www.gamasutra.com/features/19991112/pallister_pfv.htm




Yeah, I think the issue was that, until very recently, Mark has always tried to make sure Blitz runs reasonably on all graphics cards, so never implemented this.

With the new capability detection command used for detecting cubic environment mapping support, it would be nice to see the render-to-texture feature made detectable/useable in the same way... unless it's related to past issues where it was found that DirectX and/or graphics drivers don't always reliably report the correct capabilities.


yinch(Posted 2003) [#10]
if you want to get a 3D scene render onto a image (i think this is what you want, rather than a texture) then you could do a renderworld and then copy the contents onto the Image using a CopyRect.

Then you can just use an DrawImage to display the rendered scene as an image alongside all your other 2D stuff.

If the screen area that the 3D scene occupies is rectangular in shape then you can use CameraViewport to make it just appear in one patch of the screen.

yinch'03