Hello. VTK versions 7 and 8 shipped with a visual component/widget for C++Builder (eg: VTK-7.1.1\Examples\GUI\Win32\vtkBorland\Package). This is not present in VTK 9.
I would simply make a pull request myself – we’ve had several bug reports filed by customers about this – but it takes time to get approval to contribute to external code bases I apologise for that. I can absolutely help in any way short of directly making a pull request with code I write until I get that approval. FWIW, the existing component from v8 should work unless VTK itself has made API changes. On the CB side we are 100% backwards compatible in this area.
The VTK CMake API changed, but it probably shouldn’t be too hard to port the relevant bits from the example. The examples themselves have changed a bit too. I don’t think anyone here has access to test any such support here, but if you’d like to submit an MR with support that works as you need, I think that would be acceptable.
Yes - it has not been maintained since VTK 5.
But it was still usable.
I use VTK 7.1.1 with C++ Builder 11.3 and with the current version 12.2.
The current C++Builder version is CMake compatible again.
The current VTK can be build with it.
It shouldn’t be too difficult to re-include the code for the visual component/widget.
The README and other files (.bpk, .bpr) would need to be updated, because library names and contents have changed since VTK 5. And references to “Borland” changed to “Embarcadero”. Plus testing to demonstrate that it actually works with VTK 9.4. None of that is difficult, but it would still take time (several hours at least) and access to a C++Builder environment.
This is a nice project, but I do not think it should be inside of VTK. Such a project deserve its own repository with maintainers dedicated to keep it working and its own CI.
I have now compiled and linked the old Borland VTK 5 component against VTK 9.3.
BTW perhaps “Borland” should be replaced with “VCL” instead of “Embarcadero”. I will determine this with others. Any suggestions?
That has worked so far.
The component can be installed and used in a C++Builder Win64x application.
There is still a problem at the moment, probably with the initialization.
Maybe I’m missing context for what this is doing (I’ve never used C++Builder myself). Is it proposed that vtkVCLRenderWindow be shipped with VTK itself or is it part of an example? Or is it more like an IDE plugin that VTK would ship (in the vein of the QtDesigner plugin I think we used to ship to make it aware of QVTKWidget beyond “custom widget”)?
Older VTK versions (up to and including version 8) included the code for a visual component that could be used in C++Builder. The code was always located here:
vtk\VTK5.10.1\Examples\GUI\Win32\vtkBorland
However, the Borland compiler (bcc23, bcc64) eventually became unable to build VTK – but with the current compiler (bcc64x), it works again.
I personally use the component in the current C++Builder 12.3. It would be very convenient if the component could be added back to the VTK repository.
I renamed the component because Borland no longer exists in this sense, and VCL is the name of the GUI framework (corresponding to Qt) used in C++Builder.
Maybe \GUISupport is a better location for vtkVCLRenderWindow?
The visual component library, VCL, is a set of gui components developed by Borland for Delphi and C++ Builder (originally Windows desktop) applications.
Compiling VTK using C++ Builder emits objects that can be linked into BPLs (Borland package library) and used in other C++ Builder projects where standard C++ compiler output cannot.