Commit Graph

54 Commits

Author SHA1 Message Date
Luke Benstead
957ebfa662 Fix texture twiddling 2019-03-11 19:14:30 +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
e4186a05bf Start working on a test for GL_ALPHA_TEST 2019-03-10 19:38:47 +00:00
Luke Benstead
1807a0119c Add some missing function stubs 2019-03-10 12:19:45 +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
516cae7893 Store palettes in RAM not VRAM 2019-03-08 21:36:53 +00:00
Luke Benstead
d7342fa0c0 Automatically twiddle non-twiddled palette data 2019-03-07 21:21:30 +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
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
111d4ca83e Handle calling glBindTexture on an unknown name 2019-02-27 20:45:53 +00:00
Luke Benstead
f6af3ab3fb Implement new conversion 2019-02-27 20:11:14 +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
6d2c47bda1 Implement GL_EXT_shared_texture_palette 2019-02-21 21:58:31 +00:00
Luke Benstead
571438ef4e Implement glColorTableEXT 2019-02-21 20:35:18 +00: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
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
55b3aa4ddd Fix up twiddled formats with alpha 2018-08-28 17:51:33 +01:00
Luke Benstead
b29303fb6c Implement glColorMaterial 2018-08-22 09:24:49 +01:00
Luke Benstead
26bd8df37c Fix some bugs with mipmaps + compressed textures 2018-08-20 08:34:54 +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
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
16d949bfbc Clean up compressed texture constants and code 2018-08-07 20:22:44 +01:00
Luke Benstead
a08ce4a06c Fix crash if glTexParameter was called when no texture bound 2018-05-28 07:16:40 +01:00