------------------------------------------------------------------------------
| 2676 | |
| 2677 | //------------------------------------------------------------------------------ |
| 2678 | int vtkOpenGLRenderWindow::SetZbufferData(int x1, int y1, int x2, int y2, vtkFloatArray* buffer) |
| 2679 | { |
| 2680 | int width, height; |
| 2681 | width = abs(x2 - x1) + 1; |
| 2682 | height = abs(y2 - y1) + 1; |
| 2683 | int size = width * height; |
| 2684 | if (buffer->GetMaxId() + 1 != size) |
| 2685 | { |
| 2686 | vtkErrorMacro("Buffer is of wrong size."); |
| 2687 | return VTK_ERROR; |
| 2688 | } |
| 2689 | return this->SetZbufferData(x1, y1, x2, y2, buffer->GetPointer(0)); |
| 2690 | } |
| 2691 | |
| 2692 | //------------------------------------------------------------------------------ |
| 2693 | int vtkOpenGLRenderWindow::SetZbufferData(int x1, int y1, int x2, int y2, float* buffer) |