Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: OpenGL solid models

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    mumbai
    Posts
    19

    OpenGL solid models

    hello,
    how to make OpenGL objects behave like solid models i.e. placing one on top of another,
    not allowing two objects to be drawn at the same place? In other words how to give a physical character to the OpenGL objects?
    thanx in advance.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Location
    FRANCE
    Posts
    127

    Re: OpenGL solid models

    This is probably a stupid answer, but then, I haven't really understood the question. This is more a question of collision detection and management and has nothing to do with OpenGL.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Posts
    531

    Re: OpenGL solid models

    Try the Collision Detection Tutorial @ http://NeHe.GameDev.net

  4. #4
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    Re: OpenGL solid models

    that's pretty simple...just put this line at the beginning of your rendering code
    glDisable(GL_ALLOW_INTERSECTING_OBJECTS)

    hope this helps

  5. #5
    Junior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    Melbourne, Australia
    Posts
    239

    Re: OpenGL solid models

    but in case that doesn't work on your hardware try bsp, quad, oct, any...tree partitioning space into small parts....
    it's a bit difficult to do this dynamically (your tree changes), but it's still possible to have logN (N=number of triangles) complexity of your algorithm
    good luck!

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Posts
    531

    Re: OpenGL solid models

    Mickey, don't throw the poor guy in the middle of the programming-ocean by talking about things you don't really need for collision detection..

    Just learn how to do CD first, that's already though enough.
    (assuming that he's a beginner)

  7. #7
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    124

    Re: OpenGL solid models

    Assume that your objects are completely made up of bosons. They are allowed to be at the same place at the same time. Then you don't have to care about it

    (Just joking)

    You need collision detection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •