Changing DepthBuffer precision?
BlitzMax Forums/BlitzMax Module Tweaks/Changing DepthBuffer precision?| 
 | ||
| Hello, current BRL.mod\glGraphics.mod\glGraphics.bmx has the following _initPfd() function: 
static void _initPfd( PIXELFORMATDESCRIPTOR *pfd,int flags ){
	memset( pfd,0,sizeof(*pfd) );
	pfd->nSize=sizeof(pfd);
	pfd->nVersion=1;
	pfd->cColorBits=1;
	pfd->iPixelType=PFD_TYPE_RGBA;
	pfd->iLayerType=PFD_MAIN_PLANE;
	pfd->dwFlags=PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL;
	pfd->dwFlags|=(flags & _BACKBUFFER) ? PFD_DOUBLEBUFFER : 0;
	pfd->cAlphaBits=(flags & _ALPHABUFFER) ? 1 : 0;
	pfd->cDepthBits=(flags & _DEPTHBUFFER) ? 1 : 0
	pfd->cStencilBits=(flags & _STENCILBUFFER) ? 1 : 0;
	pfd->cAccumBits=(flags & _ACCUMBUFFER) ? 1 : 0;
}
Is it possible to make the Depth Buffer bit value choosable between 16, 24 and 32? how could I go on about with this?Does simply putting... pdf->cDepthBits=32...make the Depth Buffer to 32 bits? Thank you. | 
| 
 | ||
| As I said on that miniB3D thread, I think it should - at least based on what I found through google. It seems to be Intel's driver, which locks the depthbuffer to whatever is in their control panel - would be nice if someone could confirm this - unfortunately I just have 1 computer at work with a Intel GMA, so it's not always that I can test anything there :/ I managed to run Ubuntu 10 Live CD on that machine, and ran the same program (compiled on Linux, of course) - without the issue. Thing is, I have no idea if it was using some hardware accelerated driver or not, since it ran around 20fps :P~ |