Valhalla Legends Forums Archive | C/C++ Programming | [C++] 3D Graphics

AuthorMessageTime
Krush
Anyone know about 3D graphics using only the Windows GDI that could possibly help me out? I need to do clip planes and field of view and some other things and I'm having problems doing it.
July 2, 2004, 1:30 AM
Eibro
I'm pretty sure the GDI is 2D only. Besides that, it's _slow_.
July 2, 2004, 1:53 AM
St0rm.iD
Well all computer graphics are pretty much 2d.

Basically, you're gonna need the algorithm that translates a 3d point to a 2d one. In QBasic:

http://lightning.prohosting.com/~ichinar/Files/tuts/3d.txt

The important stuff you want is:

x2D = 256 * (x3D / (z3D + zCenter)) + xCenter
y2D = 256 * (y3D / (z3D + zCenter)) + yCenter

Then you can go ahead and implement everything on top of that! Good luck!
July 2, 2004, 4:02 AM
Adron
[quote author=Krush[LM] link=board=30;threadid=7528;start=0#msg68156 date=1088731826]
Anyone know about 3D graphics using only the Windows GDI that could possibly help me out? I need to do clip planes and field of view and some other things and I'm having problems doing it.
[/quote]

What are your problems more exactly?
July 2, 2004, 7:39 AM
iago
If you want to do cool stuff in 3d, I would recommend getting the DirectX SDK from Microsoft's site. It comes with TONS of tutorials and examples of simple and complex things you can do. Go have a look at the simple stuff, that should scare you away from 3d programming for awhile.

Good luck!

Also, you might want to look up OpenGL.
July 6, 2004, 1:49 PM
St0rm.iD
[quote author=Krush[LM] link=board=30;threadid=7528;start=0#msg68156 date=1088731826]
using only the Windows GDI
[/quote]
July 6, 2004, 4:48 PM
Adron
[quote author=$t0rm link=board=30;threadid=7528;start=0#msg68828 date=1089132535]
[quote author=Krush[LM] link=board=30;threadid=7528;start=0#msg68156 date=1088731826]
using only the Windows GDI
[/quote]
[/quote]

Well, that, and if he's currently having trouble with clip planes and field of view, he's probably already got the translation algorithm. Trying to help without knowing more exactly what his problems are would require either posting a link to a tutorial or guide (which he could google up himself) or typing a lot (which is too much of an effort when most of it may be wasted anyway).

So, let's hope he posts back with more exactly what he's doing, what results he's getting, and what problems he has.
July 6, 2004, 8:03 PM
Krush
It's for this computer graphics class in or I wouldn't even be touching windows gdi.
July 9, 2004, 2:40 AM
Krush
[quote author=Adron link=board=30;threadid=7528;start=0#msg68194 date=1088753962]
[quote author=Krush[LM] link=board=30;threadid=7528;start=0#msg68156 date=1088731826]
Anyone know about 3D graphics using only the Windows GDI that could possibly help me out? I need to do clip planes and field of view and some other things and I'm having problems doing it.
[/quote]

What are your problems more exactly?
[/quote]

Well with the way I have it current implemented I changing the fov doesn't do much of anything.
July 9, 2004, 2:41 AM
Adron
[quote author=Krush[LM] link=board=30;threadid=7528;start=0#msg69334 date=1089340874]
Well with the way I have it current implemented I changing the fov doesn't do much of anything.
[/quote]

Perhaps you have a flat projection and aren't using the fov at all?

Show the algorithm you're using?
July 9, 2004, 8:26 AM

Search