本文整理匯總了C#中Sledge.UI.Viewport3D.MakeCurrent方法的典型用法代碼示例。如果您正苦於以下問題:C# Viewport3D.MakeCurrent方法的具體用法?C# Viewport3D.MakeCurrent怎麽用?C# Viewport3D.MakeCurrent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sledge.UI.Viewport3D
的用法示例。
在下文中一共展示了Viewport3D.MakeCurrent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Create3D
private static Viewport3D Create3D(Viewport3D.ViewType type)
{
var viewport = new Viewport3D(type)
{
Dock = DockStyle.Fill,
Camera =
{
Location = new Vector3(0, 0, 0),
LookAt = new Vector3(0, 1, 0),
FOV = Sledge.Settings.View.CameraFOV,
ClipDistance = Sledge.Settings.View.BackClippingPane
},
VSync = false
};
viewport.MakeCurrent();
GraphicsHelper.InitGL3D();
GL.ClearColor(Sledge.Settings.View.ViewportBackground);
viewport.Listeners.Add(new ViewportLabelListener(viewport));
viewport.Listeners.Add(new Camera3DViewportListener(viewport));
viewport.Listeners.Add(new ToolViewportListener(viewport));
return viewport;
}