BitDepth, DepthBits, BitsPerPixels, confusion somewhere

I started looking into the jmonkey app settings because I’m working on making an options screen. I’ve noticed a weird inconsistency in the documentation, I’m not sure which is what. Heres the two instance I’ve seen these values used differently.

  1. on this wiki page, the example uses DisplayMode.bitDepth() to assign AppSettings.depthBits

  2. on LwjglDisplay.createContext() it looks like DisplayMode.bitDepth() corresponds to AppSettings.bitsPerPixel()

Which way should it be?

bit depth = bits per pixel

neither of which have anything to do with the “depth buffer”.

so the wiki page needs to be fixed?

@icamefromspace said: so the wiki page needs to be fixed?

Yeah, looks like someone confused depth with depth. :slight_smile:

Actually, I think the assumption was that the depth buffer “depth” would be the same as the pixel depth… but I don’t think this is always true and you also probably don’t want to arbitrarily set the depth “depth” to the same as pixel depth… for example, 16 bits per pixel might be fine for a card that only supports 24 bit depth buffer or something. I think we had one poster who has been messed up by this once already.

Java gives us no way to determine depth “depth”… so probably we should leave it unspecified unless some specific need is required.

@icamefromspace said: so the wiki page needs to be fixed?
That section of the page is wrong on several levels. In any case, I fixed the specific part where setDepthBits was incorrectly used instead of setBitsPerPixel.

NOTE: Everyone has write access to the wiki, so you could have fixed it yourself.