Commit Graph

1023 Commits

Author SHA1 Message Date
Paul Cercueil
cfaf24e5ee
CMake: Update CMake script to modern standards
Note that I dropped quite a few things related to CFLAGS:
- the -mfsrra / -mfsca discovery was clean cmake and could have stayed;
  but kos-cc already passes those flags, so -ffast-math is enough to
  enable the FSRRA / FSCA instructions.
- -fomit-frame-pointer is also a default option of KOS.
- -fexpensive-optimizations, -finline-functions and -fstrict-aliasing
  were redundant as they are enabled by the optimization level
  specified.
- -ffp-contract=fast is the default when using GNU C, which we are here.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2026-06-27 12:14:09 +02:00
Luke Benstead
e823205ebc Merge branch 'glPolygonMode-limited-scope-integration' into 'master'
add limited-scope compatability glPolygonMode state for GL_TRIANGLES + GL_LINE/GL_POINT

See merge request simulant/GLdc!169
2026-06-27 06:33:55 +00:00
Luke Benstead
d3e709cdb0 Merge branch 'nehe06-dt-sample' into 'master'
Add nehe06_dt Dreamcast texture sample

See merge request simulant/GLdc!172
2026-06-27 06:27:06 +00:00
Luke Benstead
4e959259fd Merge branch 'feature/kos-texture-stride' into 'master'
Add GL_KOS_texture_stride support for Dreamcast strided textures

See merge request simulant/GLdc!173
2026-06-27 06:25:44 +00:00
GPF
35b3946cc4 Fix POT repeat wrap test to upload POT texture first
The test could inherit a previously uploaded NPOT/strided texture from an earlier test, causing GL_REPEAT to be rejected before the POT upload occurred. Upload the POT texture before setting repeat wrap so the test verifies that POT textures still allow repeat wrapping.
2026-06-23 10:10:58 -07:00
Luke Benstead
9ee62ded90 Restore set_clamp_wrap 2026-06-23 05:32:40 +00:00
Luke Benstead
cbc83deee0 Merge branch 'master' into 'feature/kos-texture-stride'
# Conflicts:
#   tests/test_glteximage2d.h
2026-06-23 05:25:48 +00:00
Luke Benstead
9f83169b7a Fix failing test 2026-06-23 06:23:52 +01:00
Luke Benstead
c3a7776f30 Add more extensive test suite 2026-06-22 09:05:44 +01:00
GPF
7b48abc040 Updated the MR based on the feedback:
Replaced GL_KOS_texture_stride with GL_KOS_texture_non_power_of_two
Removed the explicit texture parameter and made supported NPOT GL_TEXTURE_2D textures automatically use the PVR strided backend
Added clamp-only validation and retained the existing restrictions around mipmaps, wrapping, and unsupported formats

The underlying PVR strided implementation remains the same. GL_NV_texture_rectangle can be considered as a future follow-up.
2026-06-20 14:34:27 -07:00
GPF
6915d7a58c Merge remote-tracking branch 'upstream/master' into feature/kos-texture-stride
# Conflicts:
#	GL/texture.c
2026-06-20 01:12:32 -07:00
GPF
8aa9a0ec43 Add GL_KOS_texture_stride support 2026-06-20 00:45:11 -07:00
GPF
0d1179808f Add nehe06_dt Dreamcast texture sample
Add a Dreamcast GLdc sample that loads a .dt texture from romdisk.

This adds a new nehe06_dt sample based on the existing NeHe cube demo, but loading a Dreamcast .dt texture directly from romdisk instead of the older texture formats.

Changes:
- add samples/nehe06_dt/main.c
- add samples/nehe06_dt/romdisk/NeHe.dt
- register the sample in CMakeLists.txt

The sample is useful for checking GLdc texture loading with Dreamcast-native .dt assets and for comparing the output against the source artwork on hardware.
2026-06-07 00:33:55 +00:00
Luke Benstead
2da4f94b9a Merge branch 'optimize-sdl-texture-streaming' into 'master'
Improve unpack handling for streaming texture uploads

See merge request simulant/GLdc!171
2026-06-06 06:01:04 +00:00
GPF
5065405e71 Optimize streaming texture updates 2026-06-05 21:11:02 -07:00
Luke Benstead
c94bfd7c9c Merge branch 'new-vertex-structure' into 'master'
Start refactoring everything

