May be stupid...but...

Started by
1 comment, last by Tigra7 21 years, 3 months ago
I have been learning about some of the more advanced culling systems, and I was wondering about a new culling system that might be a great idea, or a stupid one. I was thinking of a way to check the color of a pixel, and if it was black, excluding it from render, therefore leaving the clear color, which would be black, to cover it making it look as if it were rendered. I was thinking even of doing that for any color on the screen (for some reason I keep thinking this has been done) so that places on the screen that would be that same color for a majority of the game, like a lot of 2d games, could be rendered once, and then every other frame would be just counted as a cleared screen, therefore increasing framerate? This might just be a stupid idea, like most of mine are, but I just wanted some outside input. Cheers, Chris
Advertisement
Bad idea, reading from the framebuffer is slower than writting.

Height Map Editor | Eternal lands
Actually, what your talking about _has_ in fact been done. And was _extremely_ good (try pushing 100fps on a P133). But it's what I call an "unstable" method because your framerate jumps around rapidly. It's still better then standard methods though, just a bit complex. It's called "dirty rectangles" and was used by the guru programmers back when 2D games were the bomb. It was done by keeping track of what portions of the screen changed and was used with double buffering to make it even deadlier. If you plan to use it with OpenGL, I'm not sure if it could be done (fast that is). You'd need a very low (or is it high? ^_^) level access to the hardware so it could be done fast. A game programming library called "Allegro" actually shows you in example programs how to support this. I believe it now has support for OpenGL as well, so you might want to look into that.

I'm not sure how well this would work for a 3D game though, as everything does change a lot in a screen.

[edited by - The Etwinox on January 3, 2003 8:52:55 PM]

This topic is closed to new replies.

Advertisement