PDA

Click to See Complete Forum and Search --> : Best polygon fill-method?


Balder
Jan 2nd, 2001, 10:16 AM
Hi VB-gurus!

I have just started to study some 3D-algorithms and I think Iīm in love!
I donīt want my program that I spent 100 hours to make to result only in a short razzle from the computers memory. I want my code to cause something visual!

So, here is the deal.
To create 3D objects I need lots of polygons, in most cases triangles.
To create triangles, handle them in matrices and rotate their coordinates I think I know how to do. But which is the best way to draw them and fill them in VB?
I guess BitBlt might be useful.
I recently found the API Polygon and PolyPolygon, which also seem very useful comined with property Fillcolor.

Which is the fastest way?
What about if I want to fill my polys with textures, not just a single color?

Does DirectX provide any help? (Donīt know any yet...)

And then there is the problem about Hidden Surface Removal...

Anyone who has been working with theese issues, please give me a hint. You donīt have to answer everything, just tell something you know and has experienced -Itīs all usefull for me.

Thnak you!

pollier
Jan 3rd, 2001, 08:46 PM
A much easier way to skip all those alograthims is to use Direct3D or OpenGL. They're very fast and have many more features than the ones you mentioned. (hidden surface removal, blending, etc.) I prefer OpenGL, which you can access in VB with a type library. You probably could find information on it by searching on the web for "vbogl.tlb" or "OpenGL with Visual Basic". But, if you want to use your own rendering alograthims, you should probably use DirectX to do filling and things for you. I'm not familiar with it, but there's plenty of other programmers who are.