2d and 3d on the same screen

Blitz3D Forums/Blitz3D Programming/2d and 3d on the same screen

ragtag(Posted 2003) [#1]
Let me just make sure I got this right. Some video cards have trouble displaying 2d on 3d, so people use 3d sprites and stuff for HUDs. But am I right in assuming that there is no problem if there is no overlap? That is I define part of the screen as 3d (with no 2d elements) and part of it as 2d (with only 2d elements).

Ragnar


Warren(Posted 2003) [#2]
Where they appear on the screen isn't the issue, it's the fact that you're mixing the two techniques. The API has to shift gears and that's what causes the reported slowdown.

Now, in my experience, I've never seen mixing the two to be a real problem but apparently other people have different experiences...

If you do like I do, and ...

- draw all 3D elements (updateworld,renderworld)
- then draw all 2D elements

You should be OK in reality. One switch isn't going to kill you.


Perturbatio(Posted 2003) [#3]
It's all driver related, Detonator 4.4.0.3 for instance does not suffer from this, but later detonators do, I don't know about other graphics cards.


(tu) sinu(Posted 2003) [#4]
i draw all my ingame menus over the 3d which are 2d but thats when the game is paused and i hide my camera. My ingame gui is drawn using sprites to keep the speed upto speed :)


Rottbott(Posted 2003) [#5]
I've never had problems on any card, although I'm told some people do. I keep my 2D drawing operations to a minimum but it's not usually a problem. A bigger reason to use a 3D HUD is to make it resolution independent.

The big thing to avoid is using the Text command. That has problems on a LOT of cards, either with speed, or with the text not looking right, funny lines etc.


(tu) sinu(Posted 2003) [#6]
my 2d in game menu is all resolution independent and so doesn't look to small or big at different resolutions but is alot easier to achieve in 3d.


ragtag(Posted 2003) [#7]
I guess what I was looking for was using the Viewport command to divide the screen into 2 or 3 different sections. One of them contains 3d graphics only and the other only 2D. Though I'm not sure if this command works properly with 3D.

Ragnar


WolRon(Posted 2003) [#8]
Viewport works just fine. You can divide it up into as many as you want. As stated earlier, the only real problems are resolution independence and possible driver issues.


podperson(Posted 2003) [#9]
I'm using the latest Detonator drivers with an FX 5600 card (not quite top of the line, I know, but better than most folks).

When I run EPS_interface (the freeware particle workshop program written in Blitz3D using a pretty decent 2D GUI library that draws 2D over 3D) it goes from 200fps to 800fps when I hide the UI.

Let me repeat that: 200 fps vs. 800 fps mid-high end hardware, latest drivers.