See merge request simulant/GLdc!167
2026-05-04 10:04:29 +00:00
Luke Benstead
f56bf397de Fix failing tests 2026-05-04 10:35:21 +01:00
Luke Benstead
8aa0e305eb Many texture and lighting fixes 2026-05-04 08:59:12 +01:00
Luke Benstead
b0ef8ed151 Fix fast path calculation 2026-05-03 21:31:58 +01:00
Luke Benstead
57ab4b60a6 Avoid copies when converting textures 2026-05-03 18:47:58 +01:00
Luke Benstead
d85b8e515c Fix lighting issues 2026-04-26 21:24:58 +01:00
Luke Benstead
e685190df0 Use KOS CMake toolchain 2026-04-26 21:24:25 +01:00
Luke Benstead
ce67e37c5d Switch to m4-single 2026-04-23 20:00:48 +01:00
Luke Benstead
8743b0a5b9 Add tests 2026-04-20 22:23:31 +01:00
iann
fca24d106f add limited-scope compatability glPolygonMode state for GL_TRIANGLES + GL_LINE/GL_POINT 2026-04-16 19:27:19 +09:00
Luke Benstead
71da98a0cd Clean up some state 2026-03-04 21:13:42 +00:00
Luke Benstead
21a66c8284 Fix behaviour of current color, normal etc. 2026-03-04 21:04:24 +00:00
Luke Benstead
f0eefc4125 Get non textured polys working 2026-03-01 08:13:04 +00:00
Luke Benstead
13a7de3633 Fix software build 2026-02-28 22:04:08 +00:00
Luke Benstead
bf45f36e82 More float color work 2026-02-28 14:26:22 +00:00
Luke Benstead
cb3153d763 Start refactoring everything 2026-02-23 21:41:00 +00:00
Luke Benstead
ba10615722 Allow compiling containers on Xbox
Obviously GLdc doesn't work on XBox but the containers are fairly generic and are (ab)used
in the Simulant engine which does compile there.
2026-02-15 07:33:44 +00:00
Luke Benstead
105e3253e2 Merge remote-tracking branch 'freakdave/Extend-CMakeLists' 2025-12-10 20:49:48 +00:00
Dave
20b57b88b2
Cleanups 2025-12-10 21:39:53 +01:00
Dave
af223847dc
Update README.md to reflect latest changes 2025-12-10 21:39:09 +01:00
Dave
0bda17d4aa
Add options to skip building samples and tests 2025-12-10 21:33:10 +01:00
Luke Benstead
b67c8976db Don't fail when passing GL_TEXTURE_BINDING_CUBE_MAP_ARB to glGet 2025-11-01 21:15:03 +00:00
Luke Benstead
e61ffaede1 Merge branch 'deinit_fix' into 'master'
Allow for proper shutdown/deinitialization

See merge request simulant/GLdc!165
2025-09-16 19:02:45 +00:00
darc
67f2671618 Allow for proper shutdown/deinitialization 2025-09-15 16:50:02 -05:00
jnmartin84
cae97a2cce mirrored repeat param should only alter mirrored repeat state 2025-09-15 16:50:02 -05:00
jnmartin84
b5bde0a259 sorry, I was wrong about the clamp state for MIRRORED_REPEAT 2025-09-15 16:50:02 -05:00
Falco Girgis
88e7130e98 Changed fabs() to fabfs() within glClipEdge(). 2025-09-15 16:50:02 -05:00
Luke Benstead
a4fb80c279 Merge branch 'mirrored_repeat' into 'master'
Mirrored repeat should not touch clamp state.

See merge request simulant/GLdc!164
2025-07-16 21:12:10 +00:00
jnmartin84
459dd31c52 mirrored repeat param should only alter mirrored repeat state 2025-07-16 17:00:41 -04:00
jnmartin84
d073592943 sorry, I was wrong about the clamp state for MIRRORED_REPEAT 2025-07-16 16:49:30 -04:00
Luke Benstead
58bfdd1fb2 Merge branch 'falco_sketchy_double_clipping' into 'master'
Changed fabs() to fabsf() within glClipEdge().

See merge request simulant/GLdc!163
2025-07-15 16:08:06 +00:00
Falco Girgis
7f2fb41122 Changed fabs() to fabfs() within glClipEdge(). 2025-07-15 10:01:47 +00:00
Luke Benstead
6619c3d397 Merge branch 'mirrored_repeat' into 'master'
Implement GL_MIRRORED_REPEAT support

See merge request simulant/GLdc!162
2025-07-13 06:01:49 +00:00
jnmartin84
7ff32cec48 clear clamp when setting mirrored repeat 2025-07-13 01:07:49 -04:00
jnmartin84
0cd447dbcf don't waste a full byte on mirror/flip setting
moved MIRROR bits into bits 2 and 3 of what used to be `uv_clamp` member of TextureObject
renamed `uv_clamp` member to `uv_wrap`
updated and commented code accessing `uv_wrap` for both clamp and mirror settings
2025-07-13 00:16:43 -04:00