Test Scene

Published May 22, 2007
Advertisement
Below is the test scene I've knocked up to use while I'm rewriting the renderer. It shows the basic functionality - sprites, lines, rectangles and rings - all with various sprite priorities to control the ordering.



The external interface needs some tweeking for consistancy, but mostly I'm rewriting the internals. Currently it's rather crude and uses glBegin/End for all the objects, with no state sorting at all. I'm going to rewrite it to use vertex arrays and add batching based on state and texture use, but if it all goes to plan it should still look exactly the same and use the same interface.

First off, vertex arrays. Which always annoy the crap out of me because they're much more awkward to setup and use in Java than the C equivilent, but should make things much more efficient. Not sure about extending that to include VBO support yet, from some crude tests a while ago I found that for 2d stuff they didn't offer any speed gains over vertex arrays.
Previous Entry Junk
Next Entry Stuff
0 likes 3 comments

Comments

Trapper Zoid
Will poor Tails ever regain his balance in your test demos?

Back on topic: I'm interested in how your vertex array tests go, as I'm planning to try out the same thing myself next week (albeit in C++, so things shouldn't be that difficult to get going).

Is that a graph in the bottom left of your test screen? If so, what does it represent?
May 22, 2007 08:10 PM
OrangyTang
Quote:Original post by Trapper Zoid
Will poor Tails ever regain his balance in your test demos?

Heh, I doubt it. [grin] I really should get some more test sprites, but it's hard to find good ones.

Quote:Back on topic: I'm interested in how your vertex array tests go, as I'm planning to try out the same thing myself next week (albeit in C++, so things shouldn't be that difficult to get going).

Is that a graph in the bottom left of your test screen? If so, what does it represent?

Aye, I'll be posting the progress and results back here when I get something working. [grin]

The graph is a bit of code I've been using for years - it shows the frame time for the past 200 or so frames. The horizontal lines mark the 30 and 60 fps points. With such a simple scene the framerate is 200+ so it goes off the top of the graph, but you can just see a spike where is dropped a frame for some reason.
May 23, 2007 04:38 AM
errcw
It looks fantastic! I replied to your topic on the renderer design; hopefully we can share a few ideas. (Sorry it took me so long! Work swallowed me alive for a good few weeks.)
May 27, 2007 02:46 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement