remove wpf reference
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
<AssemblyName>Pilz.Drawing.Drawing3D.OpenGLFactory</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -49,13 +50,12 @@
|
||||
<Reference Include="OpenTK.GLControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\portable-net45+win8+wp8+wpa81\System.Numerics.Vectors.dll</HintPath>
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports Point = System.Drawing.Point
|
||||
Imports KeyboardState = OpenTK.Input.KeyboardState
|
||||
Imports Keyboard = OpenTK.Input.Keyboard
|
||||
Imports Key = OpenTK.Input.Key
|
||||
Imports Color = System.Drawing.Color
|
||||
|
||||
Namespace PreviewN
|
||||
|
||||
@@ -25,12 +26,22 @@ Namespace PreviewN
|
||||
Private _isMouseDown As Boolean = False
|
||||
Private isDeactivated As Boolean = False
|
||||
Private ReadOnly myModels As New Dictionary(Of Object3D, Renderer)
|
||||
Private WithEvents RenderTimer As New Timers.Timer(1) With {.AutoReset = True}
|
||||
|
||||
Public Property RenderWhenWindowsIsInactive As Boolean = False
|
||||
Public Property EnableCameraControlling As Boolean = True
|
||||
Public Property Scaling As Single = 500.0F
|
||||
Public Property ClearColor As Color = Color.CornflowerBlue
|
||||
|
||||
Public Property RenderInterval As Double
|
||||
Get
|
||||
Return renderTimer.Interval
|
||||
End Get
|
||||
Set
|
||||
renderTimer.Interval = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Camera As Camera
|
||||
Get
|
||||
Return MyCamera
|
||||
@@ -111,7 +122,7 @@ Namespace PreviewN
|
||||
Me.glControl1.VSync = False
|
||||
Me.Controls.Add(Me.glControl1)
|
||||
Me.ResumeLayout(False)
|
||||
AddHandler Windows.Media.CompositionTarget.Rendering, AddressOf CompositionTarget_Rendering
|
||||
renderTimer.Start()
|
||||
|
||||
Scaling = scale
|
||||
|
||||
@@ -194,7 +205,7 @@ Namespace PreviewN
|
||||
isDeactivated = True
|
||||
End Sub
|
||||
|
||||
Private Sub CompositionTarget_Rendering(sender As Object, e As EventArgs)
|
||||
Private Sub RenderTimer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) Handles RenderTimer.Elapsed
|
||||
If Not isDeactivated OrElse RenderWhenWindowsIsInactive Then
|
||||
RaiseEvent WandUpdateView()
|
||||
glControl1.Invalidate()
|
||||
|
||||
@@ -3,6 +3,7 @@ Imports OpenTK
|
||||
Imports OpenTK.Graphics.OpenGL
|
||||
Imports System.Drawing
|
||||
Imports System.Drawing.Imaging
|
||||
Imports Bitmap = System.Drawing.Bitmap
|
||||
|
||||
Namespace RenderingN
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ Imports System.Windows.Forms
|
||||
Imports OpenTK
|
||||
Imports OpenTK.Graphics.OpenGL
|
||||
Imports Pilz.S3DFileParser
|
||||
Imports Bitmap = System.Drawing.Bitmap
|
||||
Imports Color = System.Drawing.Color
|
||||
Imports Image = System.Drawing.Image
|
||||
|
||||
Namespace RenderingN
|
||||
|
||||
@@ -391,7 +394,8 @@ Namespace RenderingN
|
||||
|
||||
GL.BindBuffer(BufferTarget.ElementArrayBuffer, IndicesBuffers(mesh)(iFace))
|
||||
|
||||
GL.Color4(Color.FromArgb(&H20000000 + (iMesh << 16) + iFace)) 'Color: "2f ff xx xx" -> where 'f' = mesh index and where 'x' is face index
|
||||
Dim colorCode As Integer = &H20000000 + (iMesh << 16) + iFace
|
||||
GL.Color4(OpenTK.Color.FromArgb((colorCode >> 24) And &HFF, (colorCode >> 16) And &HFF, (colorCode >> 8) And &HFF, colorCode And &HFF)) 'Color: "2f ff xx xx" -> where 'f' = mesh index and where 'x' is face index
|
||||
|
||||
GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="OpenTK" version="3.1.0" targetFramework="net45" />
|
||||
<package id="OpenTK.GLControl" version="3.1.0" targetFramework="net45" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net45" />
|
||||
<package id="OpenTK" version="3.1.0" targetFramework="net472" />
|
||||
<package id="OpenTK.GLControl" version="3.1.0" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user