[vtkusers] Using vtkAxesActor with MFC application gives exception in vtkPixelBufferObject::CreateBuffer()

Geeta geeta_kapse at yahoo.com
Tue May 27 08:20:35 EDT 2014


Hi

I am working on application using MFC MDI (VS 2010) and VTK.

I want to show X,Y, Z  axis . I tried vtkAxesActor class.

But if I add following lines in my code , I get exception at "RedrawWindow"
line

	    vtkMFCWindow *pvtkMFCWindow = vtkMFCWindow::New();
	    vtkRenderer *pvtkRenderer = vtkRenderer::New();

		vtkAxesActor* axes =  vtkAxesActor::New(); 
		pvtkRenderer->AddActor(axes);
                pvtkMFCWindow->RedrawWindow();


Exception = "First-chance exception at 0x00000000 in
FaceAuthenticationSupportApp.exe: 0xC0000005: Access violation reading
location 0x00000000.
Unhandled exception at 0x00000000 in FaceAuthenticationSupportApp.exe:
0xC0000005: Access violation reading location 0x00000000.
The program '[3804] FaceAuthenticationSupportApp.exe: Native' has exited
with code 0 (0x0)."

and program halts at " vtkgl::GenBuffers(1, &ioBuf);"

void vtkPixelBufferObject::CreateBuffer()
{
  this->Context->MakeCurrent();
  if (!this->Handle)
    {
    GLuint ioBuf;
*    vtkgl::GenBuffers(1, &ioBuf);*
    vtkGraphicErrorMacro(this->Context,"after GenBuffers");
    this->Handle = ioBuf;
    }
}


Please help; spent whole day today :(:(




--
View this message in context: http://vtk.1045678.n5.nabble.com/Using-vtkAxesActor-with-MFC-application-gives-exception-in-vtkPixelBufferObject-CreateBuffer-tp5727248.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list