Sign in to follow this  
  • entries
    162
  • comments
    262
  • views
    166904

Test Scene

Sign in to follow this  
OrangyTang

82 views

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.
Sign in to follow this  


3 Comments


Recommended Comments

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?

Share this comment


Link to comment
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.

Share this comment


Link to comment
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.)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now