glClearColor working strange way on HP ZBOOK 15


When I try to change background color from black to white I have following picture:

Looks like color updated only in areas where some other elements present. It is happen when I test it on HP ZBOOK 15.

Is it any graphics card settings issue?

After calling glClearColor(), did you call glClear( GL_COLOR_BUFFER_BIT ) with that framebuffer bound?

Yes, and it was OK on my old Dell computer and many other computers. Is it kind of optimization?

No. If there are no bugs in your program, and glClear() is not clearing the active framebuffer, then that may be a driver bug.

Are you checking for GL errors?

Have you updated the graphics drivers on your HP ZBook 15?

Can you post a short, stand-alone program that illustrates the problem?

Run it again on Dell computer - works fine.
Check for errors - no error.

Code look’s like that:

// Try to put it in action
	if ( !GLCurContext())
		this->ErrMessageBox(CGLView::GLW_MAKE_CURRENT, GetErrorStr(CGLView::GLW_MAKE_CURRENT));
		return -1;
	// The glClearColor function specifies the red, green, blue, and alpha values used by glClear to clear the color buffers. 
	// The depth of the Z-buffer will be taken into account
	// Values specified by glClearColor are clamped to the range [0,1]
	glClearColor (m_BgColor[C_RED], m_BgColor[C_GREEN], m_BgColor[C_BLUE], 0);
	// Actual background erasure
	// set clear Z-Buffer value

	// For Drawing text.
	// Create Font Bitmaps for this view. It starts from CL_FONT number.
	SelectObject(GLView_GetHDC(), GetStockObject(ANSI_VAR_FONT));
	if(wglUseFontBitmaps(m_pCDC->GetSafeHdc(), 0, 256, CL_FONT) == FALSE)
		this->ErrMessageBox(CGLView::GLW_USE_FONT_BITMAPS, GetErrorStr(CGLView::GLW_USE_FONT_BITMAPS));
		return -1;	

	// free the target DeviceContext (window)

How to find what’s wrong with driver?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.