From bad40a40010fc05cceaa70465955c597677569b0 Mon Sep 17 00:00:00 2001 From: tommy-mitchell Date: Mon, 2 Sep 2024 00:16:24 -0500 Subject: [PATCH 1/2] add sample --- HelloWorld/HelloWorld.csproj | 12 ++++++++++++ HelloWorld/Program.cs | 9 +++++++++ HelloWorld/README.md | 4 ++++ HelloWorld/screenshot.png | Bin 0 -> 5324 bytes README.md | 1 + 5 files changed, 26 insertions(+) create mode 100644 HelloWorld/HelloWorld.csproj create mode 100644 HelloWorld/Program.cs create mode 100644 HelloWorld/README.md create mode 100644 HelloWorld/screenshot.png diff --git a/HelloWorld/HelloWorld.csproj b/HelloWorld/HelloWorld.csproj new file mode 100644 index 0000000..9a2d45d --- /dev/null +++ b/HelloWorld/HelloWorld.csproj @@ -0,0 +1,12 @@ + + + + Exe + net8.0 + + + + + + + diff --git a/HelloWorld/Program.cs b/HelloWorld/Program.cs new file mode 100644 index 0000000..848ce00 --- /dev/null +++ b/HelloWorld/Program.cs @@ -0,0 +1,9 @@ +using Foster.Framework; + +App.Register(); +App.Run("Hello World", 640, 360); + +class Game : Module +{ + public override void Render() => Graphics.Clear(0x7d9345); +} diff --git a/HelloWorld/README.md b/HelloWorld/README.md new file mode 100644 index 0000000..c440fbe --- /dev/null +++ b/HelloWorld/README.md @@ -0,0 +1,4 @@ +# Hello World +![Screenshot](screenshot.png "Screenshot") + +Hello, Foster! diff --git a/HelloWorld/screenshot.png b/HelloWorld/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..87817a81cf7a80831f331be60022d7164e19f642 GIT binary patch literal 5324 zcmeAS@N?(olHy`uVBq!ia0y~yUVgwcX=w02McW`ofxax@S|8%w}6Fd7J>fiT)V z80{X6b`M6o2f&hWG!RAuVYH7l+C5MJW&?(n+7(LdUtYDy>412iu6{1-oD!M | | [Shapes](https://github.com/FosterFramework/Samples/tree/main/Shapes) | A small program that draws shapes to the screen without loading any assets | | | [Froggymark](https://github.com/FosterFramework/Samples/tree/main/Froggymark) | Performance test that draws as many quads to the screen as it can | | | [ImGui](https://github.com/FosterFramework/Samples/tree/main/ImGui) | An example using ImGui.NET wrapped in Foster draw calls | | From 4ae5398ef7de391141daa1ea5a6c3df0752233f1 Mon Sep 17 00:00:00 2001 From: tommy-mitchell Date: Mon, 2 Sep 2024 00:22:55 -0500 Subject: [PATCH 2/2] add to solution --- FosterSamples.sln | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FosterSamples.sln b/FosterSamples.sln index 42c9a3b..4eb75ba 100644 --- a/FosterSamples.sln +++ b/FosterSamples.sln @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Froggymark", "Froggymark\Fr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FosterImGui", "ImGui\FosterImGui.csproj", "{ED95B28D-2822-4F3D-B1C5-591658BB2380}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld\HelloWorld.csproj", "{CC124445-0A7B-42FC-92E1-7FE0BD3286B9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -36,5 +38,9 @@ Global {AA3B2D39-7BF3-4CCD-8F19-672474E71D41}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA3B2D39-7BF3-4CCD-8F19-672474E71D41}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA3B2D39-7BF3-4CCD-8F19-672474E71D41}.Release|Any CPU.Build.0 = Release|Any CPU + {CC124445-0A7B-42FC-92E1-7FE0BD3286B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC124445-0A7B-42FC-92E1-7FE0BD3286B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC124445-0A7B-42FC-92E1-7FE0BD3286B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC124445-0A7B-42FC-92E1-7FE0BD3286B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal