JBenghiat Posted September 14, 2018 Share Posted September 14, 2018 I have a button that changes to a 3D view based on the plug-in's orientation. I can't get the render mode to change. I've tried: gSDK->SetRenderMode(gSDK->GetActiveLayer(), renderOpenGL, true, true); gSDK->NewCurrentViewMatrix(viewMatrix, true); WorldRect drawRect; ViewRect windowRect; gSDK->GetScreenSize(windowRect); gSDK->ViewRect2WorldRect(windowRect, drawRect); gSDK->RedrawRect(drawRect); in various orders, but the render mode always stays as is. The RW camera successfully changes render modes, so this must be possible... Quote Link to comment
JBenghiat Posted September 25, 2018 Author Share Posted September 25, 2018 So far my only solution involves DoMenuName()... Quote Link to comment
JBenghiat Posted October 10, 2018 Author Share Posted October 10, 2018 Ok, figured it out. This works: gSDK->SwitchFromPlanTo3DView(); gSDK->SetViewMatrixByVector(lookFrom, lookTo, WorldPt3(0, 0, 1), viewMatrix); gSDK->SetRenderMode(gSDK->GetActiveLayer(), renderOpenGL, true, true); gSDK->NewCurrentViewMatrix(viewMatrix, false); gSDK->RefreshRenderingForSelectedObjects(); I didn't take the time to test whether SwitchFromPlanTo3DView() or RefreshRenderingForSelectedObjects() or both are what makes it work, but it's been reliable so far. Quote Link to comment
Tea Posted March 21, 2022 Share Posted March 21, 2022 I had the same problem, but your solution didn't work for me unfortunately. I still cannot change the Render Mode using gSDK->SetRenderMode() in any way. Quote Link to comment
Stefan Bender Posted March 23, 2022 Share Posted March 23, 2022 Did you try all render modes? OpenGL isn't available anymore in VW 2022 and at least one of the render mode constants is not working at all. IIrc there's a thread about it somewhere. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.