I've fixed that part of code, now it doesn't render anything (or at least I can't see it). Between, yes, I've compiled the sample and works quite well....I'm using the same states but doesn't work anyway in the game. Well, to be honest, it works at the beginning on the video intro, but when the game gets into it menu, starts to give me these issues. The problem is I don't know what states the game is changing. I really don't know what to do
Didn't do so many changes into the code, just added two lines here
For 2D collision detection, you can use normal physics engines like ODE (Open Dynamics), Newton, Bullet, Havok, PhysX. I don't get it. What does color have to do with collision? All you need is the position of objects.
If you want to read the framebuffer, then it would be glReadPixels.
Mine is a racing game, and for the collisions I want to use a background image wich tells me where the vehicle can go. like this: