upgrade to .net6 part 2
This commit is contained in:
@@ -11,6 +11,7 @@ Imports OpenTK.Mathematics
|
||||
Imports OpenTK.WinForms
|
||||
Imports OpenTK.Input
|
||||
Imports OpenTK.Windowing.GraphicsLibraryFramework
|
||||
Imports Key = OpenTK3.Input.Key
|
||||
|
||||
Namespace PreviewN
|
||||
|
||||
@@ -31,6 +32,12 @@ Namespace PreviewN
|
||||
Public Property Scaling As Single = 500.0F
|
||||
Public Property ClearColor As Color = Color.CornflowerBlue
|
||||
|
||||
Public ReadOnly Property Keyboard As OpenTK3.Input.KeyboardState
|
||||
Get
|
||||
Return OpenTK3.Input.Keyboard.GetState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property EnableCameraControlling As Boolean
|
||||
Get
|
||||
Return _EnableCameraControlling
|
||||
@@ -82,14 +89,14 @@ Namespace PreviewN
|
||||
|
||||
Private ReadOnly Property IsStrgPressed As Boolean
|
||||
Get
|
||||
Dim state As KeyboardState = Keyboard.GetState()
|
||||
Dim state = Keyboard
|
||||
Return state(Key.ControlLeft) OrElse state(Key.ControlRight)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property IsShiftPressed As Boolean
|
||||
Get
|
||||
Dim state As KeyboardState = Keyboard.GetState()
|
||||
Dim state = Keyboard
|
||||
Return state(Key.ShiftLeft) OrElse state(Key.ShiftRight)
|
||||
End Get
|
||||
End Property
|
||||
@@ -286,7 +293,7 @@ Namespace PreviewN
|
||||
Dim allowCamMove As Boolean = Not (IsMouseDown AndAlso IsShiftPressed)
|
||||
|
||||
If allowCamMove Then
|
||||
Dim state As KeyboardState = Keyboard.GetState
|
||||
Dim state = Keyboard
|
||||
|
||||
If state(Key.W) Then
|
||||
'camera.Move(moveSpeed, moveSpeed, camMtx)
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Imports OpenTK
|
||||
Imports OpenTK.Graphics.OpenGL
|
||||
Imports OpenTK.Mathematics
|
||||
|
||||
Imports Pilz.S3DFileParser
|
||||
|
||||
Imports Bitmap = System.Drawing.Bitmap
|
||||
Imports Color = System.Drawing.Color
|
||||
Imports Image = System.Drawing.Image
|
||||
|
||||
Reference in New Issue
Block a user