Commit fd5e0ef1 authored by Ben Boeckel's avatar Ben Boeckel

vtkWin32OpenGLRenderWindow: avoid narrowing warnings

The array is of BYTE, but there are some integers floating around.
Static cast them to BYTEs.

Change-Id: I6ff0ae85a78908fdcb3fb9df45bb5e8d5efca2da
parent 0ba047df
......@@ -678,19 +678,21 @@ void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags,
return;
}
BYTE bpp_byte = static_cast<BYTE>(bpp);
BYTE zbpp_byte = static_cast<BYTE>(zbpp);
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), /* size */
1, /* version */
dwFlags , /* support double-buffering */
PFD_TYPE_RGBA, /* color type */
bpp, /* preferred color depth */
bpp_byte, /* preferred color depth */
0, 0, 0, 0, 0, 0, /* color bits (ignored) */
this->AlphaBitPlanes ? bpp/4 : 0, /* no alpha buffer */
static_cast<BYTE>(this->AlphaBitPlanes ? bpp/4 : 0), /* no alpha buffer */
0, /* alpha bits (ignored) */
0, /* no accumulation buffer */
0, 0, 0, 0, /* accum bits (ignored) */
zbpp, /* depth buffer */
this->StencilCapable, /* stencil buffer */
zbpp_byte, /* depth buffer */
static_cast<BYTE>(this->StencilCapable), /* stencil buffer */
0, /* no auxiliary buffers */
PFD_MAIN_PLANE, /* main layer */
0, /* reserved */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment