Kaiju Engine (issue #62) - Setup textures and the texture cache
Textures are now working, though the full management of them isn't complete. Also how they are being drawn as part of the instance group may be refactored, but for now it is working. The part that isn't complete is getting the texture location by the string name in the shader for OpenGL. This prepares the engine to work with PNG, ASTC, and raw textures. This also sets up the texture cache for re-using textures.
Author: https://x.com/KaijuCoder
https://github.com/KaijuEngine/kaiju/pull/63
4
views
Kaiju Engine (issue #49) - Cleanup rendering and make instanced rendering default
This changes the sample code in main to use instanced drawing and instanced data controlled through an instance group. This is not a complete finish of the implementation as we'll need to share shaders and only bind the shader once. This will likely be through a shader draw which then has all the instance groups beneath it. For now the instancing and writing of instance data into a texture for GL to use in the shader is functional.
https://github.com/KaijuEngine/kaiju/pull/53
3
views
Kaiju Engine (issue #51 & #52) - Improve the GL drawing of instances
This makes it so that shaders are only bound once and will draw all of the instances that are bound do them. This also fixes an issue of re-generating the texture every frame for draw instance groups instance data. The texture is now re-crated only when the group expands.
https://github.com/KaijuEngine/kaiju/pull/54
3
views
Kaiju Engine (issue #47) - Make window spin lock relinquish time back to OS
On windows we need to set the priority of the currently running thread to idle for the window events while it waits on the main loop to continue. This lowers the check-in calls from the OS to this thread as it's setting idle and spinning. We then re-stack the thread on both X11 and Windows if it is not ready to read yet. If it is ready to read, we return the thread priority back to what it was (normal). I also fix the long-running GL crash as I need the program to run longer for testing idle CPU usage.
3
views
Kaiju Engine (issue #42) - Create perspective and orthographic cameras
Working perspective and orthographic camera code. This needed to add Ray and Frustum into a collision package, which also required helper functions and planes to be described. I also exposed Rad2Deg and Deg2Rad. Then I added the OPENGL tag to the build and debugging scripts. I then modified the shaders to have global data containing the camera matrices. Lastly I set the global data for the shader to the pre-calculated values from the camera code. There was a change to make the window shared memory into a pointer rather than embedded into the structure to fix a Go memory pinning issue that came up from the Renderer having pointer functions as well.
https://github.com/KaijuEngine/kaiju/pull/46
4
views
Kaiju Engine (issue #40) - Create the standard vertex layout for rendering
This creates a Vertex structure and the associated code to load it up for rendering. The renderer is modified to have the create mesh function. Meshes are bare minimum right now as the focus was on the vertex layout. I also added Color, Color8, and Vec4i helper structs into the matrix library.
https://github.com/KaijuEngine/kaiju/pull/41
15
views
Kaiju Engine (issue #37) - Hook up GL calls to main go thread
Making the setup of a window broken up into 3 phases. (1) Create the window, (2) create the context in go, (3) start the main window event loop. This uses the shared memory to facilitate the stages between C and Go. It's not completely ideal, but it is functional and not too much of a change from the initial implementation. I also moved the glad and GL specific code into the gl package (folder) in the project. Extra helper methods for knowing the state and setting a fatal have been added to shared memory. I also added a wait on the Expose event in x11 as it requires the drawing to happen during that event and not after it.
https://github.com/KaijuEngine/kaiju/pull/38
4
views
Kaiju Engine (issue #36) - Setup shader loader and render triangle in OpenGL on Win32 & X11
This creates the base concept of a shader for OpenGL. It also creates a shader cache to hold shaders that have been built for reuse. This also creates the stub for all GL renderering through a C wrapper layer. Lastly a triangle is crudely drawn on the screen to verify the shader load/compile/use.
https://github.com/KaijuEngine/kaiju/pull/39
2
views
Kaiju Engine (issue #32) - Get a very basic OpenGL implementation started
Adding the code for both Windows and Linux. I also updated the build scripts to include the libraries needed for compiling both Win32 and X11 for use of OpenGL. This required Glad and Glad_wgl on Windows so I copied that from one of my C game engines and also had to generate the wgl header from the glad generator. This is just doing a very basic OpenGL clear screen to cornflower blue.
https://github.com/KaijuEngine/kaiju/pull/35
12
views
Kaiju Engine (issue #33) - Cleanup initial Win32 window code
Adding a fatal message to be read from the caller of the window creation. If a fatal is returned from window create, then it will panic with the message. I've also better wrapped the shared memory into the InputEvent structure so that it can be written to without the need of memcpy. I also updated X11 to use the helper methods created for the shared memory.
https://github.com/KaijuEngine/kaiju/pull/34
5
views
Kaiju Engine (issue #26) - Create project management scripts when creating a new project
Create build scripts, project management scripts, and also bootstrap code. This moves the bootstrapping to it's own folder and properly sets up the source.go to use the engine.Host without circular references. This also creates the go.mod file and .vscode launch scripts.
https://github.com/KaijuEngine/kaiju/pull/28
4
views
Kaiju Engine (issue #14) - Setup new project creation code
Setup of the template project. Added code for copying it over to the target project directory. Also added helper file/folder copy functions for the engine. I've updated the launch json to support the editor tag. Lastly I've created a build go "scripts" folder for doing offline tooling via go run.
https://github.com/KaijuEngine/kaiju/pull/27
4
views
Kaiju Engine (issue #15) - Setup yaegi Go interpreter
This is a functional implementation of the yaegi Go interpreter for interpreting Go code as a scripting language for the engine. This is built so that when the release build of the game/application is built, the go code is compiled directly into the executable rather than being interpreted. I've also added the code needed to execute the project source code at any time on a given host.
https://github.com/KaijuEngine/kaiju/pull/29
1
view
Kaiju Engine (issue #30) - Use project name for build scripts on new project
This now uses [PROJECT_NAME] string replacement to replace with the project name. Also as a part of this commit I'm adding the build scripts for the editor itself by just copying the existing project build scripts and adding the editor tag and the kaiju name.
https://github.com/KaijuEngine/kaiju/pull/31
3
views
Kaiju Engine (issue #22) - Hook up the mouse input events for X11
This is working X11 mouse input events. There is also a bit of refactor for the windows mouse events here to make more common code between the windowing systems. I refactored the windows code so that which button was being clicked is being sent rather than just X1 and X2
https://github.com/KaijuEngine/kaiju/pull/24
4
views
Keiju Engine (issue #8) - Create the primary logic for keyboard input
This is the working implementation of the keyboard code on both Windows and X11
https://github.com/KaijuEngine/kaiju/pull/25
1
view
Kaiju Engine (issue #7) - Create the host (mediator) and entity
This is the start of both the Host and the Entity. Both are not fully complete yet, but are basically functional in their current state. I also moved the window code into the host so that it wasn't floating around in the main. I will need to move the window code into it's own container as we can have multiple windows.
https://github.com/KaijuEngine/kaiju/pull/21
2
views
Kaiju Engine (issue #6) - Create transform as part of matrix package
Transform created and allows for parenting of transforms. This does not include Quaternion for rotation yet.
https://github.com/KaijuEngine/kaiju/pull/19
1
view
Kaiju Engine (issue #9) - Create the primary logic for mouse input
This creates the complete logic for mouse input to be used. This also modifies the window to have a mouse contained within it. Lastly this hooks up the (windows only) mouse input events for the mouse
https://github.com/KaijuEngine/kaiju/pull/23
1
view
Kaiju Engine (issue #17) - Create code for showing an X11 window on Linux
Refactoring the MS Windows code to make it able to share code between platforms. Also this adds in the X11 code for presenting a window on Linux
https://github.com/KaijuEngine/kaiju/pull/18
3
views
Kaiju Engine (issue #5) - Create linear algebra library for 2D/3D matrix math
Vec2, Vec3, Vec4, Quaternion, Mat3 and Mat4.
https://github.com/KaijuEngine/kaiju/pull/16
1
view
Kaiju Engine (issue #3) - Allow creating of a Windows window
Using the win32 API to create a window and read it's events. This uses a novel way of communicating between C and Go using a shared pointer.
https://github.com/KaijuEngine/kaiju/pull/4
6
views
Kaiju Engine introduction (Issue #1) - Initial VSCode project setup
This is just stubbing in the main, mod, and launch files needed to run/debug.
https://github.com/KaijuEngine/kaiju/pull/2
15
views
1
comment