2015-08-26 16:30:15 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2015-08-26 16:30:15 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
2017-09-18 19:45:18 +00:00
|
|
|
#include <GL/glew.h>
|
|
|
|
#include <vtkm/interop/testing/TestingOpenGLInterop.h>
|
|
|
|
#include <vtkm/rendering/CanvasEGL.h>
|
2015-08-26 16:30:15 +00:00
|
|
|
|
|
|
|
//This sets up testing with the default device adapter and array container
|
2016-09-28 15:38:31 +00:00
|
|
|
#include <vtkm/cont/serial/DeviceAdapterSerial.h>
|
2015-08-26 16:30:15 +00:00
|
|
|
|
2019-01-01 22:19:02 +00:00
|
|
|
int UnitTestTransferEGL(int argc, char* argv[])
|
2015-08-26 16:30:15 +00:00
|
|
|
{
|
2019-01-01 22:19:02 +00:00
|
|
|
vtkm::cont::Initialize(argc, argv);
|
|
|
|
|
2016-10-06 15:24:08 +00:00
|
|
|
//get egl canvas to construct a context for us
|
2017-05-18 14:29:41 +00:00
|
|
|
vtkm::rendering::CanvasEGL canvas(1024, 1024);
|
2016-10-06 15:24:08 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
//get glew to bind all the opengl functions
|
|
|
|
glewInit();
|
2016-10-06 15:24:08 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
return vtkm::interop::testing::TestingOpenGLInterop<vtkm::cont::DeviceAdapterTagSerial>::Run();
|
2015-08-26 16:30:15 +00:00
|
|
|
}
|