[vtkusers] "SetPixelFormat failed" problem in vtkWin32OpenGLRenderWindow class SetupMemoryRendering() function
liupf201
lpf at vico-lab.com
Mon Jan 24 05:10:02 EST 2011
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-vtkWin32OpenGLRenderWindow-class-SetupMemoryRendering-function-tp3354446p3354446.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list