Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSharp sample is error. #717

Open
toolgood opened this issue Jul 17, 2019 · 0 comments
Open

CSharp sample is error. #717

toolgood opened this issue Jul 17, 2019 · 0 comments

Comments

@toolgood
Copy link

Position:OCCTProxy->InitViewer

bool InitViewer(System::IntPtr theWnd)
	{
		try
		{
			Handle(Aspect_DisplayConnection) aDisplayConnection;
			myGraphicDriver() = new OpenGl_GraphicDriver(aDisplayConnection);
		}
		catch (Standard_Failure)
		{
			return false;
		}

		TCollection_ExtendedString a3DName("Visu3D");
		myViewer() = new V3d_Viewer(myGraphicDriver(), a3DName.ToExtString(), "", 1000.0,
			V3d_XposYnegZpos, Quantity_NOC_GRAY30,
			V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
			Standard_True, Standard_False);

		myViewer()->SetDefaultLights();
		myViewer()->SetLightOn();
		myView() = myViewer()->CreateView();
		Handle(WNT_Window) aWNTWindow = new WNT_Window(reinterpret_cast<HWND> (theWnd.ToPointer()));
		myView()->SetWindow(aWNTWindow); //is error, show "System.Runtime.InteropServices.SEHException:“外部组件发生异常。”"

window 10
vs 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant