Overlaying one geometry with annother (active additions to passive graphics)

I am attempting to create a geometry in which I have a passive console which then has active display screens added to it. The console is its own geometry as are each of the screens.

Of course because the console geometry and the display screen geometry overlap you get the standard “fighting for dominance” between the two

The simple solution to this is of course to put the active display screen slightly in front of the console geometry. However this leads to several question marks, most importantly how far is far enough in front, in particular at extreme distance from the origin will it start being a problem again?

So, is there a neater solution to the problem of Overlaying one geometry with another, can which geometry is dominant be explicitly defined?

Read this
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

In short there is no answer to “how far is far enough in front” because it depends on the distance between the cam and the object.
Usually though, it’s important that there is no zfighting when you are close to objects, and less important when the object is far away. So The answer might be “far enough is far enough so you have no z-fighting at “reading” distance”.

Another solution (that would seems slightly overkill IMO) is to have a control on the object that increase the offset proportionally to the distance of the camera…

Hm one solution might be, to do this in a secondary viewport, wich is rendered to a framebuffer,
then just use this framebuffer as the texture for the display.

-> Pro is you are independet from any logic in the main viewport
-> Contra is the additional required overhead. (if you only need 1 active console at the same time its great, for 10+ it gets worse)

Interesting, I knew that the camera-object distanse was important but I assumed that the origin-object distance was equally important. If origin-object distance isn’t important (or is much much less important) then I think I’m worrying over nothing. The reason for my concern is because I am making an “infinite world” style game.

Well both is important, the larger the numbers the less the accuracy.
For infinite style games keep in mind to not move the camera but the world around the centrum, to keep the numbers low.