Commit Graph

84 Commits

Author SHA1 Message Date
Luke Benstead
cd71de76ee Add a readme 2018-05-16 21:50:05 +01:00
Luke Benstead
9e54126de7 Remove some old code 2018-05-16 21:43:56 +01:00
Luke Benstead
278ba01538 Fix up the makefile 2018-05-16 21:41:12 +01:00
Luke Benstead
2d9c439490 Implement normal matrix calculation 2018-05-16 21:30:11 +01:00
Luke Benstead
f9cdefcd81 Replace the entire matrix stack handling to work towards fixing lighting 2018-05-16 21:00:41 +01:00
Luke Benstead
4218111ab8 Make things C89 friendly 2018-05-14 17:10:53 +01:00
Luke Benstead
de1fb05ac1 Fix bugs in immediate mode 2018-05-14 16:58:58 +01:00
Luke Benstead
4106206562 Implement glMaterialfv 2018-05-13 19:48:55 +01:00
Luke Benstead
2cef0cb25e Implement glLightf 2018-05-13 09:34:44 +01:00
Luke Benstead
ab11a02056 Diffuse should be ignored if lighting is enabled 2018-05-13 09:00:38 +01:00
Luke Benstead
c76338b16f Add glNormalX, remove more dead code 2018-05-12 21:20:26 +01:00
Luke Benstead
97f4e020ad Rename experimental and update the Makefile 2018-05-12 21:06:22 +01:00
Luke Benstead
a09e05b01a More lighting work 2018-05-12 21:01:51 +01:00
Luke Benstead
4b8991e45f More immediate mode 2018-05-12 14:54:06 +01:00
Luke Benstead
146be442f4 Start reimplementing immediate mode and removing dead code 2018-05-12 14:39:20 +01:00
Luke Benstead
e96d379796 Stub out lighting functionality 2018-05-12 14:05:54 +01:00
Luke Benstead
62e001c288 Reimplement or refactor Texturing, State, and Drawing
Things working:
 - glDrawArrays / glDrawElements et al.
 - Texturing
 - Blending

Things missing:

 - Lighting
 - Multitexturing
 - Near Z-clipping
 - Framebuffer extension
 - Immediate mode
2018-05-11 15:39:28 +01:00
Luke Benstead
1356ae352c Begin experimental new renderig code 2018-05-05 20:38:55 +01:00
Luke Benstead
493c078b19 Replace the texture linked list with a new NamedArray container type 2018-05-02 09:31:24 +01:00
Luke Benstead
42d2a1e091 Refactor glTexImage2D and associated enums
- Enums now respect GLs defined ranges
- Short formats are now correctly supported
- Duplicated (and incorrect) enums removed
- New conversions supported
- Fixes a number of bugs
2018-05-01 09:07:09 +01:00
Luke Benstead
4653957c85 Make things compile under c99 2018-04-29 08:32:06 +01:00
Luke Benstead
2bff44ce6a Don't reset the client state when flushing arrays 2018-01-27 14:02:08 +00:00
Luke Benstead
bd80c9ae7f Add build and link targets to the makefile 2018-01-18 19:52:54 +00:00
Luke Benstead
3f364c6a12 Disable auto sorting features of PVR 2017-09-15 19:14:21 +01:00
Luke Benstead
100e6980a5 Move to a dynamically resizing vertex buffer 2017-09-15 13:11:10 +01:00
Luke Benstead
95b71c8291 Small cleanup 2017-09-15 10:21:17 +01:00
Luke Benstead
e616b0fb90 Remove the option for statically allocated buffers 2017-09-15 10:19:34 +01:00
Luke Benstead
ed05c5feb8 Make things a little more explicit in the depth write toggling 2017-09-14 19:43:33 +01:00
Luke Benstead
63aa2ec47c Check that textures are a power of two early rather than dying in PVR code 2017-07-23 21:11:29 +01:00
Luke Benstead
4bf579f7bc Replace custom glKosLightAmbientX functions with glLightModelfv 2017-07-23 18:58:57 +01:00
Luke Benstead
08417324eb Fix logging of glDrawElements errors 2017-07-22 21:19:10 +01:00
Luke Benstead
79b8e9af3c Simplify gl-error.c 2017-07-22 21:12:26 +01:00
Luke Benstead
6a4a6a157b Initialize KOS_GL_ERROR_CODE to zero 2017-07-22 17:40:53 +01:00
Luke Benstead
8a77a34a79 GL spec says that drawing without calling glEnableClientState(GL_VERTEX_ARRAY) is a no-op, not an error 2017-06-01 13:42:51 +01:00
Luke Benstead
c3a9877fdb Fix backface culling 2017-06-01 09:39:53 +01:00
Luke Benstead
824b7a64ab Fix a number of bugs with texture bindings 2017-06-01 09:32:28 +01:00
Luke Benstead
3a1f7d24d8 GLushort is required to store GL_CCW or GL_CW 2017-05-31 19:35:15 +01:00
Luke Benstead
1a80a70614 Implement gl(Enable|Disable)ClientState 2017-05-31 19:32:46 +01:00
Luke Benstead
f36fc72334 Default to CCW front faces 2017-05-31 19:22:38 +01:00
Luke Benstead
cdaee856cc Fix up normal stride 2017-05-31 14:34:43 +01:00
Luke Benstead
6829dcada4 Only enable multitexturing if a texture is bound to unit 1 2017-05-31 13:34:30 +01:00
Luke Benstead
1307f43bc5 Fix texture coordinate stride 2017-05-31 12:36:01 +01:00
Luke Benstead
5fef5546ee Take into account vertex stride when transforming positions 2017-05-31 11:17:55 +01:00
Luke Benstead
6aacdcf573 Fix start offset of glDrawArrays for colours and vertices 2017-05-31 11:12:34 +01:00
Luke Benstead
a51cedad79 Fix vertex stride 2017-05-31 11:07:28 +01:00
Luke Benstead
46b927fa8a Fix glColorPointer pointer arithmetic by using bytes consistently and properly calculating stride 2017-05-31 10:59:32 +01:00
Lawrence Sebald
a1185f3369 glIsEnabled(GL_CULL_FACE) should return the status of culling, not fog. 2017-05-23 09:11:52 -04:00
jlf65
c960b24f07 Handle change in texture parameters in glCompressedTexImage2D 2016-08-02 15:07:27 -06:00
jlf65
b897a2abad Handle change in texture parameters in glTexImage2D 2016-08-02 14:42:09 -06:00
Lawrence Sebald
30f408caa3 Fix a store-queue related issue in the primitive submission code.
The primitive list submission code in libgl never sets the QACR0 or QACR1
registers when it uses the store queues. Thus, if any other code accesses the
store queues, rendering may well grind to a halt.

This fixes the issue by setting QACR0 and QACR1 each frame.

Note: This solution is still not thread-safe. Of course, many GL implementations
are not thread-safe at all...
2016-07-02 23:37:04 -04:00