Merge GdiPlus and OpenTK into BizwareGL

This commit is contained in:
YoshiRulz 2020-01-22 07:05:50 +10:00
parent 8cf2f5d915
commit 87833d76d7
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
19 changed files with 15 additions and 114 deletions

View File

@ -33,8 +33,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.GdiPlus/BizHawk.Bizware.BizwareGL.GdiPlus.csproj" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.OpenTK/BizHawk.Bizware.BizwareGL.OpenTK.csproj" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.SlimDX/BizHawk.Bizware.BizwareGL.SlimDX.csproj" />
</ItemGroup>
<ItemGroup>

View File

@ -1,7 +1,5 @@
using System;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.BizwareGL.Drivers.GdiPlus;
using BizHawk.Bizware.BizwareGL.Drivers.OpenTK;
using BizHawk.Bizware.BizwareGL.Drivers.SlimDX;
namespace BizHawk.Client.Common

View File

@ -149,12 +149,6 @@
<ProjectReference Include="../BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj"
Name="BizHawk.Emulation.Cores"
Project="{197D4314-8A9F-49BA-977D-54ACEFAEB6BA}" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.GdiPlus/BizHawk.Bizware.BizwareGL.GdiPlus.csproj"
Name="BizHawk.Bizware.BizwareGL.GdiPlus"
Project="{337CA23E-65E7-44E1-9411-97EE08BB8116}" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.OpenTK/BizHawk.Bizware.BizwareGL.OpenTK.csproj"
Name="BizHawk.Bizware.BizwareGL.OpenTK"
Project="{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}" />
<ProjectReference Include="../Bizware/BizHawk.Bizware.BizwareGL.SlimDX/BizHawk.Bizware.BizwareGL.SlimDX.csproj"
Name="BizHawk.Bizware.BizwareGL.SlimDX"
Project="{E6B436B1-A3CD-4C9A-8F76-5D7154726884}" />

View File

@ -10,7 +10,6 @@ using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.BizwareGL.Drivers.SlimDX;
using BizHawk.Bizware.BizwareGL.Drivers.OpenTK;
using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk.FilterManager;
using BizHawk.Emulation.Common;

View File

@ -1,6 +1,5 @@
using System;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Bizware.BizwareGL.Drivers.OpenTK;
using BizHawk.Bizware.BizwareGL.Drivers.SlimDX;
namespace BizHawk.Client.EmuHawk

View File

@ -16,7 +16,7 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// The IGL_TK to be used for specifically opengl operations (accessing textures from opengl-based cores)
/// </summary>
public static Bizware.BizwareGL.Drivers.OpenTK.IGL_TK IGL_GL;
public static IGL_TK IGL_GL;
public static Sound Sound;
public static readonly OSDManager OSD = new OSDManager();

View File

@ -130,7 +130,7 @@ namespace BizHawk.Client.EmuHawk
}
// create IGL context. we do this whether or not the user has selected OpenGL, so that we can run opengl-based emulator cores
GlobalWin.IGL_GL = new Bizware.BizwareGL.Drivers.OpenTK.IGL_TK(2, 0, false);
GlobalWin.IGL_GL = new Bizware.BizwareGL.IGL_TK(2, 0, false);
// setup the GL context manager, needed for coping with multiple opengl cores vs opengl display method
GLManager.CreateInstance();
@ -140,7 +140,7 @@ namespace BizHawk.Client.EmuHawk
REDO_DISPMETHOD:
if (Global.Config.DispMethod == EDispMethod.GdiPlus)
{
GlobalWin.GL = new Bizware.BizwareGL.Drivers.GdiPlus.IGL_GdiPlus();
GlobalWin.GL = new Bizware.BizwareGL.IGL_GdiPlus();
}
else if (Global.Config.DispMethod == EDispMethod.SlimDX9)
{

View File

@ -47,12 +47,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bizware", "Bizware", "{0540
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL", "Bizware\BizHawk.Bizware.BizwareGL\BizHawk.Bizware.BizwareGL.csproj", "{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.OpenTK", "Bizware\BizHawk.Bizware.BizwareGL.OpenTK\BizHawk.Bizware.BizwareGL.OpenTK.csproj", "{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.DBMan", "BizHawk.Client.DBMan\BizHawk.Client.DBMan.csproj", "{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.GdiPlus", "Bizware\BizHawk.Bizware.BizwareGL.GdiPlus\BizHawk.Bizware.BizwareGL.GdiPlus.csproj", "{337CA23E-65E7-44E1-9411-97EE08BB8116}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.SlimDX", "Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj", "{E6B436B1-A3CD-4C9A-8F76-5D7154726884}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.ApiHawk", "BizHawk.Client.ApiHawk\BizHawk.Client.ApiHawk.csproj", "{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}"
@ -99,18 +95,10 @@ Global
{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.Build.0 = Release|Any CPU
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE}.Release|Any CPU.Build.0 = Release|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9}.Release|Any CPU.Build.0 = Release|Any CPU
{337CA23E-65E7-44E1-9411-97EE08BB8116}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{337CA23E-65E7-44E1-9411-97EE08BB8116}.Debug|Any CPU.Build.0 = Debug|Any CPU
{337CA23E-65E7-44E1-9411-97EE08BB8116}.Release|Any CPU.ActiveCfg = Release|Any CPU
{337CA23E-65E7-44E1-9411-97EE08BB8116}.Release|Any CPU.Build.0 = Release|Any CPU
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -131,9 +119,7 @@ Global
{E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{197D4314-8A9F-49BA-977D-54ACEFAEB6BA} = {3627C08B-3E43-4224-9DA4-40BD69495FBC}
{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{5160CFB1-5389-47C1-B7F6-8A0DC97641EE} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
EndGlobalSection

View File

@ -1,29 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Common.abs.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>../../output/dll</OutputPath>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<!--<Reference Include="Microsoft.CSharp" />-->
<!--<Reference Include="System" />-->
<!--<Reference Include="System.Core" />-->
<!--<Reference Include="System.Data" />-->
<!--<Reference Include="System.Data.DataSetExtensions" />-->
<!--<Reference Include="System.Drawing" />-->
<Reference Include="System.Windows.Forms" />
<!--<Reference Include="System.Xml" />-->
<!--<Reference Include="System.Xml.Linq" />-->
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTK" Version="3.0.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="GLControlWrapper_GdiPlus.cs" SubType="Component" />
</ItemGroup>
</Project>

View File

@ -1,2 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp80</s:String></wpf:ResourceDictionary>

View File

@ -1,33 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Common.abs.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>../../output/dll</OutputPath>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<!--<Reference Include="Microsoft.CSharp" />-->
<!--<Reference Include="System" />-->
<!--<Reference Include="System.Core" />-->
<!--<Reference Include="System.Data" />-->
<!--<Reference Include="System.Data.DataSetExtensions" />-->
<!--<Reference Include="System.Drawing" />-->
<Reference Include="System.Windows.Forms" />
<!--<Reference Include="System.Xml" />-->
<!--<Reference Include="System.Xml.Linq" />-->
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTK" Version="3.0.1" PrivateAssets="All" />
<PackageReference Include="OpenTK.GLControl" Version="3.0.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="RetroShader.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="GraphicsControl_TK.cs" SubType="UserControl" />
</ItemGroup>
</Project>

View File

@ -1,2 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp80</s:String></wpf:ResourceDictionary>

View File

@ -7,28 +7,20 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<!--<Reference Include="Microsoft.CSharp" />-->
<!--<Reference Include="System" />-->
<!--<Reference Include="System.Core" />-->
<!--<Reference Include="System.Data" />-->
<!--<Reference Include="System.Data.DataSetExtensions" />-->
<!--<Reference Include="System.Drawing" />-->
<Reference Include="System.Windows.Forms" />
<!--<Reference Include="System.Xml" />-->
<!--<Reference Include="System.Xml.Linq" />-->
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTK" Version="3.0.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTK.GLControl" Version="3.0.1" PrivateAssets="All" />
<ProjectReference Include="../../BizHawk.Common/BizHawk.Common.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="CacheBlendState.cs" />
<Compile Remove="GuiRendererBase.cs" />
<Compile Remove="RetroShader_OpenTK.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="GLControlWrapper_GdiPlus.cs" SubType="Component" />
<Compile Update="GraphicsControl.cs" SubType="UserControl" />
<Compile Update="GraphicsControl_TK.cs" SubType="UserControl" />
<Compile Update="IGuiRenderer.cs" SubType="Code" />
<Compile Update="RetainedGraphicsControl.cs" SubType="UserControl" />
</ItemGroup>

View File

@ -9,7 +9,7 @@ using System.Windows.Forms;
using BizHawk.Bizware.BizwareGL;
namespace BizHawk.Bizware.BizwareGL.Drivers.GdiPlus
namespace BizHawk.Bizware.BizwareGL
{
public class GLControlWrapper_GdiPlus : Control, IGraphicsControl
{

View File

@ -10,7 +10,7 @@ using System.Drawing.Imaging;
using OpenTK;
using OpenTK.Graphics.OpenGL;
namespace BizHawk.Bizware.BizwareGL.Drivers.GdiPlus
namespace BizHawk.Bizware.BizwareGL
{
public class GDIPlusGuiRenderer : IGuiRenderer
{

View File

@ -11,7 +11,7 @@ using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
namespace BizHawk.Bizware.BizwareGL
{
class GLControlWrapper : GLControl, IGraphicsControl
{

View File

@ -16,7 +16,7 @@ using BizHawk.Bizware.BizwareGL;
//TODO - maybe a layer to cache Graphics parameters (notably, filtering) ?
namespace BizHawk.Bizware.BizwareGL.Drivers.GdiPlus
namespace BizHawk.Bizware.BizwareGL
{
public class IGL_GdiPlus : IGL
{

View File

@ -25,7 +25,7 @@ using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using otkg = OpenTK.Graphics;
namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
namespace BizHawk.Bizware.BizwareGL
{
/// <summary>
/// OpenTK implementation of the BizwareGL.IGL interface.

View File

@ -11,9 +11,9 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
/// Handles RetroArch's GLSL shader pass format
/// This isnt implemented in BizwareGL abstract layer because it relies too much on GLSL peculiarities
/// </summary>
public class RetroShader : IDisposable
public class RetroShader_OpenTK : IDisposable
{
public RetroShader(IGL owner, string source, bool debug = false)
public RetroShader_OpenTK(IGL owner, string source, bool debug = false)
{
Owner = owner as IGL_TK;