Skip to content

Commit

Permalink
review mw
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk committed Jul 10, 2023
1 parent 2e7afa3 commit a84339d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions application/F3DConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace F3D
const std::string PluginsInstallDir = "@F3D_PLUGINS_INSTALL_DIR@";
}

// TODO: Use CMake definitions and get rid of these
#cmakedefine01 F3D_MACOS_BUNDLE
#cmakedefine01 F3D_MODULE_RAYTRACING
#cmakedefine01 F3D_MODULE_EXR
Expand Down
1 change: 1 addition & 0 deletions library/VTKExtensions/Core/vtkF3DConfigure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
static const std::string F3D_RESERVED_STRING = "f3d_reserved";
static const std::string F3D_EXIT_HOTKEY_SYM = "Escape";

// TODO: Use CMake definitions and get rid of these
#cmakedefine01 F3D_WINDOWS_GUI

#cmakedefine01 F3D_MODULE_EXTERNAL_RENDERING
Expand Down
2 changes: 2 additions & 0 deletions library/public/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class F3D_EXPORT image
/**
* Set/Get image buffer data.
* Its size is expected to be `width * height * channelCount * typeSize`.
*
* \deprecated { setData and getData are deprecated, use setContent and getContent instead }
*/
image& setContent(void* buffer);
void* getContent() const;
Expand Down
2 changes: 1 addition & 1 deletion library/testing/TestSDKExternalWindowQT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class F3DWindow : public QOpenGLWindow
QImage frameBuffer = grabFramebuffer().mirrored().convertToFormat(QImage::Format_RGB888);

f3d::image img(frameBuffer.width(), frameBuffer.height(), 3);
img.setData(frameBuffer.bits());
img.setContent(frameBuffer.bits());

if (!TestSDKHelpers::RenderTest(
img, this->mBaselinePath, this->mOutputPath, "TestSDKExternalWindowQT"))
Expand Down
5 changes: 4 additions & 1 deletion python/F3DPythonBindings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ PYBIND11_MODULE(f3d, module)
.def_static("getReadersInfo", &f3d::engine::getReadersInfo)
.def_static("getPluginsList", &f3d::engine::getPluginsList);

// deprecated functions, will be removed in the next major release
// deprecated functions, will be removed in the next major release, F3D v3.0.0
#ifndef F3D_NO_DEPRECATED
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
image.def("setResolution",
[](f3d::image& img, unsigned int width, unsigned height)
{
Expand Down Expand Up @@ -288,5 +290,6 @@ PYBIND11_MODULE(f3d, module)
PyErr_WarnEx(PyExc_DeprecationWarning, "getData is deprecated, use getContent instead.", 1);
getImageBytes(img);
});
#pragma GCC diagnostic pop
#endif
}

0 comments on commit a84339d

Please sign in to comment.