From c703ff829ee8f9f91ba0836b9dbb72cf1e8bd00a Mon Sep 17 00:00:00 2001 From: Ullrich Praetz Date: Fri, 26 Jul 2024 12:10:18 +0200 Subject: [PATCH] add custom words --- docs/.cspell.json | 17 +++++++++++++++++ docs/lang/custom-words.txt | 6 ++++++ src/apps/Editor/OpenGL/OpenGLTest.cs | 18 +++++++++--------- src/apps/Editor/OpenGL/SilkOpenGLControl.cs | 4 ++-- 4 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 docs/.cspell.json diff --git a/docs/.cspell.json b/docs/.cspell.json new file mode 100644 index 000000000..b5e471c06 --- /dev/null +++ b/docs/.cspell.json @@ -0,0 +1,17 @@ +{ + // Enable your dictionary by adding it to the list of `dictionaries` + "dictionaries": ["custom-words"], + + // Tell CSpell about your dictionary + "dictionaryDefinitions": [ + { + // The name of the dictionary is used to look it up. + "name": "custom-words", + // Path to the custom word file. Relative to this `cspell.json` file. + "path": "../docs/lang/custom-words.txt", + // Some editor extensions will use `addWords` for adding words to your + // personal dictionary. + "addWords": true + } + ] +} \ No newline at end of file diff --git a/docs/lang/custom-words.txt b/docs/lang/custom-words.txt index b6df421b8..b58fad34c 100644 --- a/docs/lang/custom-words.txt +++ b/docs/lang/custom-words.txt @@ -1,3 +1,4 @@ +apireference archs Avalonia bepu @@ -6,12 +7,17 @@ blittable Browsable cobertura codecov +defaultdocumentation Dependants +Doraku Entitas fenn Flecs globaltool +GLSL +Grynwald Leopotam +mddocs MemberwiseClone mklink Morpeh diff --git a/src/apps/Editor/OpenGL/OpenGLTest.cs b/src/apps/Editor/OpenGL/OpenGLTest.cs index 3a20ce74a..095be3154 100644 --- a/src/apps/Editor/OpenGL/OpenGLTest.cs +++ b/src/apps/Editor/OpenGL/OpenGLTest.cs @@ -25,7 +25,7 @@ internal static class OpenGLTest private static readonly string VertexShaderSource = @" #version 330 core //Using version GLSL version 3.3 layout (location = 0) in vec4 vPos; - + void main() { gl_Position = vec4(vPos.x, vPos.y, vPos.z, 1.0); @@ -74,10 +74,10 @@ internal static void ExampleMain(string[] args) window.Closing += OnClose; window.Run(); - + window.Dispose(); } - + internal static IWindow Init(string[] args) { var options = WindowOptions.Default; @@ -92,15 +92,15 @@ internal static IWindow Init(string[] args) window.Closing += OnClose; return window; } - + public class EventLoop { private bool stop; - + public void Stop() { stop = true; } - + /// Copy of public void RunEventLoop(IView view) { @@ -134,7 +134,7 @@ private static unsafe void OnLoad() // input.Keyboards[i].KeyDown += KeyDown; // } - //Getting the opengl api for drawing to the screen. + //Getting the OpenGL api for drawing to the screen. Gl = GL.GetApi(window); //Creating a vertex array. @@ -200,7 +200,7 @@ private static unsafe void OnLoad() Gl.DeleteShader(vertexShader); Gl.DeleteShader(fragmentShader); - //Tell opengl how to give the data to the shaders. + //Tell OpenGL how to give the data to the shaders. Gl.VertexAttribPointer(0, 3, VertexAttribPointerType.Float, false, 3 * sizeof(float), null); Gl.EnableVertexAttribArray(0); } @@ -232,7 +232,7 @@ private static void OnClose() Gl.DeleteProgram(Shader); } - + // private static void KeyDown(IKeyboard arg1, Key arg2, int arg3) // { // if (arg2 == Key.Escape) diff --git a/src/apps/Editor/OpenGL/SilkOpenGLControl.cs b/src/apps/Editor/OpenGL/SilkOpenGLControl.cs index 09dfd7243..8c5b97045 100644 --- a/src/apps/Editor/OpenGL/SilkOpenGLControl.cs +++ b/src/apps/Editor/OpenGL/SilkOpenGLControl.cs @@ -12,7 +12,7 @@ public class SilkOpenGLControl : OpenGlControlBase { internal Action OpenGlReady; private DrawTest test; - + protected override void OnOpenGlInit(GlInterface gl) { base.OnOpenGlInit(gl); @@ -35,7 +35,7 @@ protected override void OnOpenGlRender(GlInterface gl, int fb) var width = Bounds.Width; var height = Bounds.Height; test.OpenGlRender(width, height); - + Dispatcher.UIThread.Post(RequestNextFrameRendering, DispatcherPriority.Background); } }