Multi-part simple render question

Guys

I have a model created from many sub parts…

In my main rendering code I do this

For lngCounter1 = 1 To glngNumPIDs
…glPushMatrix
…glCallList lngCounter1
…glPopMatrix
Next

As you can see, I loop round the various parts of my model contained in display lists.

The problem with this is that if parts share a common boundary then the boundary isn’t displayed correctly when I spin the model round in realtime.

Consider a simple example of 2 cubes touching.

In the code above I would render each cube individually and there are 2 common faces that probably wont render correctly (because the parts are rendered separately)

Obviously I could create a new display list that does not contain the 2 common faces but I am trying to avoid doing additional calculations.

At the moment I precalculate the display lists in a part of the code where the user is expecting a wait (I could have 100K quads in each part)

Ideally I don’t want to re-calculate the external faces ‘on the fly’

Is there a way round this or do I have to build a new single display list from the others?

Many thanks for any input

In what way are they not rendered correctly?

As long as you’re using the depth buffer the results should be correct (apart from possible z-fighting).

Thanks for the reply.

I have made some progress and have been playing with glPolygonOffset. I suspect it’s a tollerance issue - large facets infront of small ones etc…

A picture of what I am talking about is here

http://www.cadfem.com/ogl5.gif

Note the annoying ‘whiskers’ and the ‘wave’ effect between the parts. The whiskers seem to retain their size and so look worse when you zoom out (so they are big as a proportion of the model size)

With my new-found OGL skills, this plot is offensive and must be fixed :slight_smile:

Lots more to do yet on this app, but the whiskers need a clean shave.

Thanks for any input

Julian

those whiskers are typical of z-fighting.

see my post here http://www.opengl.org/discussion_boards/…t=018942#000001

Many thanks

It was the Near/Far settings causing the problem.

A quick mod to glOrto and all is well.

Whiskers now closely shaved and smooooth

Thanks again

Julian