Archived issue #0029187

VIS - TKIVtkDraw should support Cocoa on macOS

Open CASCADEOCCT:VISassigned6 public notes

Search issues

Description

USE_VTK option was turned on for successfully testing occt on macOS platform. I'm trying to build occt with vtk-7.1.1 (built with option VTK_USE_X) and get following error:
/OCCT_SRC/src/IVtkDraw/IVtkDraw.cxx:217:15: error: use of undeclared identifier 'Xw_Window'; did you mean 'XtWindow'?
/OCCT_SRC/src/IVtkDraw/IVtkDraw.cxx:217:15: error: template argument for template type parameter must be a type
static Handle(Xw_Window)& GetWindow()
              ^~~~~~~~~

Used vtk: [user path removed]/tools/WOK680/3rdparty/mac64/vtk-7.1.1

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Wed Oct 11 15:56:44 2017 +0300

    0029187: VIS - TKIVtkDraw should support Cocoa on macOS
    
    Adding support of Cocoa on macOS
    Fox launching test cases on macOS
    Test cases failed when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar.
    The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer".
02Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Author
Dear kgv, could you please review CR29187.
05Commenter 3
> Solve compatibility problem with VTK-7.x.x,
> since vtkRenderingFreeTypeOpenGL used only if VTK_OPENGL2_BACKEND is defined.
It looks unrelated to the bug - please move correction for VTK-7 compatibility to another issue.

> Test cases failed when $lst starts with numeral,
> because upvar guesses that its first parameter is level rather than otherVar.
Sorry, how this issue occurred?
It also looks unrelated to this bug.

#ifndef _WIN32
 #include <X11/X.h>
 #include <X11/Shell.h>
 #include <X11/Xlib.h>
 #include <GL/glx.h>
-#include <Xw_Window.hxx>
 #include <vtkXRenderWindowInteractor.h>
 #include <vtkXOpenGLRenderWindow.h>
 #include <X11/Xutil.h>
 #include <tk.h>
#endif

Shouldn't all these X11 includes fail on macOS?

+#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+  // __APPLE__
+#else
+  // _WIN32
+  aRenWin->SetWindowId((void*)GetWindow()->HWindow());
+#endif

How this is supposed to work if Cocoa_Window is not associated with vtkRenderWindow in any way?
Also - broken indentation on these lines.
06Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]

Related records