[vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx

Richard Frank rickfrank at me.com
Sun Apr 3 20:37:43 EDT 2016


In moving my 6.3.0 code to 7.0.0 iv'e run into the following issue:

When I try to render my volume, the App crashes in vtkOpenGLGPUVolumeRayCastMapper.cxx line 2514...

--------------------------------------------------------------------
// Now compile the shader
//--------------------------------------------------------------------------
this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram(
vertexShader.c_str(), fragmentShader.c_str(), "");
if (!this->Impl->ShaderProgram->GetCompiled())
{
vtkErrorMacro("Shader failed to compile");
}

this->Impl->ShaderBuildTime.Modified();
--------------------------------------------------------------------------
The shader fails to compile and so this->Impl->ShaderProgram is null.
However, the check following is incorrect because this->Impl->ShaderProgram is null and so the program crashes trying to dereference the null pointer.

The shader compile error is below:


ERROR: \vtk700\Rendering\OpenGL2\vtkShaderProgram.cxx, line 370
vtkShaderProgram (00000000224A9D70): 0(169) : error C1008: undefined variable "g_aspect"
0(170) : error C1008: undefined variable "g_aspect"
0(171) : error C1008: undefined variable "g_aspect"



Is there something I'm doing wrong here? Seems like it's really a bug in the shader program, and the error handling for failure to compile...

Thanks

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160404/53b43b3e/attachment.html>


More information about the vtkusers mailing list