diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 50ebff8..9cb608a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,6 @@ jobs: runs-on: ${{ matrix.os }} strategy: - max-parallel: 1 matrix: configuration: - Debug diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d130bea..24e56d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,13 @@ # Contributing -# Technical Knowledge Prerequisite +## Technical Knowledge Prerequisite + - Understand the [Learn OpenGL tutorial up to and including this lesson](https://learnopengl.com/Getting-started/Hello-Triangle) + +## What can I work on? + +Check out the [open issues file](./issues/open.md) to understand what work needs to be done. + +## Why is there an issue tracker in the codebase and in our SCM solution? + +Github does provide nice linking to issues for PRs and for the community to add issues to the project without having code access. The issues markdown files in the repo should be represented in Github as well, but are usually of higher priority and more immediately available to be worked on. diff --git a/examples/Playground/Program.fs b/examples/Playground/Program.fs index 0a1935d..a13e008 100644 --- a/examples/Playground/Program.fs +++ b/examples/Playground/Program.fs @@ -26,22 +26,8 @@ type GameState = Triangles = Primitives.ShadedObject.Default } let private initHandler (config:Config) = - let state = config.State let fragmentPaths = ["Resources/Shaders/fragment.glsl"] let vertexPaths = ["Resources/Shaders/vertex.glsl"] - let vertices = [| - 0.0f; -0.5f; 0.0f; // shared vertex - // first triangle - -0.9f; -0.5f; 0.0f; // left vertex - -0.45f; 0.5f; 0.0f; // top vertex - // second triangle - 0.9f; -0.5f; 0.0f; // right vertex - 0.45f; 0.5f; 0.0f; // top vertex - |] - let indices = [| - 0u; 1u; 2u; // first triangle vertex order as array indices - 0u; 3u; 4u; // second triangle vertex order as array indices - |] let transform = { Transform.Default() with Scale = (1.0f, 1.0f, 1.0f) @@ -49,9 +35,7 @@ let private initHandler (config:Config) = match Primitives.ShadedObject.CreateQuad vertexPaths fragmentPaths transform 1.8f 1.0f with | Some primitive -> { config with - State = - { GameState.Default with - Triangles = primitive }} + State.Triangles = primitive } | None -> Logging.fail "Failed to create initial game state" config diff --git a/examples/Playground/Resources/Textures/hello_world.bmp b/examples/Playground/Resources/Textures/hello_world.bmp new file mode 100644 index 0000000..def2531 Binary files /dev/null and b/examples/Playground/Resources/Textures/hello_world.bmp differ diff --git a/issues/closed.md b/issues/closed.md new file mode 100644 index 0000000..f93ab3b --- /dev/null +++ b/issues/closed.md @@ -0,0 +1,5 @@ +# Open Issues + +Move [in-progress](./in-progress.md) issues to this file when completed + +- [Closed issues search](https://github.com/ExoKomodo/openwomb/issues?q=is%3Aissue+is%3Aclosed) diff --git a/issues/in-progress.md b/issues/in-progress.md new file mode 100644 index 0000000..0be7fea --- /dev/null +++ b/issues/in-progress.md @@ -0,0 +1,29 @@ +# In-Progress Issues + +Once completed, move the issue into [closed](./closed.md), and also close it within the [Official Issue Tracker](https://github.com/exokomodo/openwomb/issues) + +## Render textures/sprites + +### [Issue Link](https://github.com/ExoKomodo/openwomb/issues/3) + +### Branch - [3_sprites](https://github.com/exokomodo/openwomb/tree/3_sprites) + +### Overview + +There are 2 different ways to render images with SDL: + +1. Using [SDL_Texture](https://lazyfoo.net/tutorials/SDL/07_texture_loading_and_rendering/index.php) (terrible option for general use but great for low-overhead texturing) +1. Using OpenGL to render textures in a shader (best option for overall usage) + +This issue is to only implement the OpenGL way, as it provides a general-purpose use case, since rendering to a quad is all that is "needed" for dealing with images and textures in graphics. + +### Instructions + +1. Read the [OpenGL tutorial for rendering textures to a quad](https://learnopengl.com/Getting-started/Textures). Now prepare for implementation. +1. Will require some changes to the [Primitives.ShadedObject.From function](./src/Womb/Graphics/Primitives.fs) +1. Will require some changes to the [Primitives.ShadedObject.UseMvpShader function](./src/Womb/Graphics/Primitives.fs) +1. Will require some changes to the [example shaders in the Playground example](./examples/Playground/Resources/Shaders/) + +### Acceptance Criteria + +Be able to render an image to a shaded quad. To demonstrate this, modify the [Playground example](./examples/Playground) to render the [hello_world.bmp](./examples/Playground/Resources/Textures/hello_world.bmp). For proper completeness, demonstrate how we can color the texture in the shader as well. diff --git a/issues/open.md b/issues/open.md new file mode 100644 index 0000000..943482f --- /dev/null +++ b/issues/open.md @@ -0,0 +1,3 @@ +# Open Issues + +- [Open issues search](https://github.com/ExoKomodo/openwomb/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee)