Commit Graph

46 Commits

Author SHA1 Message Date
bb1b36127e make compat/endian.h use different methods for swapping bytes depending on what is available 2025-06-15 13:57:52 +02:00
d277a1735b fix: long is 4 bytes on mingw systems 2025-06-15 13:57:52 +02:00
e833a13d29 fix: ulong not a type in mingw 2025-06-15 13:57:52 +02:00
78f6d565fb fix: config getpat appender, using mempcpy and strpcpy instead, since it makes it less prone to errors 2025-06-13 01:55:44 +02:00
9975aec7eb make error return 1 instead of aborting, as abort is rather cruel 2025-06-13 01:55:44 +02:00
c3bb0621c3 fix: wasn't handling floating-point numbers as output 2025-06-13 01:55:44 +02:00
2489ecbb0b fix: no error return with procbuff. 2025-06-12 21:47:36 +02:00
e72de37642 add copyright info to the files that were missing it 2025-06-12 18:21:35 +02:00
51be23d109 implement conf 2025-06-12 18:17:31 +02:00
7dd464349f rework logging to be more optimised, and some minor improvements.
removed function definitions and opted for using macros instead.
It now does not have a set limit when it comes to printing (at least,
it's the stdc's limit again). However, it is now no longer possible to
use a character pointer to print information to the screen.
2025-06-12 18:09:23 +02:00
364bc9dacd fix: windows syntax errors / typos 2025-06-12 10:51:45 +02:00
5e6d7d22e0 use my atrb header, since it's more platform-agnostic 2025-06-12 10:51:00 +02:00
cad49f2912 rework attribute definitions in atrb.h 2025-06-12 10:50:07 +02:00
261188e257 fix: no boolean incrementation 2025-06-11 17:57:28 +02:00
0633de838c fix: attributes must be ahead of the function definition 2025-06-11 17:57:28 +02:00
be34e101fd remove loading file logic and instead focus on parsing the incomming text 2025-06-11 17:56:22 +02:00
ef0125e7b0 reorder functions to have config path generation be at the bottom 2025-06-11 17:56:22 +02:00
0fe19b28fc add conf code start
add the start for conf file loading
2025-06-11 17:56:22 +02:00
a7fb6136ea fix: renamed some symbols which were causing some compatibility problems
__FILE_NAME__ and GLFW_CONTEXT_DEBUG were causing problems in the CI
pipeline, thus I deemed them unreliable.
__FILE_NAME__ is not __FILE__ which is more universally used across
compilers.
and GLFW_CONTEXT_DEBUG has been replaced with GLFW_OPENGL_DEBUG_CONTEXT,
which is a legacy definition, which plays nicer on older platforms.
(like ubuntu)
2025-06-11 17:56:22 +02:00
89a82a6be2 use a geometry shader to render rectangles 2025-06-06 18:10:30 +02:00
ed7a157ee3 add shader compilation error logging 2025-06-06 18:09:49 +02:00
c5d3449abc rename shader files 2025-06-06 18:09:49 +02:00
56749e2379 code semantic fixups 2025-06-06 18:09:49 +02:00
5f4389d9f9 provide a better method of embedding shaders within the source code 2025-06-06 18:09:49 +02:00
5ae974d84f move from float3 to float2, and general cleanup 2025-06-05 00:13:05 +02:00
3fbc1f50ab hello, triangle
I wrote some code to get a triangle drawn to the screen.
This took much more effort than it should've...
2025-06-03 14:18:56 +02:00
4f95dc144d add code for a 3-dimentional vector. 2025-06-03 14:18:20 +02:00
991c071920 improve OpenGL initialization
added more comments, logging and made some default values more explicit
2025-06-03 14:16:56 +02:00
0f97969254 add compatibility headers 2025-06-02 12:41:01 +02:00
c403273e7a add colour32 header 2025-06-02 12:41:01 +02:00
fc2cbd9924 switch from c17 to gnu99
I am choosing gnu99 over c99, since I am planning to use GNU extensions,
like bswap. (in a future commit)
Why I choose c99 over c17, is because this'll produce more portable
code.

c99 does not implement noreturn.h, thus I added it to the compiler
attributes header.
2025-06-02 12:41:01 +02:00
42646baa1a don't indent post-processes directives 2025-06-02 12:41:01 +02:00
Quinn
f0ab423e36 add OpenGL bootstrapping code 2025-06-02 12:41:00 +02:00
Quinn
8c78ffdca5 implement input and rework window implementation
moved the window variable as a constant in the window module, and
implement more of GLFW logic, including some basic input handling.
2025-06-02 12:41:00 +02:00
Quinn
9ade61e006 add GLFW error callback 2025-06-02 12:41:00 +02:00
Quinn
7c4ba05eee clean up error header to not use modifiers on each implementation
implementaitons do not need modifiers if the definition already has
these.
Also move the comments to be above the implementations, rather than
behind the definitions.
2025-06-02 12:41:00 +02:00
Quinn
76e3547313 rename window/render* to io/window*
this makes more sense, as we'll add more source files in this category
2025-06-02 12:41:00 +02:00
Quinn
cf1759a5c3 License under MIT
added the MIT licence and provided the relevant information in the
different source files.
2025-06-02 12:41:00 +02:00
Quinn
ef0063d9aa implement some basic rendering boilerplate 2025-05-01 16:48:48 +02:00
Quinn
9e0708b49f don't make the functions extern anymore, as we're no longer doing ffi. 2025-05-01 16:48:46 +02:00
Quinn
401854002f remove rust/cargo from compilation
it has become clear that incorperating rust in this project was a
mistake, since I don't understand it well enough for it to be useful,
and at this rate it'd be faster to use GLFW in C than in rust.
2025-05-01 16:48:45 +02:00
Quinn
87117931f7 create rust implementation 2025-05-01 16:48:44 +02:00
Quinn
1a3f555fca write error header file
write a header for logging and abrubtly exiting the code.
2025-05-01 16:48:44 +02:00
Quinn
40720a53c8 write attributes in a header for ease of use
this handles different compilers automatically and just provides a
common method of using the attributes. Plus, it's less characters!
2025-05-01 16:48:43 +02:00
Quinn
35f38f8980 fix: get rid of linter warning 2025-05-01 16:48:36 +02:00
Quinn
7a64aefcac setup project files
Added (most) of the project files to the working tree.
Some work still needs to be done to make the rust/C communication better
before we can fully move on to starting to write the actual applicaiton.
2025-05-01 16:48:18 +02:00