-
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.
-
Junior Member
Regular Contributor
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.
-
Advanced Member
Frequent Contributor
Re: OpenGL solid models
Try the Collision Detection Tutorial @ http://NeHe.GameDev.net
-
Junior Member
Regular Contributor
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
-
Junior Member
Regular Contributor
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!
-
Advanced Member
Frequent Contributor
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)
-
Junior Member
Regular Contributor
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
-
Forum Rules