[vtkusers] "SetPixelFormat failed" problem in vtkWin32OpenGLRenderWindow class SetupMemoryRendering() function
Pengfei Liu
lpf at vico-lab.com
Tue Jan 25 10:55:09 EST 2011
Can anybody give me some suggestion.
It is a bug of vtkWin32OpenGLRenderWindow? Or I did wrong when do double
buffering?
Best Regards
Pengfei Liu
-----邮件原件-----
发件人: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] 代表
liupf201
发送时间: 2011年1月24日 18:10
收件人: vtkusers at vtk.org
主题: [vtkusers] "SetPixelFormat failed" problem in
vtkWin32OpenGLRenderWindow class SetupMemoryRendering() function
Hi
I have some problem with the SetupMemoryRendering() method in class
vtkWin32OpenGLRenderWindow.
I create a C++/CLI Form application and want to display images with double
buffering mode.
So I called SetupMemoryRendering() method in a vtkWin32OpenGLRenderWindow
class object And transfer a bitmap parameter instead of current window
control handle.
But always app pop up a message box "SetPixelFormat failed"
Here is code:
----------------------------------------------------------------------------
-
// no related with Format32bppRgb, the problem happens when set other value.
Bitmap Bitmap(nWidth, nHeight, PixelFormat::Format32bppRgb);
m_hBitmap = (HBITMAP)Bitmap.GetHbitmap().ToInt32();
this->m_prenWin->SetupMemoryRendering(this->m_hBitmap);
----------------------------------------------------------------------------
-
This problem happens in my 2 PCs. It has no relationship with OS and display
cards.
The code is run in main thread. So No need considering multi-thread problem.
My VTK version is vtk5.6.
Can anybody give me some suggestion?
Best Regards
Pengfei Liu
--
View this message in context:
http://vtk.1045678.n5.nabble.com/SetPixelFormat-failed-problem-in-vtkWin32Op
enGLRenderWindow-class-SetupMemoryRendering-function-tp3354446p3354446.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list