PDA

View Full Version : Is Bubble Possible ?



chethan7
03-26-2012, 07:28 AM
Hi all!

I'm totally new to openGL and graphics programming itself. I just want to know whether it is possible to create transparent bubbles that are moving, just like the 'bubbles' screensaver in Windows 7, using only glut. No refraction and other stuff required. It must use only glut header, and no other system specific header files. Is it possible for a beginner to achieve the task in a month ?

Thank you all :)

ZbuffeR
03-26-2012, 07:37 AM
Looks quite easy, even for a beginner.
- load image file as texture, including alpha (probably the only complex part)
- enable blending
- draw texture quads
Done.

chethan7
03-26-2012, 07:48 AM
Thanks for the answer :) I would like to know a little more about this. I want the bubbles to move inside the window and when they collide, they should move in an opposite direction. And as a little addition, when a bubble is clicked on using mouse, it must burst out into smaller bubbles. Is this can be done only using glut ? It is important that I should be able to do this only using glut.

Thanks again :)

MaxH
03-26-2012, 10:47 AM
Glut opens a GL window and allows you to interact with your code via the mouse and keyboard. It also provides some simple menu options. You are going to have to do the rest, such as moving the bubbles and testing for collision detection. Since bubbles are spheres, the collision detection stuff will be easy.

chethan7
03-27-2012, 10:19 AM
Thanks for your answer. The word 'easy' made me feel better :) I'm worried with collision detection stuff but hope I could do it with little difficulty. Thanks again :)