diff options
| author | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-04 00:36:44 +0100 |
|---|---|---|
| committer | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-04 00:36:44 +0100 |
| commit | 5d4b4023bddd12e27c6756793aea2ff36d49e124 (patch) | |
| tree | 7d66eac7b7b2d7ffe647aa8a34bc544fd770a23b /Unicity.RenderTest | |
| parent | 0fec6725547868de242aaf9035eedf99f7be3233 (diff) | |
| download | Unicity-5d4b4023bddd12e27c6756793aea2ff36d49e124.tar.gz Unicity-5d4b4023bddd12e27c6756793aea2ff36d49e124.tar.bz2 Unicity-5d4b4023bddd12e27c6756793aea2ff36d49e124.zip | |
Upload code
Diffstat (limited to 'Unicity.RenderTest')
| -rw-r--r-- | Unicity.RenderTest/App.config | 6 | ||||
| -rw-r--r-- | Unicity.RenderTest/Program.cs | 43 | ||||
| -rw-r--r-- | Unicity.RenderTest/Properties/AssemblyInfo.cs | 36 | ||||
| -rw-r--r-- | Unicity.RenderTest/Unicity.RenderTest.csproj | 59 |
4 files changed, 144 insertions, 0 deletions
diff --git a/Unicity.RenderTest/App.config b/Unicity.RenderTest/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Unicity.RenderTest/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> + </startup> +</configuration>
\ No newline at end of file diff --git a/Unicity.RenderTest/Program.cs b/Unicity.RenderTest/Program.cs new file mode 100644 index 0000000..0de65c1 --- /dev/null +++ b/Unicity.RenderTest/Program.cs @@ -0,0 +1,43 @@ +using Unicity.Renderer; +using Unicity.Renderer.Shapes; + +namespace Unicity.RenderTest +{ + class Program + { + static RenderWindow window = null; + static GraphicsRenderer renderer = null; + + static Triangle triangle; + + static void Main(string[] args) + { + using (window = new RenderWindow(400, 400, "Test123")) + using (renderer = new GraphicsRenderer(window)) + { + window.Init += Window_Init; + window.Update += Window_Update; + window.Render += Window_Render; + + window.StartUpdateLoop(); + } + } + + private static void Window_Init(object sender, System.EventArgs e) + { + renderer.SetClearColor(0, 1, 0, 1); + triangle = new Triangle(0.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f); + } + + private static void Window_Update(object sender, System.EventArgs e) + { + + } + + private static void Window_Render(object sender, System.EventArgs e) + { + renderer.ClearScreen(); + renderer.RenderShape(triangle); + } + } +} diff --git a/Unicity.RenderTest/Properties/AssemblyInfo.cs b/Unicity.RenderTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d5a6093 --- /dev/null +++ b/Unicity.RenderTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("Unicity Render Test")] +[assembly: AssemblyDescription("Test for the Unicity renderer")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Alee Productions")] +[assembly: AssemblyProduct("Unicity Renderer Test")] +[assembly: AssemblyCopyright("Copyright © 2019 Alee Productions")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("0155c998-9189-4c19-8dcc-13499797c7ea")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Unicity.RenderTest/Unicity.RenderTest.csproj b/Unicity.RenderTest/Unicity.RenderTest.csproj new file mode 100644 index 0000000..3bbc39e --- /dev/null +++ b/Unicity.RenderTest/Unicity.RenderTest.csproj @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{0155C998-9189-4C19-8DCC-13499797C7EA}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Unicity.RenderTest</RootNamespace> + <AssemblyName>Unicity.RenderTest</AssemblyName> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Unicity.Renderer\Unicity.Renderer.csproj"> + <Project>{f6ebb1f8-fca9-4a8d-a807-e877cd047908}</Project> + <Name>Unicity.Renderer</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file |
