Create new project Bizware.OpenTK3 from Bizware.BizwareGL and EmuHawk

This commit is contained in:
YoshiRulz 2021-03-18 11:07:18 +10:00 committed by James Groom
parent b1af3b1940
commit c5e84ff02e
24 changed files with 53 additions and 18 deletions

View File

@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.BizwareGL",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.DirectX", "src\BizHawk.Bizware.DirectX\BizHawk.Bizware.DirectX.csproj", "{A914D063-9E4B-4086-B156-7B3F39E33DB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.OpenTK3", "src\BizHawk.Bizware.OpenTK3\BizHawk.Bizware.OpenTK3.csproj", "{1FF433CC-96E1-4F14-B673-CDA7190169C9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.BizInvoke", "src\BizHawk.BizInvoke\BizHawk.BizInvoke.csproj", "{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.WinForms.Controls", "src\BizHawk.WinForms.Controls\BizHawk.WinForms.Controls.csproj", "{B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}"
@ -101,6 +103,10 @@ Global
{A914D063-9E4B-4086-B156-7B3F39E33DB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A914D063-9E4B-4086-B156-7B3F39E33DB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A914D063-9E4B-4086-B156-7B3F39E33DB2}.Release|Any CPU.Build.0 = Release|Any CPU
{1FF433CC-96E1-4F14-B673-CDA7190169C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FF433CC-96E1-4F14-B673-CDA7190169C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FF433CC-96E1-4F14-B673-CDA7190169C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FF433CC-96E1-4F14-B673-CDA7190169C9}.Release|Any CPU.Build.0 = Release|Any CPU
{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -15,13 +15,13 @@ namespace BizHawk.Bizware.BizwareGL
Height = tex.Height;
}
internal Art(ArtManager owner)
public Art(ArtManager owner)
{
Owner = owner;
}
public ArtManager Owner { get; }
public Texture2d BaseTexture { get; internal set; }
public Texture2d BaseTexture { get; set; }
public float Width, Height;
public float u0, v0, u1, v1;

View File

@ -11,7 +11,6 @@
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="1.0.2" NoWarn="NU1701" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /><!-- for (extra?) dynamic type support -->
<PackageReference Include="System.Drawing.Common" Version="5.0.0" />
<PackageReference Include="OpenTK" Version="3.3.0" NoWarn="NU1701" />
<ProjectReference Include="$(ProjectDir)../BizHawk.Common/BizHawk.Common.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -10,6 +10,7 @@
<ItemGroup>
<Reference Include="System.Windows.Forms" />
<Reference Include="SlimDX" HintPath="$(ProjectDir)../../References/x64/SlimDX.dll" Private="true" />
<ProjectReference Include="$(ProjectDir)../BizHawk.Client.Common/BizHawk.Client.Common.csproj" />
<PackageReference Include="OpenTK" Version="3.3.0" PrivateAssets="all" NoWarn="NU1701" />
<ProjectReference Include="$(ProjectDir)../BizHawk.Bizware.OpenTK3/BizHawk.Bizware.OpenTK3.csproj" />
</ItemGroup>
</Project>

View File

@ -3,7 +3,9 @@ using System.IO;
using System.Collections.Generic;
using System.Drawing;
using System.Threading;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.OpenTK3;
using SlimDX.Direct3D9;

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<Import Project="../MainSlnCommon.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Windows.Forms" />
<PackageReference Include="OpenTK" Version="3.3.0" PrivateAssets="all" NoWarn="NU1701" />
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" PrivateAssets="all" />
<ProjectReference Include="$(ProjectDir)../BizHawk.Client.Common/BizHawk.Client.Common.csproj" />
</ItemGroup>
</Project>

View File

