Jump to content
  • Advertisement
Sign in to follow this  
Cacks

OpenGL GL Questions

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I've got a few questions: 1. Does OpenGL handle reflecting light eg light bouncing of a red ball onto a green cube that the user can see? 2. If I have an object like a cube displayed, how could I select it and drag it along the screen? 3. What about transparent objects? Does GL provide a way of doing this? 4. I want to make a small modelling program. Is it difficult to make cubes, spheres etc? Does the GL utility library proveide these? If so what shapes does it provide? 5. I've seen a few scenes rendered using raytracer software, what are peoples opinions on these? Thanks for any help given!!!!

Share this post


Link to post
Share on other sites
Advertisement
Quote:

1. Does OpenGL handle reflecting light eg light bouncing of a red ball onto a green cube that the user can see?

Not directly, but I'm sure there are some relatvily simple realtime/pre-calculated methods to this. It's a more complicated topic that I don't feel like answering now, but feel free to ask if you need it.

Quote:

2. If I have an object like a cube displayed, how could I select it and drag it along the screen?

Look into gluUnProject/gluProject. I've never used it so a lot of people here could help you better than I could.

Quote:

3. What about transparent objects? Does GL provide a way of doing this?

Yep. glEnable(GL_BLEND) and glBlendFunc(__,__). Just as a note, make sure you sort blending or do depth testing differently.. otherwise objects behind the blending may be clipped.

Quote:

4. I want to make a small modelling program. Is it difficult to make cubes, spheres etc? Does the GL utility library proveide these? If so what shapes does it provide?

Cubes, spheres, toruses, teapots :), and rings can be made with glu or glut. I don't recommend these, though, and would suggest you looking up an algorithm to compute them yourself manually. I don't recommend them because you have very little control over the objects, minus using pixel shaders.. but even then.

Quote:

5. I've seen a few scenes rendered using raytracer software, what are peoples opinions on these?

...Raytracing..OpenGL? I've never done this myself, and you can only really simulate it with OpenGL. There are some good software raytracers out there.. if that's what you mean...
Edit: Oh.. that kind? I always think of ray-tracers as the pixel-perfect type...

Hope I could begin to answer your questions
~zix~

Share this post


Link to post
Share on other sites
Quote:
Original post by Cacks
1. Does OpenGL handle reflecting light eg light bouncing of a red ball onto a green cube that the user can see?
Not directly, no. You can implement it using other OpenGL facilities though.
Quote:
Original post by Cacks
2. If I have an object like a cube displayed, how could I select it and drag it along the screen?
OpenGL has a GL_SELECT render mode. You will have to implement the dragging.
Quote:
Original post by Cacks
3. What about transparent objects? Does GL provide a way of doing this?
Yes.
Quote:
Original post by Cacks
4. I want to make a small modelling program. Is it difficult to make cubes, spheres etc? Does the GL utility library proveide these? If so what shapes does it provide?
No, it's not difficult to make cubes. Yes, GLUT provides some basic shapes. Look here.
Quote:
Original post by Cacks
5. I've seen a few scenes rendered using raytracer software, what are peoples opinions on these?
They're cool.
Quote:
Original post by Cacks
Thanks for any help given!!!!
You're welcome. And read the Red Book. That's really the best advice.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!