This commit is contained in:
Captain ALM 2019-09-27 17:26:42 +01:00
parent bd762e9659
commit b136cb3adf
11 changed files with 422 additions and 3 deletions

View File

@ -1,8 +1,10 @@
 
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2005 # Visual Studio 2010
# SharpDevelop 4.4 # SharpDevelop 4.4
Project("") = "3DGDIRender", "3DGDIRender\3DGDIRender.vbproj", "6F70EF7B-C63A-4338-99CB-027B0C6DE0C1" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "3DGDIRender", "3DGDIRender\3DGDIRender.vbproj", "6F70EF7B-C63A-4338-99CB-027B0C6DE0C1"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "3DTest", "3DTest\3DTest.vbproj", "{700D1C95-F579-412C-9FB3-69FDB0B93F83}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -14,5 +16,9 @@ Global
6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Debug|Any CPU.ActiveCfg = Debug|Any CPU 6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Release|Any CPU.Build.0 = Release|Any CPU 6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Release|Any CPU.Build.0 = Release|Any CPU
6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Release|Any CPU.ActiveCfg = Release|Any CPU 6F70EF7B-C63A-4338-99CB-027B0C6DE0C1.Release|Any CPU.ActiveCfg = Release|Any CPU
{700D1C95-F579-412C-9FB3-69FDB0B93F83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{700D1C95-F579-412C-9FB3-69FDB0B93F83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{700D1C95-F579-412C-9FB3-69FDB0B93F83}.Release|Any CPU.Build.0 = Release|Any CPU
{700D1C95-F579-412C-9FB3-69FDB0B93F83}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -0,0 +1 @@
<OpenCoverSettings />

101
3DTest/3DTest.vbproj Normal file
View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{700D1C95-F579-412C-9FB3-69FDB0B93F83}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>WinExe</OutputType>
<MyType>WindowsForms</MyType>
<RootNamespace>captainalm.test3d</RootNamespace>
<AssemblyName>3DTest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<OptionInfer>On</OptionInfer>
<ApplicationIcon>..\Icon2.ico</ApplicationIcon>
<NoWin32Manifest>False</NoWin32Manifest>
<SignAssembly>False</SignAssembly>
<DelaySign>False</DelaySign>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<OptionStrict>Off</OptionStrict>
<OptionCompare>Binary</OptionCompare>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>False</RunCodeAnalysis>
<SourceAnalysisOverrideSettingsFile>\\ccgsintake14\14ManvilleA$\AppData\ICSharpCode/SharpDevelop4\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<DefineConstants>DEBUG=1,TRACE=1</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<DefineConstants>TRACE=1</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.Designer.vb">
<DependentUpon>MainForm.vb</DependentUpon>
</Compile>
<Compile Include="MainForm.vb" />
<Compile Include="Program.vb" />
<Compile Include="Properties\AssemblyInfo.vb" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\3DGDIRender\3DGDIRender.vbproj">
<Project>6F70EF7B-C63A-4338-99CB-027B0C6DE0C1</Project>
<Name>3DGDIRender</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Drawing" />
<Import Include="System.Windows.Forms" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

69
3DTest/MainForm.Designer.vb generated Normal file
View File

@ -0,0 +1,69 @@
'
' Created by SharpDevelop.
' User: 14manvilleA
' Date: 27/09/2019
' Time: 10:49
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Partial Class MainForm
Inherits System.Windows.Forms.Form
''' <summary>
''' Designer variable used to keep track of non-visual components.
''' </summary>
Private components As System.ComponentModel.IContainer
''' <summary>
''' Disposes resources used by the form.
''' </summary>
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If components IsNot Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
''' <summary>
''' This method is required for Windows Forms designer support.
''' Do not change the method contents inside the source code editor. The Forms designer might
''' not be able to load this method if it was changed manually.
''' </summary>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.pbxv = New System.Windows.Forms.PictureBox()
Me.timerRender = New System.Windows.Forms.Timer(Me.components)
CType(Me.pbxv,System.ComponentModel.ISupportInitialize).BeginInit
Me.SuspendLayout
'
'pbxv
'
Me.pbxv.Dock = System.Windows.Forms.DockStyle.Fill
Me.pbxv.Location = New System.Drawing.Point(0, 0)
Me.pbxv.Name = "pbxv"
Me.pbxv.Size = New System.Drawing.Size(284, 261)
Me.pbxv.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Stretch
Me.pbxv.TabIndex = 0
Me.pbxv.TabStop = false
'
'timerRender
'
Me.timerRender.Interval = 125
'
'MainForm
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(284, 261)
Me.Controls.Add(Me.pbxv)
Me.Name = "MainForm"
Me.Text = "3DTest"
CType(Me.pbxv,System.ComponentModel.ISupportInitialize).EndInit
Me.ResumeLayout(false)
End Sub
Private withevents timerRender As System.Windows.Forms.Timer
Private withevents pbxv As System.Windows.Forms.PictureBox
End Class

123
3DTest/MainForm.resx Normal file
View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timerRender.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

52
3DTest/MainForm.vb Normal file
View File

@ -0,0 +1,52 @@
'
' Created by SharpDevelop.
' User: 14manvilleA
' Date: 27/09/2019
' Time: 10:49
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports System.Drawing
Imports captainalm.util.Render3D
Imports System.Runtime.InteropServices
Public Partial Class MainForm
Public vp As View3D = Nothing
Public Sub New()
' The Me.InitializeComponent call is required for Windows Forms designer support.
Me.InitializeComponent()
End Sub
Sub MainFormLoad(sender As Object, e As EventArgs) Handles Me.Load
' Enable double-buffering to eliminate flickering.
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
vp = New View3D(Me.pbxv.ClientSize.width, Me.pbxv.ClientSize.height, Color.Black, True)
End Sub
Sub TimerRenderTick(sender As Object, e As EventArgs) Handles timerRender.Tick
Me.pbxv.Invalidate()
If GC.GetTotalMemory(False) > 104857600 Then GC.Collect()
End Sub
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)>
private class MEMORYSTATUSEX
public dwLength As UInt32
public dwMemoryLoad As uint32
public ullTotalPhys As uint64
public ullAvailPhys As uint64
public ullTotalPageFile As uint64
public ullAvailPageFile As uint64
public ullTotalVirtual As uint64
public ullAvailVirtual As uint64
public ullAvailExtendedVirtual As uint64
public sub new()
me.dwLength = ctype(Marshal.SizeOf(GetType(MEMORYSTATUSEX)), uint32)
end sub
end class
Private Declare Function GlobalMemoryStatusEx Lib "kernel32" Alias "GlobalMemoryStatusEx" (<[In](), Out()>ByVal lpBuffer As MEMORYSTATUSEX) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Class

26
3DTest/Program.vb Normal file
View File

@ -0,0 +1,26 @@
'
' Created by SharpDevelop.
' User: 14manvilleA
' Date: 27/09/2019
' Time: 10:49
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports Microsoft.VisualBasic.ApplicationServices
Namespace My
' This file controls the behaviour of the application.
Partial Class MyApplication
Public Sub New()
MyBase.New(AuthenticationMode.Windows)
Me.IsSingleInstance = False
Me.EnableVisualStyles = True
Me.SaveMySettingsOnExit = True
Me.ShutDownStyle = ShutdownMode.AfterMainFormCloses
End Sub
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = My.Forms.MainForm
End Sub
End Class
End Namespace

View File

@ -0,0 +1,31 @@
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
' Information about this assembly is defined by the following
' attributes.
'
' change them to the information which is associated with the assembly
' you compile.
<assembly: AssemblyTitle("ThreeDTest")>
<assembly: AssemblyDescription("3D Test")>
<assembly: AssemblyConfiguration("")>
<assembly: AssemblyCompany("Captain ALM")>
<assembly: AssemblyProduct("ThreeDTest")>
<assembly: AssemblyCopyright("Copyright (C) Captain ALM 2019")>
<assembly: AssemblyTrademark("")>
<assembly: AssemblyCulture("")>
' This sets the default COM visibility of types in the assembly to invisible.
' If you need to expose a type to COM, use <ComVisible(true)> on that type.
<assembly: ComVisible(False)>
' The assembly version has following format :
'
' Major.Minor.Build.Revision
'
' You can specify all values by your own or you can build default build and revision
' numbers with the '*' character (the default):
<assembly: AssemblyVersion("0.0.*")>

View File

@ -0,0 +1,4 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="True">
<Profiles />
<Settings />
</SettingsFile>

6
3DTest/app.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>

BIN
Icon2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB