2e47daaa31
(rebased) experimental support for parsing from a float16 mesh (or a float32-quantized-as-ushort mesh)
2025-08-03 21:49:46 -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
jnmartin84
708566af72
initial support for GL_MIRRORED_REPEAT
2025-07-12 12:07:04 -04:00
Luke Benstead
f09760dda3
Merge branch 'tnl_effects' into 'master'
...
Add support for texture and colour matrices
See merge request simulant/GLdc!157
2025-05-24 20:19:01 +00:00
Luke Benstead
130ccc4f5d
Merge branch 'master' into 'master'
...
Fix compiler ICE with double-to-float macro conversion
See merge request simulant/GLdc!160
2025-05-24 20:18:23 +00:00
bruceleeto
dccc26d532
Fix compiler ICE with double-to-float macro conversion
2025-05-24 05:32:04 +01:00
Luke Benstead
0057076958
Merge branch 'twiddle_optim' into 'master'
...
Optimise twiddle index calculation
See merge request simulant/GLdc!159
2025-04-12 05:59:35 +00:00
UnknownShadow200
b4f2a80a0b
Optimise twiddle index calculation
2025-04-12 10:46:09 +10:00
Luke Benstead
dfeb32c609
Merge branch 'misc_fixes' into 'master'
...
Some small fixes
See merge request simulant/GLdc!158
2025-03-31 10:53:41 +00:00
UnknownShadow200
cf3a29e097
Fix clipped triangle in THIRD_VISIBLE case producing vertices in wrong direction, which would result in them being culled when face culling was enabled
2025-03-31 21:12:05 +11:00
UnknownShadow200
135f4c58c5
Fix gluBuild2DMipmaps not returning a value
2025-03-31 21:08:53 +11:00
Luke Benstead
8d6435d9dc
Merge branch 'full_naomi_compat' into 'master'
...
Change all ifdefs to support both DC & Naomi
See merge request simulant/GLdc!154
2025-03-01 19:27:12 +00:00
T_chan
ca8ebf7fc0
Change all ifdefs to support both DC & Naomi
2025-02-22 14:42:00 +01:00
UnknownShadow200
6ce38521c9
Fix tnl_effects sample not working at all on native desktop OpenGL
2025-02-22 22:41:49 +11:00
UnknownShadow200
0e112ffb3c
Merge branch 'master' into tnl_effects
2025-02-22 22:35:41 +11:00
Luke Benstead
0285e2027d
Merge branch 'sketchy_vertex_formats' into 'master'
...
Implemented support for all vertex attribute fmts.
See merge request simulant/GLdc!156
2025-02-22 08:23:38 +00: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
Luke Benstead
d630041cc8
Merge branch 'glCompressedTexSubImage2D-recreated' into 'master'
...
creates new GLext function glCompressedTexSubImage2D, updated nehe_06_vq.elf sample to use the new function.
See merge request simulant/GLdc!147
2025-02-22 08:21:10 +00:00
Luke Benstead
5af0d5831d
Merge branch 'fix_glRotatef' into 'master'
...
Call fsincos with angle degrees instead of passing in radians
See merge request simulant/GLdc!153
2025-02-22 08:20:21 +00:00
David Reichelt
32e3f4374e
Call fsincos with angle degrees instead of passing in radians
2025-02-22 08:20:21 +00:00
UnknownShadow200
ff942e804e
Add texture/color matrix sample
2025-02-22 10:52:09 +11:00
UnknownShadow200
2669a9266f
When texture validation fails, log reason why using INFO_MSG
2025-02-22 10:08:55 +11:00
UnknownShadow200
e3f61f3c78
Initial work on texture and colour matrix support
2025-02-22 09:33:08 +11:00
UnknownShadow200
ebdb454a75
Simplify T&L effect code
2025-02-22 08:46:58 +11:00
UnknownShadow200
9ca7c002be
Slightly optimise matrix code to a single pointer lookup
2025-02-22 08:17:56 +11:00
UnknownShadow200
5e2ea81593
Avoid lighting unless needed
2025-02-22 07:40:12 +11:00
UnknownShadow200
93c81739ba
WIP on a separate T&L effects file
2025-02-22 06:43:44 +11:00
Falco Girgis
70e0d503a9
Fixed incorrect alpha vertex color value.
...
- _readColorXXXARGB() macros were being passed the incorrect input index
for the alpha channel from the outer macros, fixed.
- Thanks for finding it, UnknownShadow200!
2025-02-19 13:03:05 -06:00
Falco Girgis
b09e630304
Implemented support for all vertex attribute fmts.
...
1) GLdouble was incorrectly being treated as GLfloat which is now broken
with -m4-single as default. Fixed.
2) Implemented all missing double-precision vertex attribute reader
functions.
3) Implemented all missing vertex reader/extracter functions for
unsigned/signed ints and unsigned/signed shorts.
4) Added (void) argument lists to every function missing them.
- Not the same as accepting no arguments in C, as with C++.
5) Added KOS's __restrict to software.h so it can be used in common code.
2025-02-19 08:54:21 -06: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
Luke Benstead
e71560f31b
Merge branch 'platform_h_support_Naomi' into 'master'
...
platform.h: support Naomi again
See merge request simulant/GLdc!150
2025-02-09 20:21:51 +00:00
Luke Benstead
388df1d1d5
Merge branch 'cherry-pick-52011fe9' into 'master'
...
Add support for glGetIntegerv(GL_MATRIX_MODE, ...)
See merge request simulant/GLdc!152
2025-02-09 19:21:53 +00:00
David Reichelt
08b2d58b4e
Add support for glGetIntegerv(GL_MATRIX_MODE,...)
...
(cherry-picked from commit 52011fe9efeb2e997637876be8a3f600bf91df25)
Co-authored-by: David Reichelt <freakdave@hotmail.com>
2025-02-09 19:13:38 +00:00
David Reichelt
810d0fdc19
Merge branch GLdc:master into master
2025-02-09 19:00:07 +00:00
Luke Benstead
787b873674
Merge branch 'lighting_fix' into 'master'
...
Fix lighting using some values calculated for last vertex, instead of the current vertex
See merge request simulant/GLdc!151
2025-02-08 07:07:59 +00:00
UnknownShadow200
b7ac22ec34
Fix lighting using some values calculated for last vertex, instead of the current vertex
2025-02-08 12:23:43 +11:00
T_chan
72f11428d3
platform.h: support Naomi again
2025-02-05 20:29:21 +00:00
Troy Davis
9d2c1fb3e8
Merge branch GLdc:master into glCompressedTexSubImage2D-recreated
2025-02-05 18:00:14 +00:00
Luke Benstead
84281ca329
Merge branch 'depthsample_fix' into 'master'
...
Depthsample fix
See merge request simulant/GLdc!148
2025-02-05 17:47:57 +00:00
Luke Benstead
d3b8b89d47
Merge branch 'gluPerspective' into 'master'
...
fixed gluPerspective to use GLdouble instead of GLfloat for m4-single compilation.
See merge request simulant/GLdc!149
2025-02-05 17:47:29 +00:00
GPF
41e30028df
fixed gluPerspective to use GLdouble instead of GLfloat for m4-single compilation.
2025-02-05 10:42:05 -07: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
a34f18965d
Merge branch 'alloc_fix' into 'master'
...
Fix alloc_count_continuous calculation
See merge request simulant/GLdc!145
2025-02-02 23:00:08 +00:00
UnknownShadow200
5b5e6d3ee6
Fix alloc_count_continuous calculation
2025-02-03 06:53:16 +11:00
Luke Benstead
acee4b5c37
Merge branch 'quicker_transform' into 'master'
...
Quicker vertex transform in non-fast path
See merge request simulant/GLdc!144
2025-02-02 08:34:36 +00:00
Luke Benstead
9100660c78
Merge branch 'attribute_speedup' into 'master'
...
Move attribute parsing into separate file and avoid recomputing parse/read functions unless necessary
See merge request simulant/GLdc!143
2025-02-02 08:32:06 +00:00
UnknownShadow200
a566bba082
Call TransformVertex directly instead of using TransformVertices
2025-02-02 15:58:19 +11:00
UnknownShadow200
3b2e549934
Optimise vertex transform in non-fast path to avoid storing xyz to memory and then loading it again
2025-02-02 14:36:40 +11:00
UnknownShadow200
9d717800bd
Reorganise attribute parsing functions
2025-02-02 13:51:30 +11:00
Luke Benstead
ea4073fbdc
Merge branch 'error_coldpath' into 'master'
...
Move error handling code into the cold path
See merge request simulant/GLdc!142
2025-02-01 11:10:52 +00:00
Luke Benstead
8a572f5a51
Merge branch 'builtin_math' into 'master'
...
Prefer relying on built in codegen rather than relying on sh4_math.h
See merge request simulant/GLdc!141
2025-02-01 11:09:59 +00:00
UnknownShadow200
e2c3ff0ed6
Fix not building for desktop
2025-02-01 20:12:23 +11:00
UnknownShadow200
e2fc2da055
Move error handling code into the cold path
2025-02-01 19:58:22 +11:00
UnknownShadow200
5318f11f11
Defer recomputing attributes state when possible
2025-02-01 18:17:28 +11:00
UnknownShadow200
3550c89501
Make non-textured non-fast drawing a little bit faster
2025-02-01 17:04:42 +11:00
UnknownShadow200
a35659ce3d
Fix enable/disable attribute calls not updating read functions
2025-02-01 16:05:07 +11:00
UnknownShadow200
bdecf90d64
Calculate read attribute functions when attribute states changes, instead of at every draw call
2025-02-01 15:38:59 +11:00
UnknownShadow200
3b4b1b6975
Fix compile error
2025-02-01 14:00:49 +11:00
UnknownShadow200
71d0094ac4
Prefer relying on built in codegen rather than relying on sh4_math.h
2025-02-01 13:06:37 +11:00
Luke Benstead
2a2849d5e9
Merge branch 'falco/m4_single_lto_abi_fixes' into 'master'
...
API FP ABI conformity fixes for -flto and -m4-single
See merge request simulant/GLdc!140
2025-01-27 17:54:00 +00:00
Falco Girgis
dc0c8148cb
API FP ABI conformity fixes.
2025-01-27 00:53:23 -06:00
Luke Benstead
36ba8099bb
Merge branch 'kos_string.h_rip' into 'master'
...
Deleting memcpy2/4() and memset2/4() routines
See merge request simulant/GLdc!139
2025-01-24 09:36:42 +00:00
Falco Girgis
9653bf8c12
Got rid of a memset4() call from KOS.
2025-01-23 21:27:34 -06:00
Falco Girgis
a13d8a180b
Removed kos/string.h dependency.
2025-01-23 21:24:06 -06:00
Luke Benstead
b4c2dd0a5e
Merge branch 'micro_opts' into 'master'
...
Few micro optimisations
See merge request simulant/GLdc!133
2024-12-22 22:31:47 +00:00
Luke Benstead
aa383913cd
Merge branch 'nonPOT2glTexSubImage2D' into 'master'
...
update for glTexSubImage2D, now checks the active texture size and not the...
See merge request simulant/GLdc!136
2024-12-07 23:27:52 +00:00
GPF
f7830df480
removed the commented out debug printing
2024-12-07 16:24:05 -07:00
Luke Benstead
55a912b621
Fix continuous free count
2024-12-07 19:54:16 +00:00
Luke Benstead
c4786a62e6
Fix bug in allocations (thanks @skmp)
2024-12-07 19:35:40 +00:00
Troy Davis
11651f331c
Merge branch GLdc:master into nonPOT2glTexSubImage2D
2024-10-15 19:12:59 +00:00
GPF
553f6016f3
Only initialize the texture buffer with zeros if it's a partial update
2024-10-15 12:11:17 -07:00
GPF
b44dddbaff
removed some unneeded code
2024-10-15 12:04:17 -07:00
GPF
4adf11543b
fixed the case where xoffset and yoffset !=0 in glTexSubImage2D
2024-10-15 11:25:56 -07:00
GPF
a11847e513
update for glTexSubImage2D, now checks the active texture size and not the subimage size to draw the glTexSubImage2D pixelas into drawing with the xoffset and yoffset into the existing POT2 texture, so subimage size doesn't need to be a POT2.
2024-10-14 13:26:17 -07:00
Luke Benstead
69660476cd
Merge branch 'glTexSubImage2D' into 'master'
...
quick implementation of glTexSubImage2D/_glTexSubImage2DValidate, update to...
See merge request simulant/GLdc!135
2024-10-13 20:44:00 +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
Luke Benstead
d1294690a1
Merge branch 'pvr.h_update_fixes' into 'master'
...
Removed opb_count hack for older KOS versions
See merge request simulant/GLdc!134
2024-10-10 05:58:53 +00:00
Falco Girgis
6407353121
Removed opb_count hack for older KOS versions
2024-10-09 22:20:32 -05:00
UnknownShadow200
490bf3de6d
Unify and slightly simplify specialised matrix multiply functions
2024-10-07 18:06:42 +11:00
UnknownShadow200
91b59ceca8
glXYZPointer methods now avoid recomputing state when only the data pointer changes
...
It is relatively common to call glXYZPointer multiple times with a different pointer but the same type/size
2024-10-07 18:06:03 +11:00
Luke Benstead
5a36e93993
Merge branch 'resize_coldpath' into 'master'
...
Move aligned_vector_reserve onto cold path since it should rarely be called
See merge request simulant/GLdc!132
2024-10-05 06:36:38 +00:00
UnknownShadow200
a1b104c918
Move aligned_vector_reserve onto cold path since it should rarely be called
...
E.g. with glVertex3f this means 3 less CPU registers are saved onto the stack
2024-10-05 11:34:14 +10:00
UnknownShadow200
82d64618f8
Primitive modes sample should let you press START to exit, like other samples
2024-10-05 06:49:04 +10:00
Luke Benstead
31676d9dc8
Merge branch 'sq_fix' into 'master'
...
Use direct render APIs instead of manually locking/unlocking store queues
See merge request simulant/GLdc!129
2024-10-04 14:29:12 +00:00
Luke Benstead
98577ebb31
Merge branch 'twid_speedup' into 'master'
...
Only check whether twiddle table needs updating once instead of every pixel
See merge request simulant/GLdc!130
2024-10-04 14:28:16 +00:00
UnknownShadow200
6f0acd5218
Only check whether twiddle table needs updating once instead of every pixel
...
Based on checking disassembly output in Release mode
2024-10-04 22:11:42 +10:00
UnknownShadow200
ea56577ca9
Use direct render APIs instead of manually locking/unlocking store queues
...
This ensures that GLdc works in both 2.1.0 and latest matter
2024-10-04 19:51:33 +10:00
Luke Benstead
aef36f3f11
Merge branch 'prim_mode_cullfix' into 'master'
...
Fix points/lines being improperly culled
See merge request simulant/GLdc!128
2024-10-03 05:55:30 +00:00
UnknownShadow200
c30b16b97b
Fix points/lines being improperly culled
2024-10-03 08:08:33 +10:00
Luke Benstead
57d5a59d65
Merge branch 'prim_modes' into 'master'
...
Add remainder of OpenGL primitive modes
See merge request simulant/GLdc!127
2024-10-02 12:51:47 +00:00
UnknownShadow200
2b06418fed
Fix not compiling on desktop due to relying on KOS specific frsqrt
2024-10-02 20:27:28 +10:00
UnknownShadow200
4513b040e2
Don't inline less optimal primitive modes
2024-10-02 20:07:36 +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
UnknownShadow200
19a76cbefd
Fix lines
2024-10-02 19:00:05 +10:00
UnknownShadow200
a47f331cee
Initial work on supporting missing primitive modes
2024-10-02 07:48:44 +10:00
Luke Benstead
354276033e
Merge branch 'render_fix' into 'master'
...
Fix array drawing mode not rendering properly in non-fast mode.
See merge request simulant/GLdc!126
2024-09-30 21:21:12 +00:00
UnknownShadow200
d978e3187c
Fix array drawing mode not rendering properly in non-fast mode.
...
Also move vertex transform to be done inline in non-fast path, instead of all entirely at the end
2024-10-01 07:13:02 +10:00
Luke Benstead
75b992f52e
Fix multiple bugs in the allocator
2024-09-14 07:51:13 +01:00
Luke Benstead
42786f775e
Fix a bug in the allocator#
2024-09-14 07:46:11 +01:00
Luke Benstead
dc07cbc4d2
Merge branch 'blend2' into 'master'
...
Try to fix not being able to use GL_SRC_COLOR and GL_ONE_MINUS_SRC_COLOR as destination blend factor
See merge request simulant/GLdc!125
2024-09-06 13:26:55 +00:00
UnknownShadow200
d570030070
Try to fix not being able to use GL_SRC_COLOR and GL_ONE_MINUS_SRC_COLOR as destination blend factor
2024-09-06 22:13:31 +10:00
Luke Benstead
c2ab45899a
Merge branch 'texture-tidyup' into 'master'
...
Tidy up textures table and add some missing formats
See merge request simulant/GLdc!124
2024-09-04 12:00:33 +00:00
UnknownShadow200
5f28cae804
Tidy up textures table and add some missing formats
2024-09-04 21:26:46 +10:00
Luke Benstead
ab24e2db35
Make GL_MULTISAMPLE not throw an error
2024-08-28 22:39:05 +01:00
Luke Benstead
8594684f93
Make ARB_multisample core
...
It was made core in 1.3, there's no reason for us to ARB suffix it
(we can't support it but at least let's use the core defines)
2024-08-28 22:37:01 +01:00
Luke Benstead
72e8b74821
Merge branch 'constants-consistency' into 'master'
...
Change some constant values to match standard OpenGL values
See merge request simulant/GLdc!123
2024-08-26 21:35:43 +00:00
UnknownShadow200
82bfe8d935
Change some constant values to match standard OpenGL values
2024-08-27 07:23:19 +10:00
Luke Benstead
bcb36a07c3
Merge branch 'master' into 'master'
...
Fix perspective division.
See merge request simulant/GLdc!122
2024-08-11 14:29:36 +00:00
Falco Girgis
b6995edc66
Merge branch 'master' of https://gitlab.com/simulant/GLdc
2024-08-11 09:19:59 -05:00
Luke Benstead
e6ecfe64ba
Merge branch 'FasterImmediate' into 'master'
...
Immediate mode: Only update attribute pointers at end instead of per vertex
See merge request simulant/GLdc!121
2024-08-11 11:14:54 +00:00
Unknown Shadow
d737961e88
Merge branch 'master' into 'FasterImmediate'
...
# Conflicts:
# GL/immediate.c
2024-08-11 11:11:25 +00:00
Luke Benstead
9711cee788
Merge branch 'pvr_direct' into 'master'
...
Optimization, -O2 Clipping Fix, Nehe20 Build Fix, Warnings Cleanup
See merge request simulant/GLdc!119
2024-08-11 10:53:29 +00:00
UnknownShadow200
92ec1db643
Only update attribute pointers at end instead of per vertex
2024-08-11 19:39:27 +10:00
Falco Girgis
0f3be24cec
Merge branch 'master' of https://gitlab.com/simulant/GLdc into pvr_direct
2024-08-11 01:21:06 -05:00
Luke Benstead
ba76d67154
Merge branch 'ViewportTransform' into 'master'
...
Refactor viewport transform
See merge request simulant/GLdc!120
2024-08-04 20:18:41 +00:00
UnknownShadow200
d4fc57cab2
Fix not working properly, defer matrix calculation until needed
2024-08-03 16:40:23 +10:00
UnknownShadow200
2f26574a44
Combine projection transform and viewport transform together
2024-08-03 15:52:56 +10:00
Falco Girgis
812ed4a1ee
Fixing PC build.
2024-07-31 23:29:09 -05:00
Falco Girgis
b920855b57
Micro optimizations and clean-up.
2024-07-31 23:08:37 -05:00
Falco Girgis
873372995a
More cleanup.
2024-07-31 22:59:43 -05: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
Falco Girgis
a68c4bf6ac
Merge branch GLdc:master into master
2024-07-31 19:10:27 +00:00
Luke Benstead
60773e9db8
Fix alpha values
2024-07-21 10:28:13 +00:00
Dave
fc7f310b4b
Merge remote-tracking branch 'upstream/master'
2024-06-09 14:48:55 +02:00
Luke Benstead
0a9be0b42a
Merge branch 'FasterRGBAInterpolation' into 'master'
...
Simplify RGBA interpolation by avoiding a multiply and division by 255
See merge request simulant/GLdc!118
2024-06-07 11:59:35 +00:00
UnknownShadow200
6722e14b93
Simplify RGBA interpolation by avoiding a multiply and division by 255
2024-06-07 21:36:59 +10:00
Dave
7a61a6a568
Merge remote-tracking branch 'upstream/master'
2024-04-28 14:40:38 +02:00
Luke Benstead
ab0ea41876
Merge branch 'master' into 'master'
...
Add conversion from argb1555 to argb4444
Closes #80
See merge request simulant/GLdc!117
2024-04-28 11:23:18 +00:00
Bkacjios
f06c72ff14
Should be GL_BGRA
2024-04-27 11:05:40 -04:00
Bkacjios
0facbd16b2
Add conversion from argb1555 to argb4444
2024-04-27 09:53:03 -04:00
Dave
5fa51297b2
Merge branch 'master' of https://gitlab.com/freakdave/GLdc
2024-04-24 21:47:32 +02:00
Luke Benstead
c4e219199a
Merge branch 'fix-up-cubes-sample' into 'master'
...
Iterate over cubes sample
See merge request simulant/GLdc!116
2024-04-24 19:39:19 +00:00
Dave
4aa7459193
Iterate over cubes sample
2024-04-24 21:18:18 +02:00
Dave
dbafe1c3ab
Merge remote-tracking branch 'origin/master'
2024-04-24 20:21:31 +02:00
David Reichelt
455e1652bc
Merge branch GLdc:master into master
2024-04-24 18:19:29 +00:00
Falco Girgis
5fd6e51028
Readded prefetching.
2024-04-10 01:09:29 -05:00
Falco Girgis
54e46822bd
Merge remote-tracking branch 'origin/master' into HEAD
2024-04-10 00:40:37 -05:00
Luke Benstead
572fa01b03
Fix edge case
2024-04-06 21:13:17 +01:00
Luke Benstead
08ba3671ec
Merge branch 'zclip-simplify' into 'master'
...
Zclip simplify
See merge request simulant/GLdc!115
2024-04-04 05:35:52 +00:00
Luke Benstead
6a6d229e4c
Fix bug with multiple strips
2024-04-04 06:30:37 +01:00
Luke Benstead
77f4b59aea
Fix off-by-one
2024-04-03 22:30:41 +01: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
Luke Benstead
a8f3d86705
Start cleaning up the zclip code
2024-04-02 22:28:36 +01:00
Luke Benstead
d4f6a9636b
Fix more freezes and clipping issues
2024-03-19 20:14:01 +00:00
Luke Benstead
d6ac295d18
Fix more potential freezes
2024-03-19 08:14:38 +00:00
Luke Benstead
b353151dca
Fix freeze due to bad clipping
2024-03-18 20:56:15 +00:00
Luke Benstead
cf4a557489
Fix CLIP_DEBUG
2024-03-18 20:18:58 +00:00
Luke Benstead
c85aed2d28
Set the opb counter
2024-03-11 19:11:35 +00:00
Luke Benstead
1b2ab9fe4e
Merge branch 'master' into 'master'
...
Fix GL/matrix.c to work properly on -m4-single
See merge request simulant/GLdc!114
2024-02-19 07:12:29 +00:00
darcagn
eef1548914
Update matrix.c
2024-02-18 23:34:59 +00:00
darc
d92a5b1b07
Fix GL/matrix.c to work properly on -m4-single
2024-02-17 02:45:37 -06:00
Luke Benstead
b1223cfd1c
Merge branch 'No_Flashrom_Read_if_Naomi' into 'master'
...
Naomi: don't call flashrom_get_region, as KOS Naomi does not include flashrom functions
See merge request simulant/GLdc!113
2024-02-03 11:47:51 +00:00
T_chan
bd17c995ea
Naomi: don't call flashrom_get_region, as KOS Naomi does not include flashrom functions
2024-02-03 11:42:39 +00:00
Luke Benstead
33ddcb1330
Merge branch 'No_Flashrom_Read_if_VGA' into 'master'
...
avoid reading the flashrom if we know we are in VGA mode
See merge request simulant/GLdc!112
2024-02-02 21:31:21 +00:00
T_chan
58f5f52eac
avoid reading the flashrom if we know we are in VGA mode
2024-02-02 20:08:04 +00:00
Falco Girgis
04c2fcceae
Getting rid of prefetching.
2024-01-31 14:59:58 -06:00
Falco Girgis
d4a83ff235
Fixed a double promotion, put back prefetching.
2024-01-31 14:46:49 -06:00
Falco Girgis
8d1ce547f5
Screwed up prefetch macro.
2024-01-31 02:51:51 -06:00
Falco Girgis
313341f93d
Trying without prefetching.
2024-01-31 02:50:01 -06:00
Falco Girgis
4033e9c23a
Submitted wrong size to sq_fast_cpy()
2024-01-31 01:59:46 -06:00
Falco Girgis
3420f0d0c6
Adjusting vertex buffers.
2024-01-31 01:56:01 -06:00
Falco Girgis
e8a60bc94a
Fixing build issues
2024-01-30 20:43:30 -06:00
Falco Girgis
0be2911e0b
Trying to batch shit better.
2024-01-30 20:41:34 -06:00
Falco Girgis
9586eefee9
Next attempt.
2024-01-30 19:55:05 -06:00
Falco Girgis
c25a5cddcb
Next attempt.
2024-01-30 19:52:56 -06:00
Falco Girgis
b9cdfb2e35
next try
2024-01-30 19:45:17 -06:00
Falco Girgis
32ecb843a2
next try.
2024-01-30 19:44:40 -06:00
Falco Girgis
709942e69d
test.
2024-01-30 19:40:40 -06:00
Luke Benstead
9f3f638a46
Add missing conversion, fixes #77
2024-01-16 22:05:43 +00:00
Luke Benstead
0ad329e48b
Merge branch 'master' into 'master'
...
Fix GLdc failing to build on GCC 9.x
Closes #74
See merge request simulant/GLdc!110
2023-12-19 06:54:58 +00:00
darc
c314a0ec3a
Fix GLdc failing to build on GCC 9.x
2023-12-18 18:53:37 -06:00
Dave
b545a9fb26
Merge remote-tracking branch 'upstream/master'
2023-12-01 20:20:21 +01:00
Luke Benstead
5c762b969e
Build out to libGL.a instead of libGLdc.a
2023-11-29 11:25:52 +00:00
Luke Benstead
2b3c083de3
Fix issue with texture twiddling and RGB565 untwiddled textures
2023-11-29 11:25:32 +00:00
Dave
cd1e4d8a9e
Merge remote-tracking branch 'upstream/master'
2023-10-22 16:55:46 +02:00
Luke Benstead
0efe4c6cef
Add missing defines
2023-10-19 22:26:13 +01:00
Luke Benstead
744dfb32f7
Merge branch 'fix-glshort-uv-read' into 'master'
...
Convert GL_SHORT to proper float on conversion
See merge request simulant/GLdc!109
2023-09-26 18:51:30 +00:00
Spencer Elliott
79172452f2
Convert GL_SHORT to proper float on conversion
2023-09-26 18:51:29 +00:00
Luke Benstead
420e2d75f2
Merge branch 'fix-glulookat-alignment' into 'master'
...
Fixed alignment for matrix passed into UploadMatrix4x4 in gluLookAt
See merge request simulant/GLdc!108
2023-09-20 15:47:38 +00:00
Spencer Elliott
202f546848
Fixed alignment for matrix passed into UploadMatrix4x4 in gluLookAt
2023-09-20 10:18:55 -05:00
Luke Benstead
d054dde785
Fix paletted texture glitch
2023-09-12 21:11:05 +01:00
Luke Benstead
00b4468928
Remove unused function
2023-09-11 20:42:09 +01:00
Luke Benstead
f0d799d14f
Merge branch 'texture-refactor' into 'master'
...
Drastically refactor glTexImage2D
See merge request simulant/GLdc!107
2023-09-11 19:39:03 +00:00
Luke Benstead
1bf8554926
More erquirements
2023-09-11 20:34:18 +01:00
Luke Benstead
9bc6da9fba
Add some requirements
2023-09-11 19:55:26 +01:00
Luke Benstead
a1536cba44
Add dependency
2023-09-11 17:31:08 +01:00
Luke Benstead
3eee140add
Fix stage
2023-09-11 17:29:59 +01: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
3308a57e59
Implement defragmenting the memory
2023-09-08 17:49:46 +01:00
Luke Benstead
db9e1cd424
Fall back to unaligned if there's no more aligned spaced
2023-09-08 09:13:33 +01:00
Luke Benstead
6eb079228e
Fix infinite loop
2023-09-06 21:01:37 +01:00
Luke Benstead
7ce01ad93f
Fix up paletted textures
2023-09-06 08:01:01 +01:00
Luke Benstead
12bd6f474f
Fix issues with the allocator
2023-09-06 07:59:40 +01:00
Luke Benstead
e5a4f4f716
Continue fixing up paletted texture issues
2023-09-03 21:12:11 +01:00
Luke Benstead
4d39e19ed5
Start repairing paletted textures
2023-09-02 21:10:42 +01:00
Luke Benstead
49a0e103cb
Fix up CI
2023-09-01 20:34:29 +01:00
Luke Benstead
9cedc81850
Fix broken merge
2023-09-01 20:29:24 +01:00
Luke Benstead
0e31aa3d27
Tweak
2023-09-01 20:25:27 +01:00
Luke Benstead
5e7b33797d
Perf improvements and fixes
2023-09-01 20:25:27 +01:00
Luke Benstead
b19b9d498a
Clean up the allocator code
2023-09-01 20:25:21 +01:00
Luke Benstead
36de063756
Allow configuring automatic texture twiddling in glKosInitEx
...
Defaults to enabled.
2023-09-01 20:23:55 +01:00
Luke Benstead
246cb997da
Add optional dcprof to prof_texture_upload
2023-09-01 20:23:55 +01:00
Luke Benstead
cfbaea4a46
Don't calculate things twice
2023-09-01 08:52:01 +01:00
Luke Benstead
4b47f6878f
Remove yalloc
2023-09-01 08:34:48 +01:00
Luke Benstead
3248499d5a
Switch to the new allocator
2023-08-31 21:21:14 +01:00
Luke Benstead
fd9a9d1c25
Merge commit 'f49a98ab543b1be0049e07456fb23022435ba450' into texture-refactor
2023-08-31 20:49:42 +01:00
Luke Benstead
f49a98ab54
Fix allocate and free
2023-08-31 20:49:34 +01:00
Luke Benstead
f278777c0e
WIP: Start implementing new allocator
2023-08-31 08:47:00 +01:00
Luke Benstead
34173d926c
Drastically refactor glTexImage2D
2023-08-31 08:47:00 +01:00
Luke Benstead
77531ca347
Drastically refactor glTexImage2D
2023-08-26 20:34:11 +01:00
Dave
1c22d1cbe6
Merge remote-tracking branch 'upstream/master'
2023-07-29 14:50:36 +02:00
Luke Benstead
a05e1b01fa
Make glGenerateMipmap the function, and EXT the alias
2023-07-26 20:33:12 +01:00
Dave
5c59fe5e3a
Merge remote-tracking branch 'upstream/master'
2023-06-22 18:10:41 +02:00
Luke Benstead
3dcbbdbde6
Add logging
2023-06-09 20:35:00 +01:00
Luke Benstead
92ee4f616d
Set mode to PAL@50 if it's a European console without VGA
2023-06-06 21:05:52 +01:00
Luke Benstead
e7574bca1d
Fix issues with GL_QUADS
2023-05-31 18:27:17 +01:00
Dave
e4a50740d6
Merge remote-tracking branch 'upstream/master'
2023-05-20 19:02:15 +02:00
Luke Benstead
026bdeff09
Fix infuriating memory corruption bug
2023-05-20 07:47:39 +01:00
Luke Benstead
f6713bc778
Speed up the software renderer
2023-05-20 07:45:45 +01:00
Luke Benstead
5865d57384
Wait for the store queues to finish when we've uploaded everything
2023-05-20 07:45:16 +01:00
Luke Benstead
1e3896e699
Clean up
2023-05-20 07:44:55 +01:00
Luke Benstead
bd47f333d6
Add more assertions
2023-05-20 07:43:57 +01:00
Luke Benstead
e57b503355
Fix memory errors
2023-05-18 16:44:11 +01:00
Luke Benstead
d81472ef57
Liberally assert stuff
2023-05-17 20:39:58 +01:00
Luke Benstead
462eb40d7a
Fix bugs in texture deletion
2023-05-17 20:39:49 +01:00
Luke Benstead
c4c0bf4239
Fix an off-by-one error
2023-05-17 20:39:27 +01:00
Luke Benstead
9037d157d5
Clean up
2023-05-17 20:38:21 +01:00
Luke Benstead
52a0215ed8
Make sure we initialize texture 0. We don't actually use it yet
...
(binding zero disables texturing) but I believe the spec says that
texture 0 is the "default texture" and is an actual texture object.
2023-05-17 20:36:59 +01:00
Luke Benstead
a5891056db
Many bug fixes and optimisations
2023-05-16 13:31:44 +01:00
Dave
a544221f98
Merge remote-tracking branch 'upstream/master'
2023-05-13 11:00:52 +02:00
Luke Benstead
9cffe14ad6
Clean up aligned vector
2023-05-12 20:51:36 +01:00
Luke Benstead
e683b8becb
Optimisations
2023-05-11 20:00:13 +01:00
Luke Benstead
cba2fb7ceb
Fix a memory corruption issue
2023-05-11 15:22:46 +01:00
Luke Benstead
c754c5c338
Ensure RelWithDebInfo builds use release flags + debugging
2023-05-11 15:22:27 +01:00
Luke Benstead
452cda5a3b
Fix backface culling
2023-04-28 19:49:01 +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
Dave
49c712a08b
Merge remote-tracking branch 'upstream/master'
2023-04-26 00:09:21 +02:00
Luke Benstead
1a678d2c8d
Undo some bad changes
2023-04-23 21:00:01 +01:00
Luke Benstead
0923b5c601
Further optimisations
2023-04-23 20:16:15 +01:00
Luke Benstead
2ec7055547
Optimisations
2023-04-23 07:44:09 +01:00
Luke Benstead
9cc52a01fe
Better clipping
2023-04-22 20:47:45 +01:00
Luke Benstead
095ebf2790
Fix final bug
2023-04-22 11:37:42 +01:00
Luke Benstead
baa275b41b
Fix a bunch of issues with clipping (almost working)
2023-04-21 20:38:21 +01:00
Luke Benstead
72c375f87c
Fix some things
2023-04-21 11:39:37 +01:00
Luke Benstead
e54494e995
More clipping work
2023-04-20 20:45:59 +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
Luke Benstead
34448939a4
Merge branch 'update-cubes-cmakelists' into 'master'
...
Update cubes sample + cmakelists
See merge request simulant/GLdc!104
2023-04-17 18:24:56 +00:00
Dave
b6249e9ca4
Update README
2023-04-17 19:35:06 +02:00
Dave
1a181f702c
Update CMakeLists with CXX flags (Debug and Release)
2023-04-17 19:34:56 +02:00
Dave
3b53691e4b
Change float colors to GLubyte in cubes sample
2023-04-17 19:33:59 +02:00
Dave
75937e8257
Merge remote-tracking branch 'upstream/master'
2023-04-15 19:54:17 +02:00
Luke Benstead
25d215dad3
Add some compiler flags for lolz
2023-04-11 20:46:44 +01:00
Luke Benstead
307d371c55
Various store queue shinanigans
2023-04-11 20:46:31 +01:00
Luke Benstead
4ad58bea89
Optimise glLoadMatrixf
2023-04-11 20:46:12 +01:00
Dave
902e473879
Merge branch 'master' of https://gitlab.com/freakdave/GLdc
...
# Conflicts:
# samples/cubes/main.cpp
2023-04-08 23:31:48 +02:00
Luke Benstead
8e60b18f29
Merge branch 'add-new-cubes-sample' into 'master'
...
Add new cubes sample
See merge request simulant/GLdc!103
2023-04-08 20:32:18 +00:00
David Reichelt
190b4ecfb7
Add include for printf
2023-04-08 20:07:21 +00:00
David Reichelt
a4b778063a
Make sure ZNEAR_CLIPPING_ENABLED is defined in software renderer
2023-04-08 20:00:33 +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
David Reichelt
9ffdfb75ba
Merge branch 'add-cubes-sample' into 'master'
...
Added new cubes sample
See merge request freakdave/GLdc!2
2023-04-08 19:31:11 +00:00
Dave Reichelt
4b3cef4fc0
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:24:52 +02:00
Dave
aa968d0487
Merge remote-tracking branch 'upstream/master'
2023-04-08 19:20:24 +02:00
Luke Benstead
6ee9a823c1
Don't update lights unnecessarily
2023-03-23 20:01:41 +00:00
Luke Benstead
0c5f941098
Optimise nearz clipping
2023-03-17 20:40:55 +00:00
Luke Benstead
300f2a611e
Optimise state management
2023-03-17 20:40:45 +00:00
Luke Benstead
e810d2567d
Merge commit 'e5c6fefcd92cb6e877e8501c4b43cbf75460409d'
2023-03-16 21:24:22 +00:00
Luke Benstead
e5c6fefcd9
Optimisations
2023-03-16 21:24:12 +00:00
Luke Benstead
0cf006ebce
Merge branch 'bug-fixes' into 'master'
...
Fix elf extension and compilation with GCC4.7
See merge request simulant/GLdc!100
2023-03-07 21:40:54 +00:00
Luke Benstead
8789d6557e
Huge refactor of internal state
2023-03-07 21:27:48 +00:00
Luke Benstead
8beb295c6b
Refactor state management
2023-03-07 10:19:09 +00:00
Luke Benstead
c195d471e1
Faster memcpy
2023-03-06 14:05:14 +00:00
Luke Benstead
be4c1bc14c
Add missing header
2023-03-06 13:54:31 +00:00
Luke Benstead
a9f3e3a744
Fix alignments
2023-03-06 13:44:17 +00:00
Luke Benstead
f0a3465486
Use Moops memcpy
2023-03-05 21:16:12 +00:00
Luke Benstead
b08bbebf12
Mipmap fix
2023-03-05 20:26:15 +00: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
Colton Pawielski
5bb2691b91
Change CMakeLists.txt to add -mfsrra and -mfsca only if supported by compiler
...
GCC4.7 does not support these flags and cause a failure to build
2023-03-04 16:13:44 -06:00
Colton Pawielski
ac6914398c
Fix .elf extension on C example executables
2023-03-04 16:11:11 -06:00
Colton Pawielski
8481fd05cc
Add dcbuild & pcbuild folders to .gitignore
2023-03-04 16:10:34 -06:00
Luke Benstead
19288918f0
Merge branch 'Declare_glFogiv' into 'master'
...
declare glFogiv()
See merge request simulant/GLdc!95
2023-02-02 11:58:35 +00:00
Luke Benstead
8fff6ee1aa
Treat GL_CLAMP_TO_EDGE the same as GL_CLAMP
2022-12-09 20:17:46 +00:00
Luke Benstead
ac86504549
Clean up
2022-12-03 20:01:43 +00:00
Luke Benstead
d78c6275bb
Increase tri-strip length
2022-12-03 14:00:24 +00:00
Luke Benstead
69a2310a3c
Default to small culling to avoid artifacts
2022-12-03 13:46:08 +00:00
David Reichelt
df10502b05
Merge branch 'upstream-master' into 'master'
...
Merge upstream
See merge request freakdave/GLdc!1
2022-11-13 18:58:57 +00:00
Luke Benstead
5296f5c79c
Optimise perspective divide assuming W is always positive
2022-11-05 20:28:24 +00:00
Luke Benstead
aa875ae4d1
Fix compiler flags
2022-11-04 19:34:42 +00:00
Luke Benstead
7db15a0e03
Fix PC build
2022-11-04 19:25:50 +00:00
Luke Benstead
b6593acc83
Switches instead of if ladders
2022-11-04 19:24:12 +00:00
Luke Benstead
8ca70a2920
Initialize submission target on boot to save runtime cost
2022-11-04 19:23:50 +00:00
Luke Benstead
4d8c507706
Fix a bug where glXPointer functions would do unnecessary work
2022-11-04 19:23:06 +00:00
Luke Benstead
a248f3a50c
Faster inversion
2022-11-03 20:24:38 +00:00
Luke Benstead
6be3e6185d
Faster inversion
2022-09-14 19:20:24 +01:00
Luke Benstead
3caaf798e7
Undo double transform
2022-08-25 21:25:52 +01:00
Luke Benstead
0b62ac8673
Clean ups and optimisations
2022-08-25 21:24:08 +01:00
Luke Benstead
4edf8ce04d
Use the direct texture path for vbuffer uploads
2022-08-25 20:01:54 +01:00
Luke Benstead
c793e1f35d
Don't submit empty lists
2022-08-24 20:31:55 +01:00
Luke Benstead
9b9db31f30
Merge branch 'super-clip' into 'master'
...
Super clip
See merge request simulant/GLdc!99
2022-06-13 19:26:55 +00:00
Luke Benstead
9d9a502e96
Remove old clipping
2022-06-13 20:16:46 +01:00
Luke Benstead
3d69003c5f
Allow disabling near-z
2022-06-13 20:16:37 +01:00
Luke Benstead
99ae70a72b
Make the software implementation use the same clipping code
2022-06-13 20:06:04 +01:00
Luke Benstead
6fb15ee4c7
Fix some winding issues
2022-06-13 20:05:54 +01:00
Luke Benstead
b17104afea
Add a missing header
2022-06-13 20:05:39 +01:00
Luke Benstead
16f6100afa
Fix issues and optimise
2022-06-12 19:53:26 +01:00
Luke Benstead
4827fd4c5b
Fix various clipping glitches
2022-06-11 21:27:09 +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
dbb94d0cb9
Move clipping into list submission
2022-06-09 13:07:51 +01:00
Luke Benstead
193f0bdc49
Cleanup
2022-05-21 20:16:50 +01:00
Luke Benstead
9a50917062
Fix rgba vs argb inversion
2022-05-21 20:16:34 +01:00
Luke Benstead
83e325ab3c
Fix CMake 32bit issues
2022-05-21 20:16:26 +01:00
Luke Benstead
0060f48202
Fix compilation issues on PC vs DC
2022-05-21 20:16:12 +01:00
Luke Benstead
fe7f9cbed0
Fix crash when generating mipmaps on 4bpp textures
2022-05-07 12:57:45 +01:00
Luke Benstead
3d1f447af9
Merge branch 'paletted-textures' into 'master'
...
4BPP paletted textures and OES_compressed_paletted_texture support
See merge request simulant/GLdc!98
2022-05-04 20:05:24 +00:00
Luke Benstead
d0e6b56414
Restore validation of the internalFormat (even though it's unused)
2022-05-04 21:00:15 +01:00
Luke Benstead
dc69a81da1
Remove unused code. Various clean ups
2022-05-04 20:53:18 +01:00
Luke Benstead
411d4f0e4f
Add a missing space
2022-05-04 20:45:21 +01:00
Luke Benstead
dd7bb47ffb
Merge remote-tracking branch 'ozzyouzo/master' into paletted-textures
2022-05-04 20:39:39 +01:00
Luke Benstead
46605c6b1a
Merge branch 'Avoid_gl_h_Function_is_not_a_prototype_warning' into 'master'
...
gl.h: avoid gcc warning "function declaration isn’t a prototype"
See merge request simulant/GLdc!97
2022-05-04 19:20:13 +00:00
OzzyOuzo
c48bbfe07c
Fixed glMultMatrixf(...)
...
Added _glResetSharedPalettes
2022-05-03 16:12:27 +03:00
Luke Benstead
4e8ff2f8e4
Fix texture issues
2022-04-26 20:34:14 +01:00
T_chan
cd14a5ed11
gl.h: avoid gcc warning "function declaration isn’t a prototype"
2022-02-07 16:09:00 +00:00
Luke Benstead
6f2b4d8f9f
Merge branch 'Add_missing_gl_h_defines' into 'master'
...
Add some missing gl.h defines for portability
See merge request simulant/GLdc!96
2022-02-07 15:48:26 +00:00
T_chan
2d63fdf30f
Add some missing gl.h defines for portability
2022-02-07 15:36:16 +00:00
T_chan
3160fc517d
declare glFogiv()
2022-02-02 09:22:23 +00: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
Luke Benstead
4ad5f00538
Merge branch 'Add_gluBuild2DMipmaps' into 'master'
...
Add gluBuild2DMipmaps()
See merge request simulant/GLdc!93
2022-02-01 08:28:40 +00:00
T_chan
53eb2e2a51
Add gluBuild2DMipmaps()
2022-02-01 07:25:54 +00:00
Luke Benstead
5be561ce4f
Merge branch 'Correct_Sample_Files_Paths' into 'master'
...
samples: correct image paths & include <math.h>
See merge request simulant/GLdc!92
2022-01-31 20:47:56 +00:00
T_chan
fdac490e34
samples: correct image paths & include <math.h>
2022-01-31 16:59:05 +00:00
Luke Benstead
f5436fd31b
Merge branch 'Regroup_BMP_Loading' into 'master'
...
regroup the BMP file loading into 1 file, and correct some types that give...
See merge request simulant/GLdc!87
2022-01-31 10:30:26 +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
Luke Benstead
d7d8f4c4f1
Merge branch 'Samples_Make_Romdisk_Conditional' into 'master'
...
Include romdisk only if target is dreamcast
See merge request simulant/GLdc!86
2022-01-31 10:06:02 +00:00
Luke Benstead
12080967c2
Merge branch 'Fix_depth_funcs_ortho' into 'master'
...
fix depth_funcs_ortho - show blue and green quads
See merge request simulant/GLdc!88
2022-01-31 10:05:03 +00:00
Luke Benstead
80ca380a22
Merge branch 'Correct_Blend_Test' into 'master'
...
merge of blend_test and lerabot_blend_test, addition of 1 case, and...
See merge request simulant/GLdc!89
2022-01-31 10:04:50 +00:00
T_chan
ab627b5ef5
merge of blend_test and lerabot_blend_test, addition of 1 case, and...
2022-01-31 10:04:50 +00:00
Luke Benstead
bc422f1f47
Merge branch 'Correct_lerabot01' into 'master'
...
dont put objects on the far plane
See merge request simulant/GLdc!90
2022-01-31 10:04:24 +00:00
Luke Benstead
b3066f991c
Merge branch 'Add_glGetTexImage_stub' into 'master'
...
Add glGetTexImage stub for portability
See merge request simulant/GLdc!91
2022-01-31 10:03:56 +00:00
T_chan
621982d14e
Add glGetTexImage stub for portability
2022-01-31 08:29:00 +00:00
T_chan
23419bf57c
dont put objects on the far plane
2022-01-26 19:46:31 +00:00
T_chan
7abd878e93
AS-IS, depth_funcs_ortho only displays 1 red quad. With the fix, the 2 other quads (blue, green) become visible again
2022-01-25 20:47:40 +00:00
T_chan
0c8e11c02a
Include romdisk only if target is dreamcast
2022-01-25 14:41:55 +00:00
Luke Benstead
9506237c47
Merge branch 'Solve_Warnings' into 'master'
...
Solve some warnings from the compilation
See merge request simulant/GLdc!83
2022-01-25 13:44:09 +00:00
Luke Benstead
e2da03ac74
Merge branch 'Remove_mipmapping_from_Nehe06' into 'master'
...
Remove mipmapping from Nehe06
See merge request simulant/GLdc!84
2022-01-25 13:43:49 +00:00
Luke Benstead
705cb30be8
Merge branch 'Solve_Sample_Warnings' into 'master'
...
solve 4 warnings about printf & long unsigned values vs %d
See merge request simulant/GLdc!85
2022-01-25 13:43:30 +00:00
T_chan
37e407d032
solve 4 warnings about printf & long unsigned values vs %d
2022-01-25 13:35:24 +00:00
T_chan
f5b63bfc97
Remove mipmapping from Nehe06
2022-01-23 13:07:58 +00:00
T_chan
b1508be822
Solve some warnings from the compilation
2022-01-20 22:42:08 +00:00
Luke Benstead
4ad2841809
Merge branch 'Add_glTexCoord1f_functions' into 'master'
...
Add glTexCoord1f() and glTexCoord1fv()
See merge request simulant/GLdc!80
2022-01-19 08:05:59 +00:00
Luke Benstead
cfbd126f58
Merge branch 'Add_GL_LINE_SMOOTH' into 'master'
...
Add GL_LINE_SMOOTH to increase portability
See merge request simulant/GLdc!82
2022-01-19 08:05:31 +00:00
Luke Benstead
ea44f21c04
Merge branch 'T_chan-master-patch-83707' into 'master'
...
remove duplicate defines from gl.h
See merge request simulant/GLdc!81
2022-01-19 08:05:18 +00:00
T_chan
fb2e8d7d7e
Update include/GL/gl.h
2022-01-19 06:55:33 +00:00
T_chan
72b115659a
remove duplicate defines from gl.h
2022-01-19 06:50:11 +00:00
T_chan
9b6c2bbb21
Add glTexCoord1f() and glTexCoord1fv()
2022-01-18 21:40:31 +00:00
Luke Benstead
f9af9af567
Merge branch 'Add_glPolygonMode_Stub' into 'master'
...
add glPolygonMode() stub
See merge request simulant/GLdc!79
2022-01-18 21:38:31 +00:00
Luke Benstead
8d51579870
Merge branch 'Add_Stencil_Functions_Stubs' into 'master'
...
Add stubs for Stencil functions glStencilFunc() and glStencilOp()
See merge request simulant/GLdc!78
2022-01-18 21:37:56 +00:00
T_chan
50aee8a92c
add glPolygonMode() stub
2022-01-18 21:28:07 +00:00
T_chan
66d87fb845
Add stubs for Stencil functions glStencilFunc() and glStencilOp()
2022-01-18 20:29:27 +00:00
Luke Benstead
6802f64725
Merge branch 'Add_PixelStore_parameters' into 'master'
...
Add PixelStore parameters for Read/DrawPixels to increase compatibility
See merge request simulant/GLdc!77
2022-01-18 19:25:56 +00:00
Luke Benstead
11860ba6e1
Merge branch 'add_glGetTexParameterfv_stub' into 'master'
...
Add glGetTexParameterfv() stub to increase compatibility
See merge request simulant/GLdc!76
2022-01-18 19:25:39 +00:00
Luke Benstead
3b320bf874
Merge branch 'add_glTexParameterf' into 'master'
...
expose and correct glTexParameterf()
See merge request simulant/GLdc!75
2022-01-18 19:25:20 +00:00
Luke Benstead
fbf322f470
Merge branch 'add_glColor4ubv' into 'master'
...
Add glColor4ubv() to increase compatibility of GLdc
See merge request simulant/GLdc!74
2022-01-18 19:25:02 +00:00
Luke Benstead
482ec8b270
Merge branch 'add_GLclampd' into 'master'
...
add GLclampd to increase compatibility of GLdc
See merge request simulant/GLdc!73
2022-01-18 19:24:11 +00:00
T_chan
fbe310f8d5
Add PixelStore parameters for Read/DrawPixels to increase compatibility
2022-01-18 18:09:44 +00:00
T_chan
d594eff3a6
Add glGetTexParameterfv() stub to increase compatibility
2022-01-18 17:38:14 +00:00
T_chan
0d60b318da
expose and correct glTexParameterf()
2022-01-18 17:23:30 +00:00
T_chan
d9a2ed7892
Add glColor4ubv() to increase compatibility of GLdc
2022-01-18 17:06:26 +00:00
T_chan
a7762aa965
add GLclampd to increase compatibility of GLdc
2022-01-18 16:51:31 +00:00
OzzyOuzo
1a456cb1a7
16bit palette color format support, extended 64 shared palette slots (4bpp), GL_OES_compressed_paletted_texture support
...
GL_ERROR generated when texture size > 1024
2021-12-03 09:32:53 +02:00
OzzyOuzo
8caee68df5
added _glFreePaletteSlots(..)
2021-11-30 19:23:49 +02:00
OzzyOuzo
148962254a
4bpp texture palette support, modified paletted_pcx sampled (USE_16C_PALETTE)
2021-11-18 12:04:46 +02:00
OzzyOuzo
37110ba47f
4bpp texture palette support (GL_RGBA8 pal components), modified paletted_pcx sample (USE_16C_PALETTE)
2021-11-18 11:59:37 +02:00
Luke Benstead
b710a619d5
Fix issues with bilinear mipmapping
2021-10-25 19:04:58 +01:00
Luke Benstead
e225f54386
Fix bug when glVertexPointer etc. is called without client state enabled
2021-10-02 20:01:44 +01:00
Luke Benstead
5df2190536
Fix various bugs with non-fastpath rendering
2021-10-02 14:43:23 +01:00
Luke Benstead
458fb52efb
Merge branch 'fix-ci' into 'master'
...
Fix ci
See merge request simulant/GLdc!72
2021-10-01 20:20:29 +00:00
Luke Benstead
cef1e852f4
Fix ci
2021-10-01 20:20:29 +00:00
Luke Benstead
7d82649a62
Be sure to restore the fast path flag in glEnd
2021-10-01 21:02:13 +01:00
Luke Benstead
ecc957bcbd
Merge branch 'master' into 'master'
...
Avoid the need to hard-reset the Dreamcast to exit the samples - use the start button in all samples
See merge request simulant/GLdc!71
2021-10-01 19:57:33 +00:00
T_chan
830a985606
Avoid the need to hard-reset the Dreamcast to exit the samples - use the start button in all samples
2021-10-01 19:57:32 +00:00
Luke Benstead
6184208598
Don't include platform.h from aligned_vector.h
2021-09-18 17:40:10 +01:00
Luke Benstead
e26fae6d2e
Remove debug logging
2021-09-18 14:37:28 +01:00
Luke Benstead
dd16530a1f
Fix an assertion in debug, and building on PC
2021-09-18 14:36:47 +01:00
Luke Benstead
cf996b9e80
Add tri and quad fast paths
2021-09-14 19:36:42 +01:00
Luke Benstead
7992c89758
Fix perf hit
2021-09-14 09:20:00 +01:00
Luke Benstead
9c2907e41d
Small optimisation
2021-09-13 19:57:46 +01:00
Luke Benstead
4ee9c3ee64
More optimisations
2021-09-13 19:35:53 +01:00
Luke Benstead
adce2c7538
Perf tweaks
2021-09-13 12:57:52 +01:00
Luke Benstead
52ff506397
Only recalc the fast path when pointers change
2021-09-13 10:40:25 +01:00
Luke Benstead
66d09e7d77
Error cleanup and immediate mode perf improvements
2021-09-13 10:29:04 +01:00
Luke Benstead
4adc49cd40
Optimisations
2021-09-12 15:04:52 +01:00
Luke Benstead
cb96769074
Fix incorrect usage of memset
2021-09-04 13:36:59 +01:00
Luke Benstead
3332dfa74a
Handle running out of PVR memory correctly
2021-09-04 12:14:31 +01:00
Luke Benstead
efc75db05c
Merge branch 'master' into 'master'
...
Enable building for sub-architecture naomi.
See merge request simulant/GLdc!70
2021-07-05 19:27:29 +00:00
T_chan
08eebfccc0
Enable building for sub-architecture naomi.
...
Tested with examples nehe02, nehe06, nehe08 - displays the same as on Dreamcast.
2021-07-05 19:12:10 +00:00
Luke Benstead
fc947c49f8
Performance improvements
2021-05-25 20:40:43 +01:00
Luke Benstead
f736332eb8
Always make sure we send opaque polys with one/zero blending
2021-05-23 20:58:29 +01:00
Luke Benstead
7376d3e625
Tweak toolchain fix
2021-05-23 13:25:52 +01:00
Luke Benstead
5d4f83c53a
Tweak toolchain fix
2021-05-23 13:24:29 +01:00
Luke Benstead
3975c68c5e
Try to fix toolchain file on Windows
2021-05-23 13:21:08 +01:00
Luke Benstead
a79c1dd753
Set the right depth mode when autosort is on
2021-05-23 13:19:54 +01:00
Luke Benstead
cde0abd18d
Force the correct depth and blend modes with PT polys
2021-05-23 13:15:07 +01:00
Luke Benstead
0789ea99b3
Disable fast mode by default
2021-05-23 13:06:11 +01:00
Luke Benstead
f0383f8e1c
Remove broken check
2021-05-16 20:33:49 +01:00
Luke Benstead
5ea4313d59
Fix software renderer
2021-05-14 21:58:54 +01:00
Luke Benstead
840ac7f0cd
Merge branch 'master' into 'master'
...
Fix memory leaks in samples
See merge request simulant/GLdc!69
2021-05-14 14:11:03 +00:00
Colton Pawielski
3d6c756ab7
Fix memory leaks in samples
...
Add free to end of LoadGLTextures() to release image1 after use.
2021-05-14 08:57:10 -04:00
Luke Benstead
06529d4fe7
Perf tweaks
2021-05-08 14:38:55 +01:00
Luke Benstead
cfefce44a6
Add nehe20 sample
2021-05-08 14:17:57 +01:00
Luke Benstead
a98f22e3c9
Remove old Makefiles
2021-05-08 13:15:18 +01:00
Luke Benstead
cb9d699576
Use invW as the Z axis (abandon standards compliance for speed)
2021-05-01 14:32:16 +01:00
Luke Benstead
0a8d43d47b
Add nehe08 sample
2021-04-30 20:47:33 +01:00
Luke Benstead
e67f1fb8f9
Don't transform the vertex again incorrectly. Optimise
2021-04-30 07:58:57 +01:00
Luke Benstead
d05c5b8353
Remove incorrect warning
2021-04-30 07:52:12 +01:00
Luke Benstead
fcbb6418d2
Perf improvements
2021-04-26 16:16:25 +01:00
Luke Benstead
5fc77887d0
Remove unnecessary branches
2021-04-25 15:27:04 +01:00
Luke Benstead
16243acd7b
More immediate mode optimisation
2021-04-25 14:21:09 +01:00
Luke Benstead
1b6f543fab
Slight optimisation
2021-04-25 13:33:24 +01:00
Luke Benstead
40678836e0
Refactor viewport handling
2021-04-25 13:05:56 +01:00
Luke Benstead
57bb8c65c5
Fix artifact path
2021-04-24 11:31:11 +01:00
Luke Benstead
22680e8cbd
Store the release artifacts in CI
2021-04-23 09:11:13 +01:00
Luke Benstead
1f42838992
Fix incorrect glColorPointer stride
2021-04-23 09:09:25 +01:00
Luke Benstead
28c14fdb0e
Add fast path for glDrawElements
2021-04-22 17:48:15 +01:00
Luke Benstead
bb53dad90d
Merge remote-tracking branch 'origin/master'
2021-04-21 21:31:21 +01:00
Luke Benstead
a7858d1f00
Merge branch 'batched-arrays' into 'master'
...
New Fast Path
See merge request simulant/GLdc!68
2021-04-21 16:23:43 +00:00
Luke Benstead
df2d7a210c
New Fast Path
2021-04-21 16:23:43 +00:00
Luke Benstead
5a9b7bb37e
Force inline aligned vector functions
2021-04-20 16:49:00 +01:00
Luke Benstead
ea25251944
Optimisations
2021-04-20 16:08:58 +01:00
Luke Benstead
faf24ac61d
Small optimisations
2021-04-20 09:07:14 +01:00
Luke Benstead
b6a5ac6ce6
Optimisation in aligned_vector_extend
2021-04-19 21:29:19 +01:00
Luke Benstead
38c7967ae2
Clean up some things
2021-04-19 21:23:23 +01:00
Luke Benstead
165318ea76
Use MATH_fmac
2021-04-19 21:12:46 +01:00
Luke Benstead
1a849c8b1c
Minor optimisation
2021-04-19 21:08:09 +01:00
Luke Benstead
a3c4aaac8f
Don't set a zero zclip value
2021-04-19 20:51:22 +01:00
Luke Benstead
8977fbf6e2
Compile quadmark on PC
2021-04-19 20:43:56 +01:00
Luke Benstead
b480c0a01f
Fix optimisations
2021-04-19 20:21:46 +01:00
Luke Benstead
eb35d607b9
Immediate mode performance optimisation
2021-04-19 10:53:08 +01:00
Luke Benstead
778e9c4e64
Optimise CompilePolyHeader
2021-04-18 21:50:41 +01:00
Luke Benstead
ce9f3677f6
Immediate mode optimisation
2021-04-18 21:33:23 +01:00
Luke Benstead
7bcbb86e80
Align to 32 byte
2021-04-18 13:57:28 +01:00
Luke Benstead
9ca68de427
Force 32-byte allocations
2021-04-18 13:57:00 +01:00
Luke Benstead
1172086378
Add debug logging and assertions to make sure we use sq_cpy aligned
2021-04-15 21:31:48 +01:00
Luke Benstead
fc1a18e002
Merge branch 'scissor' into 'master'
...
Implement glScissor correctly
See merge request simulant/GLdc!67
2021-04-14 20:41:10 +00:00
Luke Benstead
f03f0e8f04
Implement glScissor correctly
2021-04-14 21:38:33 +01:00
Luke Benstead
7146ed303b
Add some files
2021-04-14 08:36:46 +01:00
Luke Benstead
30d76eada9
Fix texture issues
2021-04-13 21:28:59 +01:00
Luke Benstead
448f9737c4
Update README
2021-04-10 13:15:46 +01:00
Luke Benstead
ebfcd31ea0
Update .gitignore
2021-04-10 13:00:59 +01:00
Luke Benstead
8fe7a8afdf
Add missing header
2021-04-10 12:58:23 +01:00
Luke Benstead
3e0569c9b8
Merge branch 'x86' into 'master'
...
X86
See merge request simulant/GLdc!66
2021-04-09 15:24:48 +00:00
Luke Benstead
fe616028bb
X86
2021-04-09 15:24:47 +00:00
Luke Benstead
03694d85bf
Minor fixes
2021-04-03 21:15:03 +01:00
Luke Benstead
8ee28fdaac
Merge branch 'yalloc' into 'master'
...
Add upstream yalloc allocator
See merge request simulant/GLdc!65
2021-02-20 15:12:14 +00:00
Luke Benstead
8408a36629
Implement GL_ATI_meminfo
2021-02-20 15:10:35 +00:00
Luke Benstead
9ed6c0209e
Defrag and retry if allocating texture memory fails
2021-02-20 15:04:40 +00:00
Luke Benstead
f9b7cd7985
Add a custom extension to query and defragment texture memory
2021-02-19 21:28:31 +00:00
Luke Benstead
425a0c2af1
Switch to yalloc
2021-02-19 07:08:58 +00:00
Luke Benstead
ddf23974bd
Apply tweaks to handle larger addresses (thanks @HaydenKow)
2021-02-18 20:55:03 +00:00
Luke Benstead
8a02ee55cc
Add upstream yalloc allocator
2021-02-18 20:46:25 +00:00
Luke Benstead
8c187f67de
Merge branch 'master' into 'master'
...
Fix glViewport()
See merge request simulant/GLdc!62
2020-10-07 07:10:09 +00:00
Andress Barajas
a37ae364f0
Flip Y
2020-10-06 22:44:09 -07:00
Andress Barajas
ee8df14426
Fix origin bot-left of glViewport
2020-10-06 20:07:11 -07:00
Luke Benstead
fc4b724cb1
Merge branch 'master' into 'master'
...
Do NULL check before access
See merge request simulant/GLdc!61
2020-10-04 06:24:15 +00:00
Andress Barajas
700b0c6389
Do NULL check before access
2020-10-03 16:36:54 -07:00
Luke Benstead
62088d3191
Merge branch 'BBHoodsta/GLdc-master'
2020-10-03 12:05:02 +01:00
Luke Benstead
cee1c87ed5
Fix issue with glRotate
2020-10-03 11:54:25 +01:00
Andress Barajas
9bb1c3a9e1
Added new nehe lessons
2020-10-03 00:27:11 -07:00
Andress Barajas
926961fe95
Remove DS_Store files
2020-10-02 19:51:21 -07:00
Andress Barajas
c6200e8391
Added more nehe samples
2020-10-02 19:37:13 -07:00
Andress Barajas
e7d2042916
Fixed glRotate
2020-10-02 19:31:22 -07:00
Luke Benstead
44155632c1
Add version template
2020-09-28 12:52:53 +00:00
Luke Benstead
e2d0ae25a0
Delete version.h
2020-09-28 12:52:33 +00:00
Luke Benstead
e54db74914
Add version template
2020-09-28 12:52:23 +00:00
Luke Benstead
7d4207eddb
Fix errors with final Z coordinate
2020-05-24 09:55:13 +01:00
Luke Benstead
d932811be4
Small optimisation
2020-05-22 07:32:02 +01:00
Luke Benstead
9bfb0c6eea
Fix bug from last commit, don't apply lights at all if none are enabled
2020-05-22 07:20:08 +01:00
Luke Benstead
0a92240c64
More lighting optimisations
2020-05-21 20:14:43 +01:00
Luke Benstead
af82f7632f
Fix default texture modulation
2020-05-19 21:27:34 +01:00
Luke Benstead
d6a22582f9
Small cleanup
2020-05-16 09:30:25 +01:00
Luke Benstead
29658ef3de
Revert to more traditional GL depth values to fix ortho
2020-05-15 20:43:55 +01:00
Luke Benstead
17db29142a
Merge branch 'master' into 'master'
...
SAMPLE : depth testing with ortho projection
See merge request simulant/GLdc!59
2020-05-15 19:20:09 +00:00
lerabot
3817101653
Added depth_func_ortho
2020-05-14 17:13:04 -04:00
Luke Benstead
64f2a57dd0
Tweak depth_funcs_alpha_testing sample to use glOrtho
2020-05-14 07:20:41 +01:00
Luke Benstead
06acff400c
Fix the blend test sample. We're using a perspective projection where -Z goes into the screen, so we need to shift positive
2020-05-14 07:08:56 +01:00
Luke Benstead
db079fdc39
Remove .gch files
2020-05-14 07:05:47 +01:00
Luke Benstead
3945611509
Merge branch 'master' into 'experimental'
...
Added a new blend/alpha test
See merge request simulant/GLdc!57
2020-05-14 06:05:02 +00:00
lerabot
294819108d
Merge branch 'master' of https://gitlab.com/simulant/GLdc
2020-05-13 19:05:29 -04:00
Luke Benstead
01cb46a99e
Small tweak to lighting code
2020-05-13 21:04:24 +01:00
Luke Benstead
aa7320ab63
Use shifted invZ for Z to keep precision
2020-05-13 20:59:40 +01:00
lerabot
4e47b30b0a
added a new depth/alpha testing sample
2020-05-13 10:34:18 -04:00
lerabot
bd59922052
updated makefile
2020-05-13 10:33:55 -04:00
lerabot
84f9711489
Updated the blend samples
2020-05-13 10:16:29 -04:00
Luke Benstead
2b9d8520bc
Lighting perf improvements
2020-05-11 20:34:09 +01:00
Luke Benstead
d01b9fa85a
Shift the range of final depth values so the minimum is 0.2 (KOS bgpoly depth)
2020-05-10 20:53:16 +01:00
Luke Benstead
c66f34cc62
Set Alpha flags when ALPHA_TEST is enabled
2020-05-10 13:49:45 +01:00
Luke Benstead
8e854ddef7
Fix overbright lighting
2020-05-09 06:33:28 +01:00
Luke Benstead
aa20bb20b2
Performance tweaks
2020-05-08 19:42:31 +01:00
Luke Benstead
1289a06279
Undo fmac which worked out slower
2020-05-08 13:53:56 +01:00
Luke Benstead
ab6725c5e3
Restore MAX_LIGHTS to 8
2020-05-08 10:00:03 +01:00
Luke Benstead
397d9d2915
More perf tweaks
2020-05-08 09:59:32 +01:00
Luke Benstead
8974051e38
Don't use memcpy when copying colours
2020-05-08 09:49:01 +01:00
Luke Benstead
cca09a298e
Move enabled state onto the LightSource
2020-05-08 07:19:56 +01:00
Luke Benstead
814f228db9
Lighting optimisations
2020-05-07 20:58:24 +01:00
Luke Benstead
0a14db39a8
Improve the performance of _readVertexData1i3f
2020-05-06 20:15:28 +01:00
Luke Benstead
2d0e13b64e
Merge branch 'refactor-draw' into 'master'
...
Refactor glDrawElements
See merge request simulant/GLdc!56
2020-05-06 14:29:50 +00:00
Luke Benstead
b3ded78897
Fix glDrawElements
2020-05-06 15:23:37 +01:00
Luke Benstead
177ad28219
More simplification
2020-05-06 08:42:09 +01:00
Luke Benstead
2c67560289
Refactor all the user-data reading code
2020-05-05 21:52:37 +01:00
Luke Benstead
40661e6823
Fix orthographic depth values (?)
2020-05-04 21:24:27 +01:00
Luke Benstead
5407e9643e
Hacky fix for ortho projections
2020-04-07 20:44:29 +01:00
Luke Benstead
8add817086
Fix depth issues
2020-04-06 20:50:26 +01:00
Luke Benstead
f3b1848879
Merge branch 'master' of https://gitlab.com/simulant/GLdc
2020-04-05 21:13:07 +01:00
Luke Benstead
c3ae9bef64
Fix up depth functions and update sh4_math
2020-04-05 21:12:52 +01:00
Luke Benstead
9116332815
Merge branch 'einsteinx2/fix-makefile' into 'master'
...
Fixed Makefile GL/version.h (echo -e to printf)
See merge request simulant/GLdc!54
2020-04-05 19:13:46 +00:00
Ben Baron
0beaba5aeb
Fixed Makefile GL/version.h (echo -e to printf)
...
The `echo -e` command is non-standard, and ends up printing a -e at the top of the version.h file. Switching it to `printf` works correctly and is the "correct" command to work in all shells.
I also removed the GL/version.h file from the git cache, as it's in .gitignore but seems to have been accidentally checked in.
2020-04-05 13:47:32 -05:00
Luke Benstead
ca7eb462fc
Merge branch 'fix-clipping-2020' into 'master'
...
Fix clipping 2020
See merge request simulant/GLdc!53
2020-04-03 19:12:42 +00:00
Luke Benstead
cf90d10cb9
Fix clipping 2020
2020-04-03 19:12:42 +00:00
Luke Benstead
4292304df1
Implement glClearDepth
2020-03-24 13:58:44 +00:00
Luke Benstead
5c980d2183
Fix depth funcs (for now)
2020-03-23 15:22:29 +00:00
Luke Benstead
e21b7a0b9c
Fix clipping
2020-03-23 13:44:24 +00:00
Luke Benstead
906423db08
Make sure we don't go beyond the bounds of PVR
2020-03-22 21:09:18 +00:00
Luke Benstead
a1eda16a26
Update SH4_math.h and stop storing the near plane
2020-03-21 21:21:46 +00:00
Luke Benstead
f2a39a4229
Implement true clipping on the near plane
2020-03-20 21:15:05 +00:00
Luke Benstead
03bc758be7
Allow enabling fsaa via the GLdcConfig struct
2020-03-18 20:47:12 +00:00
Luke Benstead
71c25829f1
Remove reference to private.h
2020-03-18 20:33:04 +00:00
Luke Benstead
921ef0c6a1
Fix clip distance
2020-03-17 20:32:14 +00:00
Luke Benstead
2f75ff8223
Merge branch 'kazade_patch_prepare' into 'master'
...
Kazade patch prepare
See merge request simulant/GLdc!52
2020-03-05 20:30:41 +00:00
Hayden Kowalchuk
f92030c0cb
feat: error.c have PrintError reset error cond
...
- allows to continue finding errors instead of spamming the same error
2020-03-05 15:14:26 -05:00
Hayden Kowalchuk
ea3dec1daa
feat: opengl headers expose new functionality
2020-03-05 15:13:30 -05:00
Hayden Kowalchuk
1c792df5ae
fix: texture.c
...
- add const where needed
- move defines to private.h
- add vq offsets to mipmaplocation
- backend support for mipmap bias
- inline fixups
- have texture.c spit more helpful info on crash
- allow mipmap uploads to actuall complete
- note unused
2020-03-05 15:09:19 -05:00
Hayden Kowalchuk
35bbab8eee
feat: state.c add GL_POLYGON_OFFSET, add mipmap bias
...
- implement simple GL_POLYGON_OFFSET implementation
- add mipmap bias as per OpenGL spec
- CLAMP gave warnings comparing unsigned to < 0
2020-03-05 15:04:44 -05:00
Hayden Kowalchuk
ddf61363a1
feat: add trimmed moop math header
2020-03-05 14:58:06 -05:00
Hayden Kowalchuk
a285c42c5f
feat: make profiler compile time define
2020-03-05 14:57:51 -05:00
Hayden Kowalchuk
5a89fbcd7d
fix: private.h
...
- add convenience defines
- note struct ordering and padding
- add const
2020-03-05 14:57:30 -05:00
Hayden Kowalchuk
bf00aca843
chore: lighting.c remove unused, add moop math
...
- remove unused bool
- move math func to header
- reorder const
2020-03-05 14:56:16 -05:00
Hayden Kowalchuk
87874f0f1f
chore: immediate.c unused note
2020-03-05 14:54:07 -05:00
Hayden Kowalchuk
c842b6de48
chore: matrix.c unused notation, memcpy changes
...
- moved to memcpy4
- removed unused arrays
- moved to proper glDepthRangef signature
- rewrote gluLookAt for current and future gcc
2020-03-05 14:53:48 -05:00
Hayden Kowalchuk
651351f087
fix: glu.c changed to float, reordered math
2020-03-05 14:50:14 -05:00
Hayden Kowalchuk
c9dc5f8f8b
fix: framebuffer.c marking inline, unused notation
2020-03-05 14:49:23 -05:00
Hayden Kowalchuk
e587519e14
fix: draw.c inline changes, and unused notation
...
- remove redundant call to isLightingEnabled
- rewrote vec3f normalize call
- moved checking for fastpath until we need it
2020-03-05 14:48:37 -05:00
Hayden Kowalchuk
eb351f519a
fix: config.h moved to #pragma once
...
- whitespace fixes
2020-03-05 14:45:05 -05:00
Hayden Kowalchuk
c0d4e26533
feat: clip.c changed to moop math
...
- fmac where it was intended
2020-03-05 14:44:41 -05:00
Hayden Kowalchuk
19374bc1a4
chore: change containers
...
- move some math to integer
- inline some smaller functions
- whitespace fixes
2020-03-05 14:44:09 -05:00
Luke Benstead
1d1a980f16
Fix memory leak (thanks @HaydenKow)
2020-03-02 19:20:42 +00:00
Luke Benstead
7e7d90b606
Inline some things
2020-02-29 13:25:30 +00:00
Luke Benstead
937ad56c26
Fix out of bounds read
2020-02-29 09:48:52 +00:00
Luke Benstead
43a8db9e9d
Remove divisions
2020-02-29 09:48:51 +00:00
Luke Benstead
a3b1ca66c3
Remove divisions
2020-02-22 21:00:33 +00:00
Luke Benstead
1520226174
Fix directional lighting
2020-02-22 20:33:23 +00:00
Luke Benstead
7fecb7a3a5
Fix directional lights
2020-02-21 14:51:05 +00:00
Luke Benstead
497ba28b4c
Replace pow function
2020-02-20 09:44:45 +00:00
Luke Benstead
6b43244a1e
Merge branch 'restore-color-material' into 'master'
...
Restore support for glColormaterial
See merge request simulant/GLdc!51
2020-02-19 10:50:31 +00:00
Luke Benstead
59118cc07d
Restore support for glColormaterial
2020-02-19 10:45:31 +00:00
Luke Benstead
a502f92ded
More lighting improvements
2020-02-19 09:30:26 +00:00
Luke Benstead
24fe33358c
Faster floor
2020-02-17 20:49:40 +00:00
Luke Benstead
4ebd112784
Attempt to fix specular
2020-02-17 20:29:12 +00:00
Luke Benstead
28f77969ea
Avoid overflows
2020-02-17 19:09:21 +00:00
Luke Benstead
29cbdc75b7
Fix a copy-paste bug (thanks @freakdave)
2020-02-17 19:05:57 +00:00
Luke Benstead
ab5dc26e33
Only calculate specular if there is an exponent
2020-02-17 19:05:18 +00:00
Luke Benstead
93be3ab757
Use super-simple floor function
2020-02-17 19:02:45 +00:00
Luke Benstead
6516f0f6f5
Prevent overflowing colours
2020-02-17 10:38:30 +00:00
Luke Benstead
5183d7b2d4
Fix strict aliasing issues
2020-02-17 10:31:26 +00:00
Luke Benstead
ab69030b1e
Fix lighting colours
2020-02-17 10:21:33 +00:00
Luke Benstead
35842ad300
Faster FPOw implementation
2020-02-17 10:12:15 +00:00
Luke Benstead
2178d2f6d7
Improve lighting performance
...
This is (another) first pass at improving the performance of the lighting code.
As part of this refactor *we have lost glColorMaterial*. I need to figure out a
nice way of implementing it without slowing the common code path.
2020-02-16 20:36:49 +00:00
Luke Benstead
9605734476
Update Makefile
2020-01-01 14:31:55 +00:00
Luke Benstead
dafc56c396
Add new file
2020-01-01 14:30:03 +00:00
Luke Benstead
0819e1e5df
Update Makefile
2020-01-01 14:28:45 +00:00
Luke Benstead
6322728fae
Update Makefile
2020-01-01 14:28:25 +00:00
Luke Benstead
56b8abd758
Update Makefile
2020-01-01 14:13:34 +00:00
Luke Benstead
3c9f352827
Update Makefile
2020-01-01 14:12:12 +00:00
Luke Benstead
eeb95193ac
Fix overflow
2019-12-27 19:35:18 +00:00
Luke Benstead
b2a2e71795
Much faster lighting implementation
2019-12-27 10:36:30 +00:00
Luke Benstead
b6e9b8c3ff
Fix a glColorPointer call
2019-11-30 10:08:43 +00:00
Luke Benstead
a280dac778
Performance improvements
2019-11-30 10:07:41 +00:00
Luke Benstead
62b53f0fb1
Simplify swapVertex
2019-11-30 10:07:23 +00:00
Luke Benstead
e61369674c
Change where txr.alpha is set
2019-11-30 10:07:04 +00:00
Luke Benstead
e97dd466aa
Fix depth test functions
2019-11-30 10:06:46 +00:00
Luke Benstead
cdfb805dd9
Implement a fast path for glDrawElements
2019-11-27 20:08:29 +00:00
Luke Benstead
140eec3d92
glNormalPointer should accept GL_INT_2_10_10_10_REV, not GL_UNSIGNED_INT_2_...
2019-11-27 09:10:10 +00:00
Luke Benstead
11cd54bc0b
Add partial support for GL_ARB_vertex_type_2_10_10_10_rev and also GL_NORMALIZE
2019-11-18 17:39:09 +00:00
Luke Benstead
fd3e7cde6c
Improve the light sample + tweaks
2019-11-14 21:12:27 +00:00
Luke Benstead
8654ff24a2
Add light sample and fix lighting bug
2019-11-14 10:04:15 +00:00
Luke Benstead
9f3adc099a
Fix a bad reference
2019-11-12 17:28:39 +00:00
Luke Benstead
05e242e054
Merge branch 'minus_fix' into 'master'
...
remove single minus sign
See merge request simulant/GLdc!50
2019-10-04 14:33:25 +00:00
Hayden Kowalchuk
805c68e973
remove single minus sign
2019-10-04 10:29:54 -04:00
Luke Benstead
90eb264210
Merge branch '52-fast-path' into 'master'
...
Resolve "Implement a fast path"
Closes #52
See merge request simulant/GLdc!49
2019-10-01 07:51:28 +00:00
Luke Benstead
f59e9bf56e
Implement GL_ARB_vertex_array_bgra
2019-09-30 21:59:11 +01:00
Luke Benstead
d7e424a766
Initial implementation of a fast-path (currently some corruption)
2019-09-30 09:14:43 +01:00
Luke Benstead
2aafbfb571
Actually enable mipmapping in the paletted sample
2019-09-26 09:46:25 +01:00
Luke Benstead
7ac318e002
Merge branch '40-fix-mipmap-offsets' into 'master'
...
Resolve "Fix mipmap offsets"
Closes #40
See merge request simulant/GLdc!48
2019-09-26 08:19:23 +00:00
Luke Benstead
2c5b71b2b0
Implement mipmap generation for paletted textures
2019-09-26 09:17:07 +01:00
Luke Benstead
08ba39f6d1
Fix twiddled mipmap generation
2019-09-25 13:45:08 +01:00
Luke Benstead
2e1e28ce51
More mipmap generation fixes
2019-09-25 13:32:13 +01:00
Luke Benstead
36a3f7082f
Implement mipmap generation for twiddled textures
2019-09-25 13:10:34 +01:00
Luke Benstead
e14db20a41
Fix a bunch of mipmap issues
2019-09-24 21:26:17 +01:00
Luke Benstead
2b53f50c46
Add some copy safety and remove some print statements
2019-09-24 19:39:23 +01:00
Luke Benstead
150c95bd33
Huge refactor of mipmap handling. All textures are now stored twiddled on the PVR
2019-09-24 15:47:23 +01:00
Luke Benstead
aafb99dede
Add a mipmap sample
2019-09-23 21:31:11 +01:00
Luke Benstead
888a48562f
Generate version.h and print version on boot. Fixes #46
2019-09-22 21:48:43 +01:00
Luke Benstead
8f84cbb142
Various cleanups from @mrneo
2019-09-22 20:52:58 +01:00
Luke Benstead
c92cdc927c
Merge branch 'fix-gl_alpha-textures' into 'master'
...
Fixed GL_ALPHA support (convert to argb format)
See merge request simulant/GLdc!47
2019-09-22 19:32:00 +00:00
Ben Baron
b192bfc451
Fixed comment
2019-09-17 08:28:43 -05:00
Ben Baron
cb675434c7
Fixed GL_ALPHA support (convert to argb format)
2019-09-16 20:48:06 -05:00
Luke Benstead
96c103e379
Merge branch 'fixed-depth-issues'
2019-09-15 14:27:41 +01:00
Luke Benstead
e39632bcc4
Refactor matrix management and clipping
2019-09-14 20:51:47 +01:00
Luke Benstead
e7f2ad7dcc
Optimise multitexture submission
2019-09-09 09:36:06 +01:00
Luke Benstead
3af18cb514
Refactor the perspective divide to work with glDepthRange
2019-09-08 17:27:56 +01:00
Luke Benstead
200db3593e
Make primitive constants match the spec
2019-09-06 09:36:14 +01:00
Luke Benstead
1d32834b52
Simplify texture and blending context updates
2019-09-06 09:35:57 +01:00
Luke Benstead
22690600d0
Don't include kos headers from gl.h
2019-09-06 09:35:33 +01:00
Luke Benstead
4170655a88
If someone attempts to use lines, just log an error and render nothing (for now)
2019-09-06 09:34:55 +01:00
Luke Benstead
83bad86bca
Add a blend_test sample
2019-09-06 09:34:33 +01:00
Luke Benstead
8e59b9adb5
Make sure we clamp floating point colours to avoid overflows
2019-09-04 17:59:57 +01:00
Luke Benstead
041b545177
Add missing glDepthRange declaration
2019-08-20 21:02:08 +01:00
Luke Benstead
57f4f62f86
Implement glColor3ubv
2019-08-20 20:42:29 +01:00
Luke Benstead
b6fccd3148
Use PVR_TXRENV_MODULATE instead of MODULATEALPHA. Fixes #48
2019-08-08 09:36:38 +01:00
Luke Benstead
b82d28130d
Rewrite the lighting code
2019-08-01 20:21:13 +01:00
Luke Benstead
00c38edba9
Add polygon_offset sample (thanks mrneo240)
2019-07-17 10:46:19 +01:00
Luke Benstead
a616fe8f27
Merge branch '42-disallow-mipmaps' into 'master'
...
Throw GL_INVALID_OPERATION if mipmaps are specified for non-square textures
Closes #42
See merge request simulant/GLdc!44
2019-04-17 15:21:34 +00:00
Luke Benstead
3395f17687
Throw GL_INVALID_OPERATION if mipmaps are specified for non-square textures
2019-04-17 16:19:03 +01:00
Luke Benstead
f39e2c0972
Merge branch '43-allocate-when-needed' into 'master'
...
Only allocate space for mipmaps when necessary
Closes #43
See merge request simulant/GLdc!43
2019-04-17 14:58:53 +00:00
Luke Benstead
62743d42cb
Only allocate space for mipmaps when necessary
2019-04-17 14:55:30 +01:00
Luke Benstead
a8d420299c
Correctly throw GL_INVALID_VALUE for invalid sizes
2019-04-14 08:51:37 +01:00
Luke Benstead
6cfb4e437c
Handle GL_DOUBLE like GL_FLOAT everywhere
2019-04-14 07:17:27 +01:00
Luke Benstead
cb692f59b4
Remove unnecessary conditional check
2019-04-01 09:57:33 +01:00
Luke Benstead
d912680ef0
Update version string
2019-03-30 07:15:50 +00:00
Luke Benstead
76c0826917
Merge branch 'slim-down-clipvertex' into 'master'
...
Slim down ClipVertex
Closes #36 and #37
See merge request simulant/GLdc!41
2019-03-30 07:13:26 +00:00
Luke Benstead
26dd1c1205
Tweak the polymark sample
2019-03-30 07:11:08 +00:00
Luke Benstead
e876dcb14f
Massively optimise GL_POLYGON/GL_TRIANGLE_FAN
2019-03-29 11:26:19 +00:00
Luke Benstead
a88a9029f5
Add a polymark sample
2019-03-29 11:26:19 +00:00
Luke Benstead
9fafe31a37
Disable profiler
2019-03-29 11:26:19 +00:00
Luke Benstead
a75ced3fef
Speed up immediate mode submission
2019-03-29 11:26:19 +00:00
Luke Benstead
1e18fbc527
Fix twiddling code. Fixes #37
2019-03-29 11:26:19 +00:00
Luke Benstead
2e33dc0718
Add missing profiler_pop(). Fixes #36
2019-03-29 11:26:19 +00:00
Luke Benstead
93311ff12c
Fix twiddling code. Fixes #37
2019-03-29 07:54:50 +00:00
Luke Benstead
e2ea07ad92
Add missing profiler_pop(). Fixes #36
2019-03-29 07:51:09 +00:00
Luke Benstead
ccc9b59d03
Turn up to 11
2019-03-28 13:12:00 +00:00
Luke Benstead
41ee67cbf1
Code cleanup
2019-03-28 13:10:53 +00:00
Luke Benstead
e15a47b6fb
Use the list stored on the SubmissionTarget
2019-03-28 13:09:36 +00:00
Luke Benstead
3cd15de332
Add additional traces
2019-03-28 13:09:04 +00:00
Luke Benstead
093b1af056
Add some assertions to aligned_vector
2019-03-28 13:08:23 +00:00
Luke Benstead
8982444406
Consistently allow > 16384 verts
2019-03-28 13:07:53 +00:00
Luke Benstead
cd04784c33
Fix memory corruption
2019-03-28 13:05:13 +00:00
Luke Benstead
30f8564298
Fix glDrawElements
2019-03-27 09:39:06 +00:00
Luke Benstead
434f316526
Switch pointer comparisons for counters
2019-03-26 09:09:07 +00:00
Luke Benstead
d44a24d339
Add assertions
2019-03-25 19:43:03 +00:00
Luke Benstead
9e12e15a13
Make use of swapVertex
2019-03-25 19:30:45 +00:00
Luke Benstead
bdeb9cd45a
Restore clipping case that apparently can happen after all
2019-03-25 19:04:50 +00:00
Luke Benstead
e0613faced
Tweak zclip demo
2019-03-25 18:51:36 +00:00
Luke Benstead
7e47b21fb5
Move back and forth in the zclip sample
2019-03-25 16:07:54 +00:00
Luke Benstead
493592ea30
Tweaks
2019-03-25 16:07:27 +00:00
Luke Benstead
ba04f62f6d
Minor optimisation
2019-03-25 16:07:12 +00:00
Luke Benstead
f712f00602
Don't do anything if there are no vertices submitted
2019-03-25 16:06:41 +00:00
Luke Benstead
4355d0f224
Add additional profiler checkpoints
2019-03-25 16:06:28 +00:00
Luke Benstead
70feea6c6f
Minor optimisations
2019-03-25 16:05:36 +00:00
Luke Benstead
b771a5339b
Send colours as bytes in immediate mode
2019-03-25 12:56:48 +00:00
Luke Benstead
8fd90bd040
Switch back to normal swapping
2019-03-25 12:38:34 +00:00
Luke Benstead
0e71588e6c
Try to optimise the quad generation
2019-03-25 10:33:05 +00:00
Luke Benstead
671881eafd
Optimise GL_POLYGON rendering
2019-03-25 09:48:58 +00:00
Luke Benstead
291e82d18a
Rename ClipVertex -> Vertex
2019-03-25 09:44:59 +00:00
Luke Benstead
bd0ef4cba3
Demo multitexturing in zclip, default to GL_MODULATE on multitexture
2019-03-24 14:09:52 +00:00
Luke Benstead
5e6927d9a1
Huge refactor of the drawing code
2019-03-24 08:09:02 +00:00
lerabot
f128efad6b
Added comments
2019-03-21 12:16:54 -04:00
lerabot
34163498bd
early test for testing depth/alpha function with .DTEX
2019-03-21 12:13:03 -04:00
Luke Benstead
3cb24c4fb4
Rename some functions
2019-03-14 13:16:55 +00:00
Luke Benstead
e9c8836181
Huge cleanup of glDrawElements handling
2019-03-14 13:15:56 +00:00
Luke Benstead
1ee16d8ee1
Slight optimisation
2019-03-13 17:38:42 +00:00
Luke Benstead
7c33f13438
Allow configuring initial capacities
2019-03-13 15:43:50 +00:00
Luke Benstead
d9539da841
Optimisations
2019-03-13 15:35:42 +00:00
Luke Benstead
8101e43e90
Fix winding issue
2019-03-13 15:19:28 +00:00
Luke Benstead
724ff628aa
Fix some signedness issues
2019-03-13 15:14:09 +00:00
Luke Benstead
8b206f012e
Make sure we correctly initalize the used banks
2019-03-13 12:05:06 +00:00
Luke Benstead
7d3dfeb317
Merge branch 'generate-refactor'
2019-03-13 11:24:56 +00:00
Luke Benstead
5bf58ec1a8
Refactor array submission to be (hopefully) faster
2019-03-13 11:24:35 +00:00
Luke Benstead
5da1ed732a
Bump the default vbuf capacity
2019-03-13 08:53:35 +00:00
Luke Benstead
3d8fa7027b
Properly forward the internal_palette_format
2019-03-13 08:51:05 +00:00
Luke Benstead
26c943c548
Optimize memory allocations
2019-03-13 07:28:23 +00:00
Luke Benstead
2ad23b1e16
Update version string
2019-03-11 19:54:55 +00:00
Luke Benstead
70ceb70f0b
Fix invalid filter param
2019-03-11 19:51:13 +00:00
Luke Benstead
c73a96c1a5
Fix some more invalid GL constants
2019-03-11 19:36:07 +00:00
Luke Benstead
d21a07e799
Fix up some wrong constant values
2019-03-11 19:29:48 +00:00
Luke Benstead
8b13e3adaf
Reserve 0 in the framebuffer thing (WIP)
2019-03-11 19:24:08 +00:00
Luke Benstead
032d56ce5a
Merge branch 'rgb565-palettes'
2019-03-11 19:15:01 +00:00
Luke Benstead
957ebfa662
Fix texture twiddling
2019-03-11 19:14:30 +00:00
Luke Benstead
2485ea3428
Prove rectangular twiddling is broken
2019-03-11 19:08:32 +00:00
Luke Benstead
588c082ec8
Allow specifying palette, autosort, memory options via glKosInitEx
2019-03-11 19:07:59 +00:00
Luke Benstead
8f26e9c364
Fix a bug in the morton_index function
2019-03-11 09:12:48 +00:00
Luke Benstead
a561fd469f
Protect against invalid read
2019-03-10 20:18:11 +00:00
Luke Benstead
834599dc4b
Add glDrawBuffer stub
2019-03-10 20:05:40 +00:00
Luke Benstead
890a925225
Update README
2019-03-10 20:04:04 +00:00
Luke Benstead
8f6e43d555
Merge branch 'alpha-test' into 'master'
...
Implement glAlphaFunc and glEnable(GL_ALPHA_TEST)
See merge request simulant/GLdc!36
2019-03-10 20:02:24 +00:00
Luke Benstead
7512c1e767
Fix GL_ALPHA_TEST sample
2019-03-10 19:59:34 +00:00
Luke Benstead
e4186a05bf
Start working on a test for GL_ALPHA_TEST
2019-03-10 19:38:47 +00:00
Luke Benstead
04dab8da9a
Implement glAlphaFunc and glEnable(GL_ALPHA_TEST)
2019-03-10 17:53:58 +00:00
Luke Benstead
25bd3aedc8
Increase the max polygon size to 32
2019-03-10 16:10:59 +00:00
Luke Benstead
3e54b0298e
Add thanks to Hayden Kowalchuk in the readme
2019-03-10 12:32:22 +00:00
Luke Benstead
91c3b66d73
Add GL_MODELVIEW_MATRIX as an option to glGetFloatv
2019-03-10 12:30:39 +00:00
Luke Benstead
b00b65af54
Fix issues with triangle fans / polygons
2019-03-10 12:24:27 +00:00
Luke Benstead
1807a0119c
Add some missing function stubs
2019-03-10 12:19:45 +00:00
Luke Benstead
3fbb655758
Merge branch 'palette-slots' into 'master'
...
Palette slots
Closes #28
See merge request simulant/GLdc!35
2019-03-10 11:31:51 +00:00
Luke Benstead
259a82e69f
Add support for multiple shared palettes
2019-03-10 11:18:56 +00:00
Luke Benstead
864dc45d10
Allocate palette slots on a FIFO basis
2019-03-09 14:32:50 +00:00
Luke Benstead
4d6cea59b7
Increase the max texture count
2019-03-08 21:38:39 +00:00
Luke Benstead
516cae7893
Store palettes in RAM not VRAM
2019-03-08 21:36:53 +00:00
Luke Benstead
ac3ffb9ce0
Make the binary symbols more compatible
2019-03-08 21:36:53 +00:00
Luke Benstead
dc6b067e58
Merge branch '35-fix-polygons' into 'master'
...
Fix drawing polygons. Fixes #35
Closes #35
See merge request simulant/GLdc!33
2019-03-07 21:45:46 +00:00
Luke Benstead
df3cdf0ebb
Fix drawing polygons. Fixes #35
2019-03-07 21:41:25 +00:00
Luke Benstead
d7342fa0c0
Automatically twiddle non-twiddled palette data
2019-03-07 21:21:30 +00:00
Luke Benstead
3e1ed8a5f7
Don't reserve more space than we need
2019-03-06 08:31:06 +00:00
Luke Benstead
2ac9cac22d
Use the shared palette in the sample
2019-03-04 20:56:17 +00:00
Luke Benstead
d89997a277
Simplify the element drawing
2019-03-04 20:41:33 +00:00
Luke Benstead
7c0a123aac
Correctly initialize the shared palette. Fixes #34
2019-03-04 08:44:19 +00:00
Luke Benstead
efa63ebff2
Don't apply the shared palette if it hasn't been specified yet. Fixes #34
2019-03-04 08:42:24 +00:00
Luke Benstead
11bb588279
Make sure we reupload the palette if it's changed by glColorTableEXT
2019-03-03 20:21:42 +00:00
Luke Benstead
526b1f0d16
Add some assertions
2019-03-03 19:49:28 +00:00
Luke Benstead
ba4fde3975
Fix depth funcs
2019-03-03 19:41:19 +00:00
Luke Benstead
44ca14bcbd
Add assertions
2019-03-03 19:11:53 +00:00
Luke Benstead
5f7fef2cf9
Prefix non-static private functions with '_gl'
2019-03-03 19:06:01 +00:00
Luke Benstead
926214bd82
Prefix some non-static private functions with '_gl'
2019-03-03 19:02:25 +00:00
Luke Benstead
2382126603
Make palette binding lazy
2019-03-03 18:56:18 +00:00
Luke Benstead
ef06af793a
Don't apply the color table unless a texture is bound
2019-03-03 18:54:25 +00:00
Luke Benstead
3c3018450f
Support twiddled and non-twiddled paletted textures
2019-03-03 18:49:33 +00:00
Luke Benstead
d12032c961
Store palette data in PVR ram
2019-03-03 18:49:06 +00:00
Luke Benstead
f349cd1b49
Fix packing order issue (thanks @mrneo240!)
2019-03-03 18:48:50 +00:00
Luke Benstead
cf273eab42
Add glTexParameterf (thanks @mrneo240)
2019-02-28 19:21:16 +00:00
Luke Benstead
b0c9ac7207
Remove zero special casing from named array
2019-02-28 18:33:37 +00:00
Luke Benstead
31ed419dfa
Don't allow zero as a valid texture ID
2019-02-28 18:28:55 +00:00
Luke Benstead
6189f8d671
Merge branch 'implement-glGetFloatv' into 'master'
...
Add stub with just GL_PROJECTION_MATRIX supported
See merge request simulant/GLdc!32
2019-02-28 08:49:42 +00:00
Luke Benstead
02937ccd2c
Add stub with just GL_PROJECTION_MATRIX supported
2019-02-28 08:46:13 +00:00
Luke Benstead
3345e17e3c
Fix marker indexing
2019-02-28 08:34:32 +00:00
Luke Benstead
11b26c78d5
Fix an off-by-one error
2019-02-28 06:37:18 +00:00
Luke Benstead
0d460afa82
Merge branch '30-fix-bind-texture' into 'master'
...
Handle calling glBindTexture on an unknown name
Closes #30
See merge request simulant/GLdc!31
2019-02-27 20:48:19 +00:00
Luke Benstead
111d4ca83e
Handle calling glBindTexture on an unknown name
2019-02-27 20:45:53 +00:00
Luke Benstead
e34f7e6368
Merge branch '32-narrow-to-rgb' into 'master'
...
Implement new conversion
Closes #32
See merge request simulant/GLdc!30
2019-02-27 20:35:01 +00:00
Luke Benstead
f6af3ab3fb
Implement new conversion
2019-02-27 20:11:14 +00:00
Luke Benstead
b76dd102f7
Merge branch 'enable-ci' into 'master'
...
Add GitLab CI file
Closes #31
See merge request simulant/GLdc!29
2019-02-27 20:02:50 +00:00
Luke Benstead
86a921da25
Add GitLab CI file
2019-02-27 19:33:25 +00:00
Luke Benstead
920fc2b782
Increase the max number of textures to 512. Add config.h for settings like this. Fixes #29
2019-02-25 08:30:02 +00:00
Luke Benstead
7368f5c290
Add GL_SHARED_TEXTURE_PALETTE_EXT as a valid target to glColorTableEXT. Fixes #27
2019-02-25 08:26:04 +00:00
Luke Benstead
c3cd3b936c
Add definition of GL_INTENSITY
2019-02-23 21:29:45 +00:00
Luke Benstead
cdd2447e07
Merge branch 'GL_EXT_shared_texture_palette' into 'master'
...
Implement GL_EXT_shared_texture_palette
See merge request simulant/GLdc!28
2019-02-21 21:59:58 +00:00
Luke Benstead
6d2c47bda1
Implement GL_EXT_shared_texture_palette
2019-02-21 21:58:31 +00:00
Luke Benstead
3d5b257e1b
Merge branch 'ext-paletted-texture' into 'master'
...
Initial implementation of GL_EXT_paletted_texture
See merge request simulant/GLdc!26
2019-02-21 21:29:42 +00:00
Luke Benstead
50f1e277d8
Merge branch 'master' into ext-paletted-texture
2019-02-21 21:26:23 +00:00
Luke Benstead
464c12cfc5
Disable mipmap filtering on the paletted texture sample
2019-02-21 21:22:39 +00:00
Luke Benstead
571438ef4e
Implement glColorTableEXT
2019-02-21 20:35:18 +00:00
Luke Benstead
8efd678da0
Update README
2018-10-21 10:11:45 +01:00
Luke Benstead
b9f8fe4a4d
Clean up the memalign switching a bit
2018-10-18 09:54:34 +01:00
Luke Benstead
78f5fc698a
Merge pull request #27 from mrneo240/master
...
Minor Changes to allow windows to cleanly compile
2018-10-18 09:45:44 +01:00
mrneo240
82833f8fab
Merge pull request #1 from mrneo240/windows_fix
...
Fix compilation windows targets
2018-10-16 01:03:28 -04:00
Hayden Kowalchuk
0718ab0697
Fix compilation windows targets
2018-10-16 01:00:34 -04:00
Luke Benstead
df44c0ea73
More performance work and fix bugs introduced in last commit
2018-10-09 09:27:53 +01:00
Luke Benstead
18759422ea
Optimise non-indexed rendering paths
2018-10-08 22:03:50 +01:00
Luke Benstead
c84f211ad0
More work towards paletted textures
2018-09-22 20:45:17 +01:00
Luke Benstead
e4f8cb8c9b
Add a width limit
2018-09-20 16:48:26 +01:00
Luke Benstead
9645b10ed6
Add paletted texture to the supported extensions
2018-09-20 15:11:01 +01:00
Luke Benstead
8670fd459c
More conversions
2018-09-20 15:10:08 +01:00
Luke Benstead
741707ac85
Implement conversions to RGBA8
2018-09-20 15:08:06 +01:00
Luke Benstead
21ad46ad94
Make it clear that some things aren't yet implemented
2018-09-20 15:02:22 +01:00
Luke Benstead
baf7cf5bdd
Stub out glColorTableEXT
2018-09-20 15:01:13 +01:00
Luke Benstead
52e1be498e
Keep header pointer updated. Fixes #25 (hopefully...)
2018-09-19 17:11:56 +01:00
Luke Benstead
e36f561ec0
Improve check
2018-09-15 17:41:58 +01:00
Luke Benstead
6aadc1124f
Fix another zclipping bug
2018-09-15 17:38:42 +01:00
Luke Benstead
bc2fb6b658
Fix a clipping bug
2018-09-15 16:03:21 +01:00
Luke Benstead
7100ebe5a9
Prefix some non-static private methods
2018-09-15 11:45:38 +01:00
Luke Benstead
6cfccbd20d
Inline + Static some lighting functions
2018-09-15 11:42:56 +01:00
Luke Benstead
e68c051991
Add missing glColorMaterial definition
2018-09-15 11:42:42 +01:00
Luke Benstead
17c9699966
More clipping fixes
2018-09-08 20:53:28 +01:00
Luke Benstead
06b065dc7e
Return the correct count from clip
2018-09-06 20:08:55 +01:00
Luke Benstead
93af697092
Don't include the header in startOffset
2018-09-06 20:00:18 +01:00
Luke Benstead
d9fa69c288
Fix invalid memory access bug
2018-09-06 19:46:04 +01:00
Luke Benstead
b4539443f5
Allow toggling debug logging
2018-09-06 19:45:52 +01:00
Luke Benstead
d94ee888dc
Merge pull request #24 from Kazade/new-clipping
...
New clipping algorithm
2018-09-06 19:26:52 +01:00
Luke Benstead
e82646faff
Remove old clipping code
2018-09-06 19:22:25 +01:00
Luke Benstead
af54c96ff4
Implement new culling algorithm, still some issues when GL_CULL_FACE is enabled
2018-09-06 19:19:00 +01:00
Luke Benstead
517d21b487
Begin implementing a new clipping algorithm
2018-09-03 21:48:42 +01:00
Luke Benstead
19491173e5
Set registers correctly before using store queues.
...
Fixes #23
2018-09-03 20:47:24 +01:00
Luke Benstead
55b3aa4ddd
Fix up twiddled formats with alpha
2018-08-28 17:51:33 +01:00
Luke Benstead
963eeb54da
Start work on spotlights
2018-08-28 15:55:50 +01:00
Luke Benstead
c191ced3f9
Fix issues with directional lights
2018-08-28 09:24:51 +01:00
Luke Benstead
acaecf49bc
Add a missing header
2018-08-27 21:35:15 +01:00
Luke Benstead
8b3bf5a579
Fix lighting wrapping
2018-08-27 21:35:07 +01:00
Luke Benstead
8ef04be966
Try to fix directional lights
2018-08-27 20:54:20 +01:00
Luke Benstead
0d0beface3
Fix up some extension aliasing
2018-08-26 19:29:46 +01:00
Luke Benstead
b29303fb6c
Implement glColorMaterial
2018-08-22 09:24:49 +01:00
Luke Benstead
21f8f9d855
Properly restore state after glEnd
2018-08-21 16:15:43 +01:00
Luke Benstead
9b0322ce8a
Properly restore enabled client state when using immediate mode
2018-08-21 16:08:06 +01:00
Luke Benstead
edae8a9166
Properly pop active client texture in immediate mode
2018-08-21 15:50:59 +01:00
Luke Benstead
25de48b3f6
Fix a bug where only one texture would bind
2018-08-21 15:50:41 +01:00
Luke Benstead
0d69740231
Fix a subtle bug in NamedArray (thanks @Chilly Willy!)
2018-08-21 15:50:27 +01:00
Luke Benstead
8b834ac3f1
Avoid an additional copy of every vertex. Fixes #22
2018-08-21 09:37:19 +01:00
Luke Benstead
bccd1aa788
Start refactoring the submission process
2018-08-20 21:19:12 +01:00
Luke Benstead
80c65d4aff
Remove conditional header sending, it's slightly slower
2018-08-20 20:34:11 +01:00
Luke Benstead
da97483eee
Switch to using 4-byte colours internally rather than floats
...
These are stored in BGRA format so they can be directly cast to a uint32_t to get the
correct format for the argb param in pvr_vertex_t (yay endianess)
This results in a performance improvement as it reduces the data requirements.
2018-08-20 09:28:30 +01:00
Luke Benstead
26bd8df37c
Fix some bugs with mipmaps + compressed textures
2018-08-20 08:34:54 +01:00
Luke Benstead
25e4518501
Performance optimisations
2018-08-19 21:10:42 +01:00
Luke Benstead
348e09b4aa
Further optimisations
2018-08-17 21:40:27 +01:00
Luke Benstead
d36469faaf
Start implementing a multitexture example
2018-08-17 07:09:53 +01:00
Luke Benstead
37ba9bf3c3
Mark mipmap levels as complete when generated
2018-08-16 17:53:39 +01:00
Luke Benstead
ba66608a96
Add a basic profiler and optimise some code
2018-08-16 17:51:15 +01:00
Luke Benstead
7d1b57fb12
Handle GL_RED -> GL_RED
2018-08-14 15:55:03 +01:00
Luke Benstead
021237f258
Fix a number of issues with texture loading
2018-08-14 09:49:31 +01:00
Luke Benstead
dca991ffe3
Fix a number of minor issues with textures
2018-08-13 09:19:16 +01:00
Luke Benstead
ea755b1650
Update README.md
2018-08-09 09:40:26 +01:00
Luke Benstead
e7cd91a91f
Try to match GL filtering with PVR filtering
2018-08-09 09:32:29 +01:00
Luke Benstead
5c190c1095
Implement glGenerateMipmapEXT
2018-08-09 08:56:43 +01:00
Luke Benstead
c6ba127bc9
Always allocate room for mipmaps
2018-08-08 16:50:09 +01:00
Luke Benstead
4c99dd740a
Add support for mipmapped compressed textures
2018-08-08 09:50:57 +01:00
Luke Benstead
b06f6116c8
Detect multiple mipmap levels being uploaded to glCompressedTexImage2D
2018-08-08 08:45:25 +01:00
Luke Benstead
86dd5dd2b2
glCompressedTexImage2D is an ARB extension in OpenGL 1.2.1
2018-08-07 20:49:10 +01:00
Luke Benstead
c40d3a007d
Implement support for GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB and GL_COMPRESSED_TEXTURE_FORMATS_ARB
2018-08-07 20:46:26 +01:00
Luke Benstead
b6cab2f0ca
Merge pull request #18 from Kazade/compressed-textures
...
Compressed textures
2018-08-07 20:38:19 +01:00
Luke Benstead
c5cb41f1f1
Fix the twiddled flag
2018-08-07 20:34:07 +01:00
Luke Benstead
16d949bfbc
Clean up compressed texture constants and code
2018-08-07 20:22:44 +01:00
Luke Benstead
0b91c20bbd
Add support for getting the max texture size
2018-08-07 08:45:24 +01:00
Luke Benstead
85d4bb5ec3
Fix directional lighting bug
2018-08-05 14:38:04 +01:00
Luke Benstead
582a29d267
Add glMultiTexCoord2fARB
2018-08-05 09:09:38 +01:00
Luke Benstead
6942e597f4
Untested multitexture implementation
2018-08-04 21:00:26 +01:00
Luke Benstead
db0d39d487
Cleanup lighting code a bit
2018-08-04 19:34:07 +01:00
Luke Benstead
59002546e6
Fix lighting
2018-08-03 14:08:01 +01:00
Luke Benstead
332475c340
Add quadmark sample
2018-08-02 20:13:45 +01:00
Luke Benstead
0bf023b8df
Fix a bug where headers weren't sent to a list
2018-08-02 19:56:50 +01:00
Luke Benstead
9371a8164f
Don't send headers unnecessarily
2018-08-01 20:41:59 +01:00
Luke Benstead
4716a6a0c0
Cleanups and optimisations
2018-08-01 17:57:31 +01:00
Luke Benstead
39ac10af00
Simplify colour handling
2018-08-01 12:00:56 +01:00
Luke Benstead
bebca59796
Allow toggling z clipping
2018-08-01 11:32:07 +01:00
Luke Benstead
31e666c77a
Implement support for GL_UNSIGNED_INT indices
2018-08-01 11:08:51 +01:00
Luke Benstead
8cc9e84cca
Add a (broken) terrain sample
2018-08-01 11:08:39 +01:00
Luke Benstead
47d3c0f478
Minor optimisations
2018-08-01 09:57:44 +01:00
Luke Benstead
02b4b2d438
Fix clipping errors when multiple strips submitted
2018-07-31 09:32:55 +01:00
Luke Benstead
a113722d82
Update the zclip_trianglestrip sample to show glitches
2018-07-16 17:25:30 +01:00
Luke Benstead
720206810d
Use a smaller near plane value (for now)
2018-07-16 09:01:11 +01:00
Luke Benstead
60c49f708e
Clip using the w coordinate
2018-07-16 08:42:15 +01:00
Luke Benstead
0d921c3504
Tweaks to clipping
2018-07-15 21:27:15 +01:00
Luke Benstead
8ef63c75af
'Fix' compiling on platforms other than the DC
2018-07-15 20:44:43 +01:00
Luke Benstead
9191c93cf6
Update README.md
2018-07-15 20:03:50 +01:00
Luke Benstead
7874f7862a
Merge pull request #16 from Kazade/near-z-v2
...
Implement near-z clipping
2018-07-15 19:54:34 +01:00