how to set score increse in opengl

i wanna set score marking in my game.when one object collide 2nd object then score increse.how it can be done in opnengl.thnx in advance.

I do not understand the question… and what does it have to do with OpenGL.

if (object1.collidesWith(object2) == true)
{
    score++;
}

for goal achieve 250 points then u won.this type of scoring i wanna in my game.score is not just a variable.now tell me.a window open and say YOU WON…and level up by 2…these thing how can be done in opengl.i dnt know.tell me plz.

Buy a copy of The Red Book if you want to learn OpenGL. Seriously.

For what you want to do and the questions you are asking it seems to me that you’ll also most likely need to learn to program also… So buy a book on C or C++ or whichever language you prefer… …and get learnin’. :slight_smile:

The OpenGL Developers forum is a programming forum. And it does cater to beginners. But it does assume that you at least have some coding experience first.

Your questions might be better suited to another forum.
But on most coding forums you’ll probably get a similar reply to this…

For now, if you can only use online resources google “NeHe” and work though their tutorials. If they are too much for you, then you do need to get some general experience coding first.