should DEVMODE::dmBitsPerPel be set the the number of color bits or the number of depth bits or color bits+depth bits

DEVMODE is used in ChangeDisplaySettings

devmode is not related to opengl in any way, it’s a win32 struct, so it’ll be colour bit depth (one of 8, 16, 24, 32). pixelformatdescriptor is the struct you need to specify opengl colour/z/stencil bit depths…