GL Questions
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!!!!
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~
Quote:Original post by CacksNot directly, no. You can implement it using other OpenGL facilities though.
1. Does OpenGL handle reflecting light eg light bouncing of a red ball onto a green cube that the user can see?
Quote:Original post by CacksOpenGL has a GL_SELECT render mode. You will have to implement the dragging.
2. If I have an object like a cube displayed, how could I select it and drag it along the screen?
Quote:Original post by CacksYes.
3. What about transparent objects? Does GL provide a way of doing this?
Quote:Original post by CacksNo, it's not difficult to make cubes. Yes, GLUT provides some basic shapes. Look here.
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?
Quote:Original post by CacksThey're cool.
5. I've seen a few scenes rendered using raytracer software, what are peoples opinions on these?
Quote:Original post by CacksYou're welcome. And read the Red Book. That's really the best advice.
Thanks for any help given!!!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement