mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
fixes to match old files
This commit is contained in:
parent
abf5692887
commit
62fe68acdd
@ -88,7 +88,7 @@ set(sources
|
||||
DecodePNG.cxx
|
||||
EncodePNG.cxx
|
||||
raytracing/Logger.cxx
|
||||
)
|
||||
)
|
||||
|
||||
# This list of sources has code that uses devices and so might need to be
|
||||
# compiled with a device-specific compiler (like CUDA).
|
||||
@ -103,7 +103,6 @@ set(device_sources
|
||||
ColorBarAnnotation.cxx
|
||||
ColorLegendAnnotation.cxx
|
||||
ConnectivityProxy.cxx
|
||||
DecodePNG.cxx
|
||||
LineRenderer.cxx
|
||||
Mapper.cxx
|
||||
MapperConnectivity.cxx
|
||||
|
@ -523,8 +523,7 @@ bool Canvas::LoadFont() const
|
||||
const std::vector<unsigned char>& rawPNG = Internals->Font.GetRawImageData();
|
||||
std::vector<unsigned char> rgba;
|
||||
unsigned long textureWidth, textureHeight;
|
||||
auto error =
|
||||
vtkm::rendering::DecodePNG(rgba, textureWidth, textureHeight, &rawPNG[0], rawPNG.size());
|
||||
auto error = DecodePNG(rgba, textureWidth, textureHeight, &rawPNG[0], rawPNG.size());
|
||||
if (error != 0)
|
||||
{
|
||||
return false;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
#include <vtkm/thirdparty/lodepng/vtkmlodepng/lodepng.h>
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -8,13 +8,14 @@
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/rendering/WorldAnnotatorGL.h>
|
||||
|
||||
#include <vtkm/Matrix.h>
|
||||
#include <vtkm/rendering/BitmapFontFactory.h>
|
||||
#include <vtkm/rendering/Color.h>
|
||||
#include <vtkm/rendering/DecodePNG.h>
|
||||
#include <vtkm/rendering/MatrixHelpers.h>
|
||||
#include <vtkm/rendering/Scene.h>
|
||||
#include <vtkm/rendering/WorldAnnotatorGL.h>
|
||||
|
||||
#include <vtkm/rendering/internal/OpenGLHeaders.h>
|
||||
|
||||
@ -102,7 +103,7 @@ void WorldAnnotatorGL::RenderText(vtkm::Float32 scale,
|
||||
const std::vector<unsigned char>& rawpngdata = this->Font.GetRawImageData();
|
||||
|
||||
std::vector<unsigned char> rgba;
|
||||
unsigned width, height;
|
||||
unsigned long width, height;
|
||||
int error = vtkm::rendering::DecodePNG(rgba, width, height, &rawpngdata[0], rawpngdata.size());
|
||||
if (error != 0)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ set(unit_tests
|
||||
UnitTestScalarRenderer.cxx
|
||||
)
|
||||
|
||||
vtkm_unit_tests(SOURCES ${unit_tests} ALL_BACKENDS LIBRARIES vtkm_rendering vtkm_lodepng)
|
||||
vtkm_unit_tests(SOURCES ${unit_tests} ALL_BACKENDS LIBRARIES vtkm_rendering)
|
||||
|
||||
if(VTKm_ENABLE_GL_CONTEXT)
|
||||
# message(STATUS "rendering testing/glfw needs a FindGLFW")
|
||||
|
16
vtkm/thirdparty/lodepng/CMakeLists.txt
vendored
16
vtkm/thirdparty/lodepng/CMakeLists.txt
vendored
@ -13,8 +13,12 @@ set(headers
|
||||
set(sources
|
||||
vtkmlodepng/lodepng.cpp
|
||||
)
|
||||
# vtkm_library(NAME vtkm_lodepng HEADERS ${headers} SOURCES ${sources})
|
||||
|
||||
# Mark this lib as STATIC for usage in Windows without requiring dll_export
|
||||
# if a SHARED lib is ever required you will need to generate the export
|
||||
# headers and add them to the lodepng functions that should be shared
|
||||
add_library(vtkm_lodepng STATIC ${headers} ${sources})
|
||||
|
||||
if(DEFINED VTKm_CUSTOM_LIBRARY_SUFFIX)
|
||||
set(_lib_suffix "${VTKm_CUSTOM_LIBRARY_SUFFIX}")
|
||||
else()
|
||||
@ -29,14 +33,16 @@ set_target_properties(vtkm_lodepng
|
||||
VERSION 1
|
||||
SOVERSION 1
|
||||
)
|
||||
vtkm_generate_export_header(vtkm_lodepng)
|
||||
target_include_directories(vtkm_lodepng INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:${VTKm_INSTALL_INCLUDE_DIR}/vtkm/thirdparty/lodepng>
|
||||
)
|
||||
install(DIRECTORY vtkmlodepng
|
||||
DESTINATION "${VTKm_INSTALL_INCLUDE_DIR}/vtkm/thirdparty/lodepng"
|
||||
)
|
||||
|
||||
if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
|
||||
install(DIRECTORY vtkmlodepng
|
||||
DESTINATION "${VTKm_INSTALL_INCLUDE_DIR}/vtkm/thirdparty/lodepng/"
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS vtkm_lodepng
|
||||
EXPORT ${VTKm_EXPORT_NAME}
|
||||
|
Loading…
Reference in New Issue
Block a user