MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000619 | VTK | (No Category) | public | 2004-02-23 04:16 | 2011-01-13 17:00 |
Reporter | robert.nelson | ||||
Assigned To | Mathieu Malaterre | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Project | |||||
Type | |||||
Summary | 0000619: Java does not work with VTK on Mac OS X | ||||
Description | I have OS X version 10.2.8 and Java v1.4.1_01-69.1 I had to perform the following hack (found in the mailing list archive) to get the java bindings to build: > in VTK/Common/vtkJavaAwt.h change lines 86 through 88 from:- > > JAWT_MacDrawingSurfaceInfo* dsi_mac; > dsi_mac = (JAWT_MacDrawingSurfaceInfo*)dsi->platformInfo; > temp0->SetWindowId((void *)dsi_mac->fQDWindow); > > to:- > > JAWT_MacOSXDrawingSurfaceInfo* dsi_mac; > dsi_mac = (JAWT_MacOSXDrawingSurfaceInfo*)dsi->platformInfo; > temp0->SetWindowId((void *)dsi_mac->cgWindowID); I then have something which does not work. The program I want to run is too large so I've created the following program which works on the PC - you get a Cone which can be rotated with the mouse. Under CARBON I just get a blank window. Under COCOA I get a bus error: #0 0x90986b18 in glMatrixMode () #1 0x0668159c in vtkCocoaRenderWindow::OpenGLInit() () #2 0x06681bd0 in vtkCocoaRenderWindow::WindowInitialize() () #3 0x06680b38 in vtkCocoaRenderWindow::Start() () #4 0x066449ec in vtkRenderWindow::DoStereoRender() () #5 0x066449b0 in vtkRenderWindow::DoFDRender() () #6 0x066445c4 in vtkRenderWindow::DoAARender() () #7 0x06643dcc in vtkRenderWindow::Render() () ... The program is: import java.awt.*; import javax.swing.*; public class ConeFrame extends JFrame { public ConeFrame() { } public static void main(String [] args) { ConePanel panel= new ConePanel(); panel.drawMe(); JFrame frame= new ConeFrame(); frame.getContentPane().add(panel); frame.setSize(600,600); frame.show(); } } and: import vtk.*; import java.awt.*; public class ConePanel extends vtk.vtkPanel { public ConePanel(){ } public void drawMe () { vtkConeSource cone = new vtkConeSource(); cone.SetHeight( 3.0 ); cone.SetRadius( 1.0 ); cone.SetResolution( 10 ); vtkPolyDataMapper coneMapper = new vtkPolyDataMapper(); coneMapper.SetInput( cone.GetOutput() ); vtkActor coneActor = new vtkActor(); coneActor.SetMapper( coneMapper ); vtkRenderer ren1 = GetRenderer(); //new vtkRenderer(); ren1.AddActor( coneActor ); ren1.SetBackground( 0.1, 0.2, 0.4 ); enableEvents(AWTEvent.WINDOW_EVENT_MASK); } } | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://www.vtk.org/Bug/file/5052/java.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2007-08-28 14:17 | Zack Galbreath | Project | @8@ => VTK | ||
2007-08-28 14:17 | Zack Galbreath | Assigned To | Charles Law => Mathieu Malaterre | ||
2007-08-28 14:17 | Zack Galbreath | Status | @80@ => closed | ||
2007-08-28 14:17 | Zack Galbreath | Resolution | won't fix => fixed | ||
2007-08-28 14:17 | Zack Galbreath | Summary | Goodsite => Java does not work with VTK on Mac OS X | ||
2007-08-28 14:18 | Zack Galbreath | Note Deleted: 0008258 | |||
2010-11-29 17:59 | Mathieu Malaterre | Source_changeset_attached | => VTK master 30b322a6 | ||
2011-01-13 17:00 | Source_changeset_attached | => VTK master a2bd8391 | |||
2011-01-13 17:00 | Source_changeset_attached | => VTK master 020ef709 | |||
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|