It's real urgent for an assignment. I'm a real beginner at graphics programming and stuff, so I really need specific help... Thanks in advance, everyone.
I need in-depth examples (source code inclusive preferrably) for making a ball bounce in OpenGL, C++?
But you're not looking for help so much as someone doing your homework/assignment for you. If you can't bother to read the OpenGL tutorials like the ones at NeHe, then clearly you aren't doing your share of the work.
Additional Info:
Apparently, you missed the hint. http://nehe.gamedev.net/ .
%26gt; The problem is that I am very unfamiliar with the language unable to animate the bloody ball.
So, you don't know OpenGL, or for that matter, any graphics API.
%26gt; Furthermore, I don't know how the code all fits into the whole main loop thing.
This isn't like "how do I convert a string to an int" or "how do I call so and so function" or "what is the preferred method of double-buffering". It's more like, I have no idea about anything. Your problem isn't that you don't understand a certain point. Fundamentally, you have no idea what you're doing.
%26gt; So basically, even if you want to just give me skeleton codes that can animate exactly what I want based on my own formulae, I'm perfectly happy with that.
Which translates to "gimme code". You're basically asking me to do all the work for you. Your assignment is to write the code, and you're asking us to write the code.
What tutorials have you seen? Have you looked at any of the OpenGL samples? A number of them show how to do translation of an object.
Don't tell you made an effort. You haven't even given me basic details, which indicates you haven't spent a minute on this. Is this in 2D or 3D? Do you just want the bounce to be a translation? What factors are involved in bouncing? Aside from the obvious starting height and accceleration from gravity, how do you determine the bouncing height? Are you assigning any elasticity properties to the materials? How do you determine when to terminate the bounce? Or is it endless? What OS are you on? What compiler are you on?
You know what the biggest giveaway of laziness is? Lack of details. Because giving details means you need to do your due thinking and research.
Reply:My OpenGL benchmark might supply some basics (including a sphere). I don’t know whether this is compatible with the latest OGL. Following includes source code:
http://freespace.virgin.net/roy.longbott...
A version that was compiled with a modern MS Compiler, albeit for 64 bit working, is in:
http://freespace.virgin.net/roy.longbott...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment