-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
773 additions
and
104 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
|
||
namespace FModel.Framework; | ||
|
||
public readonly struct ImGuiFontConfig | ||
{ | ||
public ImGuiFontConfig(string fontPath, int fontSize) | ||
{ | ||
if (fontSize <= 0) throw new ArgumentOutOfRangeException(nameof(fontSize)); | ||
FontPath = fontPath ?? throw new ArgumentNullException(nameof(fontPath)); | ||
FontSize = fontSize; | ||
} | ||
|
||
public string FontPath { get; } | ||
public int FontSize { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#version 330 | ||
|
||
layout (location = 0) out vec4 Out_Color; | ||
|
||
in vec2 Frag_UV; | ||
in vec4 Frag_Color; | ||
|
||
uniform sampler2D Texture; | ||
|
||
void main() | ||
{ | ||
Out_Color = Frag_Color * texture(Texture, Frag_UV.st); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#version 330 | ||
|
||
layout (location = 0) in vec2 Position; | ||
layout (location = 1) in vec2 UV; | ||
layout (location = 2) in vec4 Color; | ||
|
||
uniform mat4 ProjMtx; | ||
|
||
out vec2 Frag_UV; | ||
out vec4 Frag_Color; | ||
|
||
void main() | ||
{ | ||
Frag_UV = UV; | ||
Frag_Color = Color; | ||
gl_Position = ProjMtx * vec4(Position.xy,0,1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.