mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Hello World example once again computes intial point values correctly.
Incorrect casting conversions caused the hello_world example to divide in integer space rather than float space.
This commit is contained in:
parent
938db09ad5
commit
92ac1db4eb
@ -86,8 +86,10 @@ struct HelloVTKMInterop
|
||||
{
|
||||
for (int j = 0; j < dim; ++j)
|
||||
{
|
||||
this->InputData.push_back(vtkm::Vec<T, 3>(
|
||||
2.f * static_cast<T>(i / dim) - 1.f, 0.f, 2.f * static_cast<T>(j / dim) - 1.f));
|
||||
vtkm::Vec<T, 3> t(2.f * (static_cast<T>(i) / static_cast<T>(dim)) - 1.f,
|
||||
0.f,
|
||||
2.f * (static_cast<T>(j) / static_cast<T>(dim)) - 1.f);
|
||||
this->InputData.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
@ -169,7 +171,6 @@ struct HelloVTKMInterop
|
||||
|
||||
vtkm::interop::TransferToOpenGL(this->OutCoords, this->VBOState, DeviceAdapter());
|
||||
vtkm::interop::TransferToOpenGL(this->OutColors, this->ColorState, DeviceAdapter());
|
||||
|
||||
this->render();
|
||||
if (t > 10)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user