pfd.cAlphaBits = (byte) data.depthSize;
pfd.cAlphaBits = (byte) data.alphaSize; pfd.cDepthBits = (byte) data.depthSize;
public GLCanvas (Composite parent, int style, GLFormatData data) {	super (parent, style);			if (data == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	PIXELFORMATDESCRIPTOR pfd = new PIXELFORMATDESCRIPTOR ();	pfd.nSize = (short) PIXELFORMATDESCRIPTOR.sizeof;	pfd.nVersion = 1;	pfd.dwFlags = WGL.PFD_DRAW_TO_WINDOW | WGL.PFD_SUPPORT_OPENGL;	pfd.dwLayerMask = WGL.PFD_MAIN_PLANE;	pfd.iPixelType = (byte) WGL.PFD_TYPE_RGBA;	pfd.cColorBits = (byte) data.bufferSize;	if (data.doubleBuffer) pfd.dwFlags |= WGL.PFD_DOUBLEBUFFER;	if (data.stereo) pfd.dwFlags |= WGL.PFD_STEREO;	pfd.cRedBits = (byte) data.redSize;	pfd.cGreenBits = (byte) data.greenSize;	pfd.cBlueBits = (byte) data.blueSize;	pfd.cAlphaBits = (byte) data.depthSize;	pfd.cStencilBits = (byte) data.stencilSize;	pfd.cAccumRedBits = (byte) data.accumRedSize;	pfd.cAccumGreenBits = (byte) data.accumGreenSize;	pfd.cAccumBlueBits = (byte) data.accumBlueSize;	pfd.cAccumAlphaBits = (byte) data.accumAlphaSize;	pfd.cAccumBits = (byte) (pfd.cAccumRedBits + pfd.cAccumGreenBits + pfd.cAccumBlueBits + pfd.cAccumAlphaBits);	//FIXME - use wglChoosePixelFormatARB//	if (data.sampleBuffers > 0) {//		wglAttrib [pos++] = WGL.WGL_SAMPLE_BUFFERS_ARB;//		wglAttrib [pos++] = data.sampleBuffers;//	}//	if (data.samples > 0) {//		wglAttrib [pos++] = WGL.WGL_SAMPLES_ARB;//		wglAttrib [pos++] = data.samples;//	}	int hDC = OS.GetDC (handle);	int pixelFormat = WGL.ChoosePixelFormat (hDC, pfd);	if (pixelFormat == 0) {				OS.ReleaseDC (handle, hDC);		SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);	}	if (!WGL.SetPixelFormat (hDC, pixelFormat, pfd)) {		OS.ReleaseDC (handle, hDC);		SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);	}	glHandle = WGL.wglCreateContext (hDC);	if (glHandle == 0) {		OS.ReleaseDC (handle, hDC);		SWT.error (SWT.ERROR_NO_HANDLES);	}	OS.ReleaseDC (handle, hDC);}