[vtk-developers] [VTK 0014085]: OpenGL multisampling feature is not initialized properly for QVTK widget
Mantis Bug Tracker
mantis at public.kitware.com
Thu May 23 11:22:00 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://vtk.org/Bug/view.php?id=14085
======================================================================
Reported By: Anton Poletaev
Assigned To:
======================================================================
Project: VTK
Issue ID: 14085
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: backlog
Project: Kitware
Type: incorrect functionality
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2013-05-23 11:21 EDT
Last Modified: 2013-05-23 11:21 EDT
======================================================================
Summary: OpenGL multisampling feature is not initialized
properly for QVTK widget
Description:
Hardware features for vtkWin32OpenGLRenderWindow are configured by
"wglChoosePixelFormatARB". For this purpose a temporary window is silently
created by SetupPixelFormat method, and a dummy OpenGL context is initialized.
However, this method does not work properly for render window created for use
with QVTKWidget.
The problem is that the following snippet of code does not create temporary
window as it is expected:
==============================================================================
void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags,
int debug, int bpp,
int zbpp)
{
// Create a dummy window, needed for calling wglGetProcAddress.
#ifdef UNICODE
HWND tempId = CreateWindow(L"vtkOpenGL", 0, 0, 0, 0, 1, 1, 0, 0,
this->ApplicationInstance, 0);
#else
HWND tempId = CreateWindow("vtkOpenGL", 0, 0, 0, 0, 1, 1, 0, 0,
this->ApplicationInstance, 0);
#endif
=============================================================================
The reason is that the "vtkOpenGL" window class is not registered, and as a
result -- the returned "tempId" identifier is NULL.
Please have a look at the attached patch, that solves the problem.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-05-23 11:21 Anton Poletaev New Issue
2013-05-23 11:21 Anton Poletaev File Added: patch.diff
======================================================================
More information about the vtk-developers
mailing list