Polygons Per Second

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
SuperRoy
Insane DCEmu
Insane DCEmu
Posts: 207
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Jan 12, 2003 12:44 pm
Has thanked: 0
Been thanked: 0
Contact:

Polygons Per Second

Post by SuperRoy »

I'm making a game that's kind of a 3d side-scroller. Graphics in 3d, movement in 2(.5)d...I'll explain in some other post.

What amount of polygons per second can the Dreamcast push...

The main character model is about 2,000 polygons...but then again I'm not using any SH4 and there have been more optimizing coders than I. I'd imagine I can safely push about 500,000 at a time...but I never know...

Not sure whether to use KGL or PVR...any resources on EITHER would be great.
--SuperRoy
[ Author:: Linux GameDev Articles ]
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

You can program directly with the PVR API, but you'll have to do all of the calculations that OpenGL usually does manually. But, if you don't need most of those, and can do the ones you do want faster (more specific to your program), you can use the PVR fine - it's just a little trickier to program.

I'd imagine you can probably push 500,000 per second, but you'd probably want to make sure you aren't wasting any time anywhere, just to be sure it'll work.
SuperRoy
Insane DCEmu
Insane DCEmu
Posts: 207
Joined: Sun Jan 12, 2003 12:44 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by SuperRoy »

Awesome...oh...hmmm

I've looked into kGL, but it seems that a lot of basic OpenGL features are missing, I'll look into it again.
--SuperRoy
[ Author:: Linux GameDev Articles ]
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Yep - KGL isn't the most complete of OpenGL implementations, nor does it really try to be. It's more of a works-like-OpenGL system for the Dreamcast.
SuperRoy
Insane DCEmu
Insane DCEmu
Posts: 207
Joined: Sun Jan 12, 2003 12:44 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by SuperRoy »

What 3d Library/API do you suggest? or what are the pros/cons of each.
--SuperRoy
[ Author:: Linux GameDev Articles ]
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

On the DC, theres really not much choice in the matter. You can go with PVR or KGL, and thats really about it.... unfortunately... There's also Parallax and Tsunami, but they are really for 2D, not 3D (but there still is some 3D matrix stuff in Parallax. Tsunami seems to be a bit more friendly, but I don't use C++ very often, and therefore haven't really used Tsunami)

Pros/Cons:
KGL
+Similar to OpenGL
+Fairly easy to program for
-Slower than other choices
-Larger bin files

PVR
+Fast
+Highly Optimized
-Harder to program for

Parallax/Tsunami
+Fast
+Easy to program
+Well Optimized
-Geared toward 2D, not 3D

(These are really based on my experiences with mostly 2D stuff, as I have used all three of the above for 2D work. I've never really done much with 3D myself, but if you are willing to learn (and sacrifice any sign of portability) go with using the PVR API. Or you could always try to implement your own GL commands in KGL, but in the long run, it'd probably be easier to go with PVR)
Cless
DCEmu Cool Poster
DCEmu Cool Poster
Posts: 1090
Joined: Wed Nov 20, 2002 6:22 pm
Has thanked: 0
Been thanked: 0

Post by Cless »

Shouldnt you be able to push at least 2 million? I mean comerical games can push like 5 million.
SuperRoy
Insane DCEmu
Insane DCEmu
Posts: 207
Joined: Sun Jan 12, 2003 12:44 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by SuperRoy »

Okay here we go...WHERE CAN I GET INFORMATION ABOUT THE PVR API!?!

I've searched all over the internet, but could never find anything.
--SuperRoy
[ Author:: Linux GameDev Articles ]
crt0
DC Developer
DC Developer
Posts: 290
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by crt0 »

In the KOS headers. And old example code.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

There aren't really that many programs that use it much. You could try going through the KGL code, but it's a bit of a mess.
SuperRoy
Insane DCEmu
Insane DCEmu
Posts: 207
Joined: Sun Jan 12, 2003 12:44 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by SuperRoy »

There is no sort of documentation or atleast function listing?

Wow...so I looked through pvr.h and ... I have no idea where to go.
--SuperRoy
[ Author:: Linux GameDev Articles ]
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

All the documentation for KOS is way out of date. Some of it dates back to LibDream (the predecessor to KOS, and primitive by comparison), and very little of the stuff that applies to KOS actually works for the newer versions anyway.

You do need to know a little about how the PVR system actually works though.

Basically, the renderer takes a number of display lists, each of which handles a different type of polygon, and renders them to the screen one after another. The two most useful ones are for opaque polygons (which can be textured or coloured as you wish), and transparent polygons (which can be textured, have an alpha channel in the texture map, recoloured and made transparent).

What you basically have to do is start each display list, add polygons to it, finish the display list, continue until you have filled all display lists with as much data as you want, and then tell the renderer to render everything. It'll start rendering, leaving your main program to do other stuff. When you're ready for the next frame, you wait for the PVR to finish, and start the process again.
Post Reply