@ -1,9 +1,11 @@
using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
using OpenTK;
using OpenTK.Graphics;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
internal class GLControlWrapper : GLControl, IGraphicsControl
{

View File

@ -5,9 +5,11 @@
using System;
using System.Diagnostics;
using BizHawk.Bizware.BizwareGL;
using sd = System.Drawing;
namespace BizHawk.Bizware.BizwareGL
namespace BizHawk.Bizware.OpenTK3
{
/// <summary>
/// A simple renderer useful for rendering GUI stuff.

View File

@ -16,6 +16,7 @@ using BizHawk.Common;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using OpenTK.Platform;
using BizGL = BizHawk.Bizware.BizwareGL;
using BlendEquationMode = OpenTK.Graphics.OpenGL.BlendEquationMode;
@ -31,7 +32,7 @@ using Vector2 = BizHawk.Bizware.BizwareGL.Vector2;
using Vector4 = BizHawk.Bizware.BizwareGL.Vector4;
using VertexAttribPointerType = OpenTK.Graphics.OpenGL.VertexAttribPointerType;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
/// <summary>
/// OpenTK implementation of the BizwareGL.IGL interface.
@ -819,7 +820,7 @@ namespace BizHawk.Client.EmuHawk
MakeContextCurrent(this.GraphicsContext,OffscreenNativeWindow.WindowInfo);
}
internal void MakeContextCurrent(IGraphicsContext context, global::OpenTK.Platform.IWindowInfo windowInfo)
internal void MakeContextCurrent(IGraphicsContext context, IWindowInfo windowInfo)
{
context.MakeCurrent(windowInfo);
PurgeStateCache();

View File

@ -6,7 +6,7 @@ using OpenTK.Input;
using OpenTKGamePad = OpenTK.Input.GamePad;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
/// <summary>
/// Modified OpenTK Gamepad Handler<br/>

View File

@ -7,7 +7,7 @@ using BizHawk.Client.Common;
using OpenTK.Input;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
public static class OTK_Keyboard
{

View File

@ -7,7 +7,7 @@ using BizHawk.Client.Common;
using OpenTK.Audio;
using OpenTK.Audio.OpenAL;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
public class OpenALSoundOutput : ISoundOutput
{

View File

@ -1,8 +1,6 @@
using System;
using OpenTK;
namespace BizHawk.Bizware.BizwareGL
namespace BizHawk.Bizware.OpenTK3
{
public static class OpenTKConfigurator
{

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
namespace BizHawk.Bizware.OpenTK3
{
public sealed class OpenTKInputAdapter : IHostInputAdapter
{

View File

@ -1,4 +1,6 @@
namespace BizHawk.Bizware.BizwareGL
using BizHawk.Bizware.BizwareGL;
namespace BizHawk.Bizware.OpenTK3
{
/// <summary>
/// An IBlendState token that just caches all the args needed to create a blend state

View File

@ -20,7 +20,6 @@
<Reference Include="GongShell" HintPath="$(ProjectDir)../../References/GongShell.dll" Private="true" />
<Reference Include="NLua, Version=1.3.2.0, Culture=neutral, processorArchitecture=MSIL" SpecificVersion="false" HintPath="$(ProjectDir)../../Assets/dll/nlua/NLua.dll" Private="false" /><!-- don't copy, will be copied with Assets -->
<Reference Include="PcxFileTypePlugin.HawkQuantizer" HintPath="$(ProjectDir)../../References/PcxFileTypePlugin.HawkQuantizer.dll" Private="true" />
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(ProjectDir)../BizHawk.Bizware.DirectX/BizHawk.Bizware.DirectX.csproj" />

View File

@ -13,6 +13,7 @@ using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
using BizHawk.Client.Common;
using BizHawk.Client.Common.Filters;
using BizHawk.Client.Common.FilterManager;

View File

@ -1,6 +1,7 @@
using System;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
namespace BizHawk.Client.EmuHawk
{

View File

@ -2,6 +2,7 @@ using System;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
namespace BizHawk.Client.EmuHawk
{

View File

@ -1,5 +1,6 @@
using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.OpenTK3;
namespace BizHawk.Client.EmuHawk
{

View File

@ -5,6 +5,7 @@ using System.Threading;
using System.Windows.Forms;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
using BizHawk.Common;
using BizHawk.Client.Common;

View File

@ -6,6 +6,7 @@ using System.Linq;
using System.Windows.Forms;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk.CustomControls;
using BizHawk.Client.EmuHawk.ToolExtensions;

View File

@ -8,7 +8,7 @@ using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
using BizHawk.Common;
using BizHawk.Common.PathExtensions;
using BizHawk.Client.Common;

View File

@ -2,6 +2,7 @@
using System.Threading;
using BizHawk.Bizware.DirectX;
using BizHawk.Bizware.OpenTK3;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using BizHawk.Common;