Skip to content

Commit

Permalink
add custom words
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jul 26, 2024
1 parent 4199827 commit c703ff8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
17 changes: 17 additions & 0 deletions docs/.cspell.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
6 changes: 6 additions & 0 deletions docs/lang/custom-words.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apireference
archs
Avalonia
bepu
Expand All @@ -6,12 +7,17 @@ blittable
Browsable
cobertura
codecov
defaultdocumentation
Dependants
Doraku
Entitas
fenn
Flecs
globaltool
GLSL
Grynwald
Leopotam
mddocs
MemberwiseClone
mklink
Morpeh
Expand Down
18 changes: 9 additions & 9 deletions src/apps/Editor/OpenGL/OpenGLTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
/// <summary>Copy of <see cref="Silk.NET.Windowing.WindowExtensions.Run"/> </summary>
public void RunEventLoop(IView view)
{
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/apps/Editor/OpenGL/SilkOpenGLControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SilkOpenGLControl : OpenGlControlBase
{
internal Action OpenGlReady;
private DrawTest test;

protected override void OnOpenGlInit(GlInterface gl)
{
base.OnOpenGlInit(gl);
Expand All @@ -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);
}
}
Expand Down

0 comments on commit c703ff8

Please sign in to comment.