Commit Graph

164 Commits

Author SHA1 Message Date
T_chan
ca8ebf7fc0 Change all ifdefs to support both DC & Naomi 2025-02-22 14:42:00 +01:00
Luke Benstead
6bd42b87b9 Merge branch 'fog_fix' into 'master'
Fixed OpenGL Fog implementation + Added New Sample

See merge request simulant/GLdc!155
2025-02-22 08:23:16 +00:00
Falco Girgis
5466dc227f Tenth time is a charm! 2025-02-18 22:09:48 -06:00
Falco Girgis
643685a7b7 ifdef-ing more DC-specifics from Nehe16
- Attempting to fix build.
2025-02-18 22:04:49 -06:00
Falco Girgis
d2eb58d7e8 Moved DC include into #ifdef to fix x86 build. 2025-02-18 22:00:46 -06:00
Falco Girgis
56f5b24d85 Fixed OpenGL Fog implementation + Added New Sample
- Redid fog.c OpenGL fog back-end implementation
    * only reconfigure fog values when changed
    * properly clamp between 0.0f and 1.0f colors
    * error out on negative densities
    * separate fog statics became single struct
- Added Nehe16 example (adapted from KGL)
    * Made spinning much faster (so you can see it better)
    * fixed a few issues with KGL code (invalid GL enums, lol)
    * swapped to new controller API
    * added #ifdef for non-DC file paths
2025-02-18 21:52:19 -06:00
Troy Davis
9d2c1fb3e8 Merge branch GLdc:master into glCompressedTexSubImage2D-recreated 2025-02-05 18:00:14 +00:00
UnknownShadow200
62cb72091d Fix wrong glEnable call 2025-02-05 21:47:35 +11:00
UnknownShadow200
455ad29e4c At least the provided .dtex files load now 2025-02-05 21:42:50 +11:00
UnknownShadow200
72baba7a5e Refactor dtex parser again 2025-02-05 21:36:28 +11:00
UnknownShadow200
4255767f9f Refactor dtex parser 2025-02-05 20:34:04 +11:00
GPF
af460af119 Recreated glCompressedTexSubImage2D implementation 2025-02-04 14:27:18 -07:00
Luke Benstead
c4786a62e6 Fix bug in allocations (thanks @skmp) 2024-12-07 19:35:40 +00:00
GPF
72136bb7f5 quick implementation of glTexSubImage2D/_glTexSubImage2DValidate, update to nehe06 example to show usage of glTexSubImage2D, and a compile issue to primitive_modes fixed. 2024-10-13 12:58:09 -07:00
UnknownShadow200
82d64618f8 Primitive modes sample should let you press START to exit, like other samples 2024-10-05 06:49:04 +10:00
UnknownShadow200
165eb9d5c8 Add primitive modes sample, quad strips partially work
Although the second triangle is wrongly culled
2024-10-02 19:28:02 +10:00
Falco Girgis
49f2f0917b Nehe20 Build Fix + Warnings cleanup for GCC14.1.0.
Newest toolchain is bitchier, so I wanted to go ahead and clear up all
of the warnings from building GLdc and the various examples...

1) Set CMake CXX standard to 14 instead of 11, since CXXFLAGS were
  enforcing that language standard anyway.
2) Fixed a bunch of strict aliasing violations in immediate.c: glVertex3f.
3) Removed or commented out lots of unused variables.
4) Fixed some "suggested inner braces on initializer" crap.
5) Fixed a bunch of signed vs unsigned pointer assignments.
6) Fixed several printf() warnings from using %d with int32_t (needs to
   be %ld for long int).
7) Fixed build issue with Nehe20 from not including kos.h for the
   KOS_ROMDISK macro.
8) Fixed some signed vs unsigned comparison mismatches in C++ template
   instantiations within clipping tests.
9)
2024-07-31 20:35:34 -05:00
Dave
4aa7459193 Iterate over cubes sample 2024-04-24 21:18:18 +02:00
Luke Benstead
5299badf58 Only submit trailing vertices if the previous triangle was visible 2024-04-03 22:09:35 +01:00
Luke Benstead
f8d1fa3439 Fix some issues with clipping 2024-04-03 21:19:36 +01:00
Spencer Elliott
79172452f2 Convert GL_SHORT to proper float on conversion 2023-09-26 18:51:29 +00:00
Luke Benstead
43d64a4957 Fix twiddling issues 2023-09-11 17:27:04 +01:00
Luke Benstead
951ece6d19 Add test job to CI 2023-09-11 17:25:47 +01:00
Luke Benstead
61e5a7a2a6 More twiddling work 2023-09-10 19:41:25 +01:00
Luke Benstead
7ce01ad93f Fix up paletted textures 2023-09-06 08:01:01 +01:00
Luke Benstead
0e31aa3d27 Tweak 2023-09-01 20:25:27 +01:00
Luke Benstead
246cb997da Add optional dcprof to prof_texture_upload 2023-09-01 20:23:55 +01:00
Luke Benstead
77531ca347 Drastically refactor glTexImage2D 2023-08-26 20:34:11 +01:00
Luke Benstead
a5891056db Many bug fixes and optimisations 2023-05-16 13:31:44 +01:00
Luke Benstead
9cffe14ad6 Clean up aligned vector 2023-05-12 20:51:36 +01:00
Luke Benstead
9e1b1bc40a Merge branch 'clipping-rewrite-for-the-last-time-ffs' into 'master'
Restructure clipping to be much MUCH faster in the visible case

See merge request simulant/GLdc!105
2023-04-26 20:00:17 +00:00
Luke Benstead
0f65eab86a Much faster clipping 2023-04-26 20:50:43 +01:00
Luke Benstead
9cc52a01fe Better clipping 2023-04-22 20:47:45 +01:00
Luke Benstead
c5ce81a38d WIP: Restructure clipping to be much MUCH faster in the visible case
This currently only works with triangles, anything more and it crashes
due to me not queuing subsequent vertices in the strip correctly
2023-04-19 20:57:44 +01:00
Dave
3b53691e4b Change float colors to GLubyte in cubes sample 2023-04-17 19:33:59 +02:00
David Reichelt
190b4ecfb7 Add include for printf 2023-04-08 20:07:21 +00:00
Dave Reichelt
df9a12bbd6 Added new cubes sample
- A button toggles between glDrawElements and glDrawArrays
- B button toggles glBlend
- Start quits the sample
- Every 10 seconds a log with stats will be sent to the terminal
2023-04-08 21:42:03 +02:00
falco
e27c276daa Fixed poly/tri/quadmarks to build with GCC12
"start" is a reserved symbol within KOS, per crt1.s. Not sure why the old toolchains let us use this symbol name elsewhere, but the new GCC12 toolchain rightfully complains about duplicate symbols.

- Renamed "start" timestamp to "begin."
2023-03-04 17:35:17 -06:00
Luke Benstead
7db15a0e03 Fix PC build 2022-11-04 19:25:50 +00:00
Luke Benstead
6be3e6185d Faster inversion 2022-09-14 19:20:24 +01:00
Luke Benstead
b17104afea Add a missing header 2022-06-13 20:05:39 +01:00
Luke Benstead
53c54997c3 Fix a number of issues! 2022-06-10 20:27:21 +01:00
Luke Benstead
68c6936b25 Add nehe10 sample 2022-06-10 20:26:51 +01:00
Luke Benstead
0060f48202 Fix compilation issues on PC vs DC 2022-05-21 20:16:12 +01:00
Luke Benstead
dd7bb47ffb Merge remote-tracking branch 'ozzyouzo/master' into paletted-textures 2022-05-04 20:39:39 +01:00
Luke Benstead
774a956012 Merge branch 'refactor_nehe08' into 'master'
refactor nehe08 slightly

See merge request simulant/GLdc!94
2022-02-01 09:00:46 +00:00
T_chan
bd507f38bd refactor nehe08 slightly 2022-02-01 08:48:31 +00:00
T_chan
53eb2e2a51 Add gluBuild2DMipmaps() 2022-02-01 07:25:54 +00:00
T_chan
fdac490e34 samples: correct image paths & include <math.h> 2022-01-31 16:59:05 +00:00
T_chan
ae3ebe2e5c regroup the BMP file loading into 1 file, and correct some types that give... 2022-01-31 10:30:26 +00:00