diff --git a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/BuildServerUploaderConsole.csproj b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/BuildServerUploaderConsole.csproj index d96924d90..934450ccb 100644 --- a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/BuildServerUploaderConsole.csproj +++ b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/BuildServerUploaderConsole.csproj @@ -1,4 +1,4 @@ - + net8.0 Exe @@ -94,10 +94,10 @@ - + - + diff --git a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Data/AllData.cs b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Data/AllData.cs index 0a5c26e19..f25806e08 100644 --- a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Data/AllData.cs +++ b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Data/AllData.cs @@ -152,7 +152,60 @@ static AllData() Engines.Add(engine); } - // FNA Desktop + // Desktop GL Net 9 + { + var engine = new EngineData(); + engine.Name = "MonoGame DesktopGL .NET 9.0+"; + + engine.EngineCSProjLocation = @"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBallDesktopGLNet6\FlatRedBallDesktopGLNet6.csproj"; + + engine.RelativeToLibrariesDebugFolder = @"DesktopGl\Debug"; + engine.RelativeToLibrariesReleaseFolder = @"DesktopGl\Release"; + engine.TemplateCsProjFolder = @"FlatRedBallDesktopGlMonoGameTemplate\FlatRedBallDesktopGlMonoGameTemplate\"; + + // This is the built folder when building FlatRedBall.Forms sln + // All files below (DebugFiles and ReleaseFiles) should be contained + // in that output folder because the project should reference those files + var debugBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGlNet6\bin\Debug\net8.0\"; + var releaseBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGlNet6\bin\Release\net8.0\"; + + + engine.DebugFiles.Add($"{debugBinFolder}FlatRedBallDesktopGLNet6.dll"); + engine.DebugFiles.Add($"{debugBinFolder}FlatRedBallDesktopGLNet6.pdb"); + + engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.DesktopNet6.dll"); + engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.DesktopNet6.pdb"); + + engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.DesktopGlNet6.dll"); + engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.DesktopGlNet6.pdb"); + + engine.DebugFiles.Add($"{debugBinFolder}GumCore.DesktopGlNet6.dll"); + engine.DebugFiles.Add($"{debugBinFolder}GumCore.DesktopGlNet6.pdb"); + + engine.DebugFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Debug\net8.0\SkiaInGum.dll"); + engine.DebugFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Debug\net8.0\SkiaInGum.pdb"); + + + engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBallDesktopGLNet6.dll"); + engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBallDesktopGLNet6.pdb"); + + engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.DesktopNet6.dll"); + engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.DesktopNet6.pdb"); + + engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.DesktopGlNet6.dll"); + engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.DesktopGlNet6.pdb"); + + engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.DesktopGlNet6.dll"); + engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.DesktopGlNet6.pdb"); + + engine.ReleaseFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Release\net8.0\SkiaInGum.dll"); + engine.ReleaseFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Release\net8.0\SkiaInGum.pdb"); + + + Engines.Add(engine); + + } + // FNA Desktop (.net 7) { var engine = new EngineData(); engine.Name = "FNA DesktopGL .NET 7.0"; diff --git a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Processes/UpdateAssemblyVersions.cs b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Processes/UpdateAssemblyVersions.cs index 698c42489..9c30b48aa 100644 --- a/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Processes/UpdateAssemblyVersions.cs +++ b/FRBDK/BuildServerUploader/BuildServerUploaderConsole/Processes/UpdateAssemblyVersions.cs @@ -124,15 +124,17 @@ private void UpdateTemplateNugets() var strippedEngineName = FileManager.RemoveExtension( FileManager.RemovePath(engine.EngineCSProjLocation)); - UpdateTemplateNuget(strippedEngineName, templateName); + UpdateTemplateNuget(strippedEngineName, templateName, engine); } } - private void UpdateTemplateNuget(string engineName, string templateName) + private void UpdateTemplateNuget(string engineName, string templateName, EngineData engine) { - var matchingEngine = AllData.Engines.First(item => item.EngineCSProjLocation?.Contains($"{engineName}.csproj") == true); - var templateLocation = matchingEngine.TemplateCsProjFolder + templateName + ".csproj"; - ModifyNugetVersionInAssembly(DirectoryHelper.TemplateDirectory + templateLocation, engineName, GetVersionString(IsBeta)); + var templateLocation = engine.TemplateCsProjFolder + templateName + ".csproj"; + + var fullTemplateCsprojLocation = DirectoryHelper.TemplateDirectory + templateLocation; + + ModifyNugetVersionInAssembly(fullTemplateCsprojLocation, engineName, GetVersionString(IsBeta)); } private static void ModifyAssemblyInfoVersion(string assemblyInfoLocation, string versionString) @@ -165,23 +167,23 @@ private static void ModifyCsprojAssemblyInfoVersion(string csprojLocation, strin } - private void ModifyNugetVersionInAssembly(string csprojLocation, string packageName, string versionString) + private void ModifyNugetVersionInAssembly(string templateCsprojLocation, string packageName, string versionString) { - if (System.IO.File.Exists(csprojLocation) == false) + if (System.IO.File.Exists(templateCsprojLocation) == false) { - throw new ArgumentException($"Could not find file {csprojLocation}"); + throw new ArgumentException($"Could not find file {templateCsprojLocation}"); } - string csprojText = FileManager.FromFileText(csprojLocation); + string csprojText = FileManager.FromFileText(templateCsprojLocation); csprojText = System.Text.RegularExpressions.Regex.Replace(csprojText, $"", $""); - Results.WriteMessage("Modified " + csprojLocation + $" to have FlatRedBall Nuget package {versionString}"); + Results.WriteMessage("Modified " + templateCsprojLocation + $" to have FlatRedBall Nuget package {versionString}"); - FileManager.SaveText(csprojText, csprojLocation); + FileManager.SaveText(csprojText, templateCsprojLocation); } } diff --git a/FRBDK/Glue/GlueCommon/SaveClasses/GlueProjectSave.cs b/FRBDK/Glue/GlueCommon/SaveClasses/GlueProjectSave.cs index bc8c4463e..18bf597d8 100644 --- a/FRBDK/Glue/GlueCommon/SaveClasses/GlueProjectSave.cs +++ b/FRBDK/Glue/GlueCommon/SaveClasses/GlueProjectSave.cs @@ -179,11 +179,15 @@ public enum GluxVersions // March 9, 2025 AudioManagerStopSongTakesBool = 63, + // Also December 27, 2024 + GraphicalUiElementRemoveFromManagersIsVirtual = 63, // Feburary 2, but added as a version on May 19, 2025 GumVisualHasRenderTarget = 64, // Added around April 4, 2025, so adding this as the same version: - GumNineSliceHasAnimate = 64 + GumNineSliceHasAnimate = 64, + // and also March 15, 2025 + ObsoleteGumDimensionUnitTypes = 64, // Stop! If adding an entry here, modify SyntaxVersionAttribute on FlatRedBallServices // and LatestVersion down below diff --git a/FRBDK/Glue/GumPlugin/GumPlugin/CodeGeneration/GueDerivingClassCodeGenerator.cs b/FRBDK/Glue/GumPlugin/GumPlugin/CodeGeneration/GueDerivingClassCodeGenerator.cs index 4c180aa05..dd1312e75 100644 --- a/FRBDK/Glue/GumPlugin/GumPlugin/CodeGeneration/GueDerivingClassCodeGenerator.cs +++ b/FRBDK/Glue/GumPlugin/GumPlugin/CodeGeneration/GueDerivingClassCodeGenerator.cs @@ -930,10 +930,13 @@ internal string GetAddToManagersFunc(IElement glueElement, NamedObjectSave named private void GenerateRemoveFromManagers(ElementSave elementSave, ICodeBlock classBlock) { - var method = classBlock.Function("public override void", "RemoveFromManagers"); + if(GlueState.Self.CurrentGlueProject.FileVersion >= (int)GluxVersions.GraphicalUiElementRemoveFromManagersIsVirtual) + { + var method = classBlock.Function("public override void", "RemoveFromManagers"); - method.Line("StopAnimations();"); - method.Line("base.RemoveFromManagers();"); + method.Line("StopAnimations();"); + method.Line("base.RemoveFromManagers();"); + } } @@ -1199,13 +1202,16 @@ private void AdjustEnumerationVariableValue(Gum.DataTypes.Variables.VariableSave } else if(variableSave.Type == "Gum.DataTypes.DimensionUnitType" || variableSave.Type == "DimensionUnitType") { - if(variableValue == "Percentage") - { - variableValue = "PercentageOfParent"; - } - else if(variableValue == "RelativeToContainer") + if(GlueState.Self.CurrentGlueProject.FileVersion >= (int)GluxVersions.ObsoleteGumDimensionUnitTypes) { - variableValue = "RelativeToParent"; + if(variableValue == "Percentage") + { + variableValue = "PercentageOfParent"; + } + else if(variableValue == "RelativeToContainer") + { + variableValue = "RelativeToParent"; + } } } diff --git a/FRBDK/Glue/NpcWpfLib/Data/EmptyTemplates.cs b/FRBDK/Glue/NpcWpfLib/Data/EmptyTemplates.cs index b22dcf3e0..f8db62db2 100644 --- a/FRBDK/Glue/NpcWpfLib/Data/EmptyTemplates.cs +++ b/FRBDK/Glue/NpcWpfLib/Data/EmptyTemplates.cs @@ -13,11 +13,20 @@ static class EmptyTemplates static EmptyTemplates() { - Add("Desktop GL .NET 8 (Windows, Mac, Linux) - MonoGame", "FlatRedBallDesktopGlNet6Template", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopGlNet6Template.zip"); - Add("Android .NET (Phone, Tablet, Fire TV) - MonoGame", "FlatRedBallAndroidMonoGameTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallAndroidMonoGameTemplate.zip"); - Add("iOS .NET (iPhone, iPad, iPod Touch) - MonoGame", "FlatRedBalliOSMonoGameTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBalliOSMonoGameTemplate.zip"); - Add("Web (Browsers) - Kni", "FlatRedBallWebTemplate", "https://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallWebTemplate.zip"); - Add("FNA .NET 7 (Windows, Mac, Linux)", "FlatRedBallDesktopFnaTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopFnaTemplate.zip"); + Add("Desktop GL .NET 9 (Windows, Mac, Linux) - MonoGame", "FlatRedBallDesktopGlMonoGameTemplate", + "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopGlMonoGameTemplate.zip"); + + Add("Android .NET (Phone, Tablet, Fire TV) - MonoGame", "FlatRedBallAndroidMonoGameTemplate", + "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallAndroidMonoGameTemplate.zip"); + + Add("iOS .NET (iPhone, iPad, iPod Touch) - MonoGame", "FlatRedBalliOSMonoGameTemplate", + "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBalliOSMonoGameTemplate.zip"); + + Add("Web (Browsers) - Kni", "FlatRedBallWebTemplate", + "https://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallWebTemplate.zip"); + + Add("FNA .NET 7 (Windows, Mac, Linux)", "FlatRedBallDesktopFnaTemplate", + "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopFnaTemplate.zip"); Projects.Add(new AddNewLocalProjectOption()); } diff --git a/Templates/FlatRedBallAndroidMonoGameTemplate/FlatRedBallAndroidMonoGameTemplate/Game1.cs b/Templates/FlatRedBallAndroidMonoGameTemplate/FlatRedBallAndroidMonoGameTemplate/Game1.cs index 70fc6b5a3..2fd2def54 100644 --- a/Templates/FlatRedBallAndroidMonoGameTemplate/FlatRedBallAndroidMonoGameTemplate/Game1.cs +++ b/Templates/FlatRedBallAndroidMonoGameTemplate/FlatRedBallAndroidMonoGameTemplate/Game1.cs @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game public Game1() : base() { graphics = new GraphicsDeviceManager(this); - + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; #if ANDROID || IOS graphics.IsFullScreen = true; #elif WINDOWS || DESKTOP_GL diff --git a/Templates/FlatRedBallDesktopFnaTemplate/FlatRedBallDesktopFnaTemplate/Game1.cs b/Templates/FlatRedBallDesktopFnaTemplate/FlatRedBallDesktopFnaTemplate/Game1.cs index f22c207f8..eb0aef90b 100644 --- a/Templates/FlatRedBallDesktopFnaTemplate/FlatRedBallDesktopFnaTemplate/Game1.cs +++ b/Templates/FlatRedBallDesktopFnaTemplate/FlatRedBallDesktopFnaTemplate/Game1.cs @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game public Game1() : base() { graphics = new GraphicsDeviceManager(this); - + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; #if ANDROID || IOS graphics.IsFullScreen = true; #elif WINDOWS || DESKTOP_GL diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.sln b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.sln new file mode 100644 index 000000000..e1e1ccc1e --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32519.379 +MinimumVisualStudioVersion = 17.2.32519.379 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlatRedBallDesktopGlMonoGameTemplate", "FlatRedBallDesktopGlMonoGameTemplate\FlatRedBallDesktopGlMonoGameTemplate.csproj", "{D7079294-70C6-4204-B29E-C505EC181815}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D7079294-70C6-4204-B29E-C505EC181815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7079294-70C6-4204-B29E-C505EC181815}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7079294-70C6-4204-B29E-C505EC181815}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7079294-70C6-4204-B29E-C505EC181815}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {19F0E96B-A930-4730-AD7A-3E93D29343B5} + EndGlobalSection +EndGlobal diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/.config/dotnet-tools.json b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/.config/dotnet-tools.json new file mode 100644 index 000000000..efabe22ef --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/.config/dotnet-tools.json @@ -0,0 +1,36 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-mgcb": { + "version": "3.8.1.303", + "commands": [ + "mgcb" + ] + }, + "dotnet-mgcb-editor": { + "version": "3.8.1.303", + "commands": [ + "mgcb-editor" + ] + }, + "dotnet-mgcb-editor-linux": { + "version": "3.8.1.303", + "commands": [ + "mgcb-editor-linux" + ] + }, + "dotnet-mgcb-editor-windows": { + "version": "3.8.1.303", + "commands": [ + "mgcb-editor-windows" + ] + }, + "dotnet-mgcb-editor-mac": { + "version": "3.8.1.303", + "commands": [ + "mgcb-editor-mac" + ] + } + } +} \ No newline at end of file diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.fx b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.fx new file mode 100644 index 000000000..d582a4d19 --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.fx @@ -0,0 +1,806 @@ +float4x4 ViewProj : VIEWPROJ; // World, view and projection matrix +uniform extern texture CurrentTexture; + +sampler linearTextureSampler = sampler_state +{ + Texture = ; + MipFilter = Linear; + MinFilter = Linear; + MagFilter = Linear; +}; + +sampler pointTextureSampler = sampler_state +{ + Texture = ; + MipFilter = Point; + MinFilter = Point; + MagFilter = Point; +}; + +float4 ColorModifier = float4(1.0, 1.0, 1.0, 1.0); // Color for non-vertex color rendering + +// Application to vertex structure +struct a2v +{ + float4 position : POSITION0; + float4 color : COLOR0; + float4 texCoord : TEXCOORD0; + +}; + +// Vertex to pixel processing structure +struct v2p +{ + float4 position : POSITION0; + float4 color : COLOR0; + float4 texCoord : TEXCOORD0; +}; + +// VERTEX SHADER +void vs(in a2v IN, out v2p OUT) +{ + // Transforming our position from object space to screen space + OUT.position = mul(IN.position, ViewProj); + OUT.color = IN.color; + OUT.texCoord = IN.texCoord; +} + + +float4 Linearize(float4 color) +{ + return float4(pow(color.rgb, 2.2), color.a); +} + +#define SAMPLE(textureSampler, a2v) tex2D(textureSampler, a2v.texCoord.xy) +#define SAMPLE_LINEARIZE(textureSampler, a2v) Linearize(tex2D(textureSampler, a2v.texCoord.xy)) + +#define TECHNIQUE(name, psname) \ + technique name { pass { VertexShader = compile vs_1_1 vs(); PixelShader = compile ps_2_0 psname(); } } + +float4 PremultiplyAlpha(float4 textureColor, float4 color) +{ + return textureColor *= color.a; +} + +float4 Add(float4 textureColor, float4 color) +{ + textureColor.rgb += color.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 Subtract(float4 textureColor, float4 color) +{ + textureColor.rgb -= color.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 Modulate(float4 textureColor, float4 color) +{ + textureColor.rgb *= color.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 Modulate2X(float4 textureColor, float4 color) +{ + textureColor.rgb *= 2 * color.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 Modulate4X(float4 textureColor, float4 color) +{ + textureColor.rgb *= 4 * color.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 Inverse(float4 textureColor, float4 color) +{ + textureColor.rgb = 1 - textureColor.rgb; + textureColor *= color.a; + return textureColor; +} + +float4 ColorTextureAlpha(float textureAlpha, float4 color) +{ + float4 returnColor = color; + returnColor.rgb *= color.a; + returnColor *= textureAlpha; + return returnColor; +} + +float4 InterpolateColor(float4 textureColor, float4 color) +{ + float4 returnColor = color; + returnColor = (textureColor * returnColor.a) + (1 - returnColor.a) * (returnColor); + returnColor.a = textureColor.a; + return returnColor; +} + + +// PIXEL SHADERS: + +// Point filtering + +float4 TexturePixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = PremultiplyAlpha(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Add(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Subtract(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate2X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate4X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Point(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Inverse(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ColorPixelShader(a2v IN) : COLOR +{ + clip(IN.color.a - .001); + return IN.color; +} + +float4 ColorTextureAlphaPixelShader_Point(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE(pointTextureSampler, IN).a, IN.color); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Point(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE(pointTextureSampler, IN), IN.color); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = PremultiplyAlpha(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Add(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Subtract(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate2X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Modulate4X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(pointTextureSampler, IN); + color = Inverse(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ColorPixelShader_CM(a2v IN) : COLOR +{ + clip(ColorModifier.a - .001); + return ColorModifier; +} + +float4 ColorTextureAlphaPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE(pointTextureSampler, IN).a, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Point_CM(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE(pointTextureSampler, IN), ColorModifier); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = PremultiplyAlpha(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Add(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Subtract(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate2X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate4X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Inverse(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE_LINEARIZE(pointTextureSampler, IN).a, IN.color); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Point_LN(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE_LINEARIZE(pointTextureSampler, IN), IN.color); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = PremultiplyAlpha(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Add(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Subtract(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate2X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Modulate4X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(pointTextureSampler, IN); + color = Inverse(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE_LINEARIZE(pointTextureSampler, IN).a, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Point_LN_CM(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE_LINEARIZE(pointTextureSampler, IN), ColorModifier); + clip(color.a - .001); + return color; +} + + +// Linear filtering + +float4 TexturePixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = PremultiplyAlpha(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Add(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Subtract(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate2X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate4X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Linear(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Inverse(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE(linearTextureSampler, IN).a, IN.color); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Linear(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE(linearTextureSampler, IN), IN.color); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = PremultiplyAlpha(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Add(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Subtract(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate2X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Modulate4X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE(linearTextureSampler, IN); + color = Inverse(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE(linearTextureSampler, IN).a, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Linear_CM(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE(linearTextureSampler, IN), ColorModifier); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = PremultiplyAlpha(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Add(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Subtract(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate2X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate4X(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Inverse(color, IN.color); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE_LINEARIZE(linearTextureSampler, IN).a, IN.color); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Linear_LN(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE_LINEARIZE(linearTextureSampler, IN), IN.color); + clip(color.a - .001); + return color; +} + + +float4 TexturePixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = PremultiplyAlpha(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 AddPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Add(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 SubtractPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Subtract(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ModulatePixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate2XPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate2X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 Modulate4XPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Modulate4X(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InversePixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = SAMPLE_LINEARIZE(linearTextureSampler, IN); + color = Inverse(color, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 ColorTextureAlphaPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = ColorTextureAlpha(SAMPLE_LINEARIZE(linearTextureSampler, IN).a, ColorModifier); + clip(color.a - .001); + return color; +} + +float4 InterpolateColorPixelShader_Linear_LN_CM(a2v IN) : COLOR +{ + float4 color = InterpolateColor(SAMPLE_LINEARIZE(linearTextureSampler, IN), ColorModifier); + clip(color.a - .001); + return color; +} + + +// TECHNIQUES: + +// Point filtering +TECHNIQUE(Texture_Point, TexturePixelShader_Point); +TECHNIQUE(Add_Point, AddPixelShader_Point); +TECHNIQUE(Subtract_Point, SubtractPixelShader_Point); +TECHNIQUE(Modulate_Point, ModulatePixelShader_Point); +TECHNIQUE(Modulate2X_Point, Modulate2XPixelShader_Point); +TECHNIQUE(Modulate4X_Point, Modulate4XPixelShader_Point); +TECHNIQUE(InverseTexture_Point, InversePixelShader_Point); +TECHNIQUE(Color_Point, ColorPixelShader); +TECHNIQUE(ColorTextureAlpha_Point, ColorTextureAlphaPixelShader_Point); +TECHNIQUE(InterpolateColor_Point, InterpolateColorPixelShader_Point); + +// Point filtering, use color modifier +TECHNIQUE(Texture_Point_CM, TexturePixelShader_Point_CM); +TECHNIQUE(Add_Point_CM, AddPixelShader_Point_CM); +TECHNIQUE(Subtract_Point_CM, SubtractPixelShader_Point_CM); +TECHNIQUE(Modulate_Point_CM, ModulatePixelShader_Point_CM); +TECHNIQUE(Modulate2X_Point_CM, Modulate2XPixelShader_Point_CM); +TECHNIQUE(Modulate4X_Point_CM, Modulate4XPixelShader_Point_CM); +TECHNIQUE(InverseTexture_Point_CM, InversePixelShader_Point_CM); +TECHNIQUE(Color_Point_CM, ColorPixelShader_CM); +TECHNIQUE(ColorTextureAlpha_Point_CM, ColorTextureAlphaPixelShader_Point_CM); +TECHNIQUE(InterpolateColor_Point_CM, InterpolateColorPixelShader_Point_CM); + +// Point filtering, linearize texture sampling +TECHNIQUE(Texture_Point_LN, TexturePixelShader_Point_LN); +TECHNIQUE(Add_Point_LN, AddPixelShader_Point_LN); +TECHNIQUE(Subtract_Point_LN, SubtractPixelShader_Point_LN); +TECHNIQUE(Modulate_Point_LN, ModulatePixelShader_Point_LN); +TECHNIQUE(Modulate2X_Point_LN, Modulate2XPixelShader_Point_LN); +TECHNIQUE(Modulate4X_Point_LN, Modulate4XPixelShader_Point_LN); +TECHNIQUE(InverseTexture_Point_LN, InversePixelShader_Point_LN); +TECHNIQUE(Color_Point_LN, ColorPixelShader); +TECHNIQUE(ColorTextureAlpha_Point_LN, ColorTextureAlphaPixelShader_Point_LN); +TECHNIQUE(InterpolateColor_Point_LN, InterpolateColorPixelShader_Point_LN); + +// Point filtering, linearize texture sampling, use color modifier +TECHNIQUE(Texture_Point_LN_CM, TexturePixelShader_Point_LN_CM); +TECHNIQUE(Add_Point_LN_CM, AddPixelShader_Point_LN_CM); +TECHNIQUE(Subtract_Point_LN_CM, SubtractPixelShader_Point_LN_CM); +TECHNIQUE(Modulate_Point_LN_CM, ModulatePixelShader_Point_LN_CM); +TECHNIQUE(Modulate2X_Point_LN_CM, Modulate2XPixelShader_Point_LN_CM); +TECHNIQUE(Modulate4X_Point_LN_CM, Modulate4XPixelShader_Point_LN_CM); +TECHNIQUE(InverseTexture_Point_LN_CM, InversePixelShader_Point_LN_CM); +TECHNIQUE(Color_Point_LN_CM, ColorPixelShader_CM); +TECHNIQUE(ColorTextureAlpha_Point_LN_CM, ColorTextureAlphaPixelShader_Point_LN_CM); +TECHNIQUE(InterpolateColor_Point_LN_CM, InterpolateColorPixelShader_Point_LN_CM); + +// Linear filtering +TECHNIQUE(Texture_Linear, TexturePixelShader_Linear); +TECHNIQUE(Add_Linear, AddPixelShader_Linear); +TECHNIQUE(Subtract_Linear, SubtractPixelShader_Linear); +TECHNIQUE(Modulate_Linear, ModulatePixelShader_Linear); +TECHNIQUE(Modulate2X_Linear, Modulate2XPixelShader_Linear); +TECHNIQUE(Modulate4X_Linear, Modulate4XPixelShader_Linear); +TECHNIQUE(InverseTexture_Linear, InversePixelShader_Linear); +TECHNIQUE(Color_Linear, ColorPixelShader); +TECHNIQUE(ColorTextureAlpha_Linear, ColorTextureAlphaPixelShader_Linear); +TECHNIQUE(InterpolateColor_Linear, InterpolateColorPixelShader_Linear); + +// Linear filtering, use color modifier +TECHNIQUE(Texture_Linear_CM, TexturePixelShader_Linear_CM); +TECHNIQUE(Add_Linear_CM, AddPixelShader_Linear_CM); +TECHNIQUE(Subtract_Linear_CM, SubtractPixelShader_Linear_CM); +TECHNIQUE(Modulate_Linear_CM, ModulatePixelShader_Linear_CM); +TECHNIQUE(Modulate2X_Linear_CM, Modulate2XPixelShader_Linear_CM); +TECHNIQUE(Modulate4X_Linear_CM, Modulate4XPixelShader_Linear_CM); +TECHNIQUE(InverseTexture_Linear_CM, InversePixelShader_Linear_CM); +TECHNIQUE(Color_Linear_CM, ColorPixelShader_CM); +TECHNIQUE(ColorTextureAlpha_Linear_CM, ColorTextureAlphaPixelShader_Linear_CM); +TECHNIQUE(InterpolateColor_Linear_CM, InterpolateColorPixelShader_Linear_CM); + +// Linear filtering, linearize texture sampling +TECHNIQUE(Texture_Linear_LN, TexturePixelShader_Linear_LN); +TECHNIQUE(Add_Linear_LN, AddPixelShader_Linear_LN); +TECHNIQUE(Subtract_Linear_LN, SubtractPixelShader_Linear_LN); +TECHNIQUE(Modulate_Linear_LN, ModulatePixelShader_Linear_LN); +TECHNIQUE(Modulate2X_Linear_LN, Modulate2XPixelShader_Linear_LN); +TECHNIQUE(Modulate4X_Linear_LN, Modulate4XPixelShader_Linear_LN); +TECHNIQUE(InverseTexture_Linear_LN, InversePixelShader_Linear_LN); +TECHNIQUE(Color_Linear_LN, ColorPixelShader); +TECHNIQUE(ColorTextureAlpha_Linear_LN, ColorTextureAlphaPixelShader_Linear_LN); +TECHNIQUE(InterpolateColor_Linear_LN, InterpolateColorPixelShader_Linear_LN); + +// Linear filtering, linearize texture sampling, use color modifier +TECHNIQUE(Texture_Linear_LN_CM, TexturePixelShader_Linear_LN_CM); +TECHNIQUE(Add_Linear_LN_CM, AddPixelShader_Linear_LN_CM); +TECHNIQUE(Subtract_Linear_LN_CM, SubtractPixelShader_Linear_LN_CM); +TECHNIQUE(Modulate_Linear_LN_CM, ModulatePixelShader_Linear_LN_CM); +TECHNIQUE(Modulate2X_Linear_LN_CM, Modulate2XPixelShader_Linear_LN_CM); +TECHNIQUE(Modulate4X_Linear_LN_CM, Modulate4XPixelShader_Linear_LN_CM); +TECHNIQUE(InverseTexture_Linear_LN_CM, InversePixelShader_Linear_LN_CM); +TECHNIQUE(Color_Linear_LN_CM, ColorPixelShader_CM); +TECHNIQUE(ColorTextureAlpha_Linear_LN_CM, ColorTextureAlphaPixelShader_Linear_LN_CM); +TECHNIQUE(InterpolateColor_Linear_LN_CM, InterpolateColorPixelShader_Linear_LN_CM); \ No newline at end of file diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.xnb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.xnb new file mode 100644 index 000000000..3c778707d Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Content/Shader.xnb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.csproj b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.csproj new file mode 100644 index 000000000..d71077724 --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate.csproj @@ -0,0 +1,69 @@ + + + WinExe + net9.0 + Major + false + false + false + MONOGAME;DESKTOP_GL;MONOGAME_381 + + + app.manifest + Icon.ico + FlatRedBallDesktopGlMonoGameTemplate + + + + + + + + + + + + + + + + + + + + + + + + + Libraries\DesktopGl\Debug\FlatRedBall.Forms.DesktopGlNet6.dll + + + Libraries\DesktopGl\Debug\GumCore.DesktopGlNet6.dll + + + Libraries\DesktopGl\Debug\SkiaInGum.dll + + + Libraries\DesktopGl\Debug\StateInterpolation.DesktopNet6.dll + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + \ No newline at end of file diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Game1.cs b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Game1.cs new file mode 100644 index 000000000..c2d021a31 --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Game1.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Reflection; + +using FlatRedBall; +using FlatRedBall.Graphics; +using FlatRedBall.Screens; +using Microsoft.Xna.Framework; + +using System.Linq; + +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + +namespace FlatRedBallDesktopGlMonoGameTemplate +{ + public partial class Game1 : Microsoft.Xna.Framework.Game + { + GraphicsDeviceManager graphics; + + + partial void GeneratedInitializeEarly(); + partial void GeneratedInitialize(); + partial void GeneratedUpdate(Microsoft.Xna.Framework.GameTime gameTime); + partial void GeneratedDrawEarly(Microsoft.Xna.Framework.GameTime gameTime); + partial void GeneratedDraw(Microsoft.Xna.Framework.GameTime gameTime); + + public Game1() : base() + { + graphics = new GraphicsDeviceManager(this); + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; +#if ANDROID || IOS + graphics.IsFullScreen = true; +#elif WINDOWS || DESKTOP_GL + graphics.PreferredBackBufferWidth = 800; + graphics.PreferredBackBufferHeight = 600; +#endif + } + + protected override void Initialize() + { + #if IOS + var bounds = UIKit.UIScreen.MainScreen.Bounds; + var nativeScale = UIKit.UIScreen.MainScreen.Scale; + var screenWidth = (int)(bounds.Width * nativeScale); + var screenHeight = (int)(bounds.Height * nativeScale); + graphics.PreferredBackBufferWidth = screenWidth; + graphics.PreferredBackBufferHeight = screenHeight; + #endif + + GeneratedInitializeEarly(); + + FlatRedBallServices.InitializeFlatRedBall(this, graphics); + + GeneratedInitialize(); + + base.Initialize(); + } + + protected override void Update(GameTime gameTime) + { + FlatRedBallServices.Update(gameTime); + + FlatRedBall.Screens.ScreenManager.Activity(); + + GeneratedUpdate(gameTime); + + base.Update(gameTime); + } + + protected override void Draw(GameTime gameTime) + { + GeneratedDrawEarly(gameTime); + + FlatRedBallServices.Draw(); + + GeneratedDraw(gameTime); + + base.Draw(gameTime); + } + } +} diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.bmp b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.bmp new file mode 100644 index 000000000..2b481653e Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.bmp differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.ico b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.ico new file mode 100644 index 000000000..7d9dec187 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Icon.ico differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.dll new file mode 100644 index 000000000..a1f56208e Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.pdb new file mode 100644 index 000000000..80dd33951 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBall.Forms.DesktopGlNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.dll new file mode 100644 index 000000000..8376cbed3 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.pdb new file mode 100644 index 000000000..b5e176d36 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/FlatRedBallDesktopGLNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.dll new file mode 100644 index 000000000..79cccfcbc Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.pdb new file mode 100644 index 000000000..fc770d0ba Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/GumCore.DesktopGlNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.dll new file mode 100644 index 000000000..474103e87 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.pdb new file mode 100644 index 000000000..66ff4cc76 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/SkiaInGum.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.dll new file mode 100644 index 000000000..a73ff5787 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.pdb new file mode 100644 index 000000000..0f543666b Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Debug/StateInterpolation.DesktopNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.dll new file mode 100644 index 000000000..d2a92282d Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.pdb new file mode 100644 index 000000000..d96fcc6b0 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBall.Forms.DesktopGlNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.dll new file mode 100644 index 000000000..ae12f06c3 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.pdb new file mode 100644 index 000000000..8aa5e5dc0 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/FlatRedBallDesktopGLNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.dll new file mode 100644 index 000000000..7f57a7799 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.pdb new file mode 100644 index 000000000..0e1fbb1e9 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/GumCore.DesktopGlNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.dll new file mode 100644 index 000000000..3325adc40 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.pdb new file mode 100644 index 000000000..8f0efd2a8 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/SkiaInGum.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.dll b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.dll new file mode 100644 index 000000000..185c4ca35 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.dll differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.pdb b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.pdb new file mode 100644 index 000000000..c5ffd6153 Binary files /dev/null and b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Libraries/DesktopGl/Release/StateInterpolation.DesktopNet6.pdb differ diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Program.cs b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Program.cs new file mode 100644 index 000000000..ea9fc0f43 --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Program.cs @@ -0,0 +1,41 @@ +using System; +using System.Linq; + +namespace FlatRedBallDesktopGlMonoGameTemplate +{ + /// + /// The main class. + /// + public static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main(string[] args) + { + using (var game = new Game1()) + { + var byEditor = args.Contains("LaunchedByEditor"); + + if (byEditor) + { + try + { + game.Run(); + } + catch (Exception e) + { + System.IO.File.WriteAllText("CrashInfo.txt", e.ToString()); + throw; + } + } + else + { + game.Run(); + } + + } + } + } +} diff --git a/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/app.manifest b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/app.manifest new file mode 100644 index 000000000..796094569 --- /dev/null +++ b/Templates/FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/app.manifest @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true/pm + permonitorv2,permonitor + + + + diff --git a/Templates/FlatRedBallDesktopGlNet6Template/FlatRedBallDesktopGlNet6Template/Game1.cs b/Templates/FlatRedBallDesktopGlNet6Template/FlatRedBallDesktopGlNet6Template/Game1.cs index 9f489b03c..5e054130f 100644 --- a/Templates/FlatRedBallDesktopGlNet6Template/FlatRedBallDesktopGlNet6Template/Game1.cs +++ b/Templates/FlatRedBallDesktopGlNet6Template/FlatRedBallDesktopGlNet6Template/Game1.cs @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game public Game1() : base() { graphics = new GraphicsDeviceManager(this); - + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; #if ANDROID || IOS graphics.IsFullScreen = true; #elif WINDOWS || DESKTOP_GL diff --git a/Templates/FlatRedBallWebTemplate/FlatRedBallWebTemplate/Game1.cs b/Templates/FlatRedBallWebTemplate/FlatRedBallWebTemplate/Game1.cs index 0608bf76b..19380228e 100644 --- a/Templates/FlatRedBallWebTemplate/FlatRedBallWebTemplate/Game1.cs +++ b/Templates/FlatRedBallWebTemplate/FlatRedBallWebTemplate/Game1.cs @@ -1,12 +1,16 @@ -using FlatRedBall; +using System; +using System.Collections.Generic; +using System.Reflection; + +using FlatRedBall; +using FlatRedBall.Graphics; +using FlatRedBall.Screens; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Audio; + +using System.Linq; + using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; -using Microsoft.Xna.Framework.Input.Touch; -using Microsoft.Xna.Framework.Media; -using System; -using System.Collections.Generic; namespace FlatRedBallWebTemplate { @@ -14,7 +18,7 @@ public partial class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; - + partial void GeneratedInitializeEarly(); partial void GeneratedInitialize(); partial void GeneratedUpdate(Microsoft.Xna.Framework.GameTime gameTime); @@ -24,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game public Game1() : base() { graphics = new GraphicsDeviceManager(this); - + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; #if ANDROID || IOS graphics.IsFullScreen = true; #elif WINDOWS || DESKTOP_GL @@ -35,15 +41,15 @@ public Game1() : base() protected override void Initialize() { -#if IOS + #if IOS var bounds = UIKit.UIScreen.MainScreen.Bounds; var nativeScale = UIKit.UIScreen.MainScreen.Scale; var screenWidth = (int)(bounds.Width * nativeScale); var screenHeight = (int)(bounds.Height * nativeScale); graphics.PreferredBackBufferWidth = screenWidth; graphics.PreferredBackBufferHeight = screenHeight; -#endif - + #endif + GeneratedInitializeEarly(); FlatRedBallServices.InitializeFlatRedBall(this, graphics); diff --git a/Templates/FlatRedBalliOSMonoGameTemplate/FlatRedBalliOSMonoGameTemplate/Game1.cs b/Templates/FlatRedBalliOSMonoGameTemplate/FlatRedBalliOSMonoGameTemplate/Game1.cs index 9e0fe0ddc..51e9e2526 100644 --- a/Templates/FlatRedBalliOSMonoGameTemplate/FlatRedBalliOSMonoGameTemplate/Game1.cs +++ b/Templates/FlatRedBalliOSMonoGameTemplate/FlatRedBalliOSMonoGameTemplate/Game1.cs @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game public Game1() : base() { graphics = new GraphicsDeviceManager(this); - + // HiDef is required for web, but proably for all other platforms too, so let's set it + // outside of any #if's + graphics.GraphicsProfile = GraphicsProfile.HiDef; #if ANDROID || IOS graphics.IsFullScreen = true; #elif WINDOWS || DESKTOP_GL diff --git a/Templates/Game1Copier.exe b/Templates/Game1Copier.exe index 7eef09aa5..b9ce069c9 100644 Binary files a/Templates/Game1Copier.exe and b/Templates/Game1Copier.exe differ diff --git a/Templates/Game1Copier/Game1Copier/Program.cs b/Templates/Game1Copier/Game1Copier/Program.cs index 4d4e5b234..cc7b56f2a 100644 --- a/Templates/Game1Copier/Game1Copier/Program.cs +++ b/Templates/Game1Copier/Game1Copier/Program.cs @@ -34,6 +34,11 @@ class Program DestinationGameFile = "FlatRedBallAndroidMonoGameTemplate/FlatRedBallAndroidMonoGameTemplate/Game1.cs", Namespace = "FlatRedBallAndroidMonoGameTemplate" }, + new TemplateInformation { + DestinationGameFile = "FlatRedBallDesktopGlMonoGameTemplate/FlatRedBallDesktopGlMonoGameTemplate/Game1.cs", + Namespace = "FlatRedBallDesktopGlMonoGameTemplate" + }, + }; static void Main(string[] args) {