Commit Graph

19 Commits

Author SHA1 Message Date
fincs
bbe09c4265
Implement VRAM bank awareness for rendertarget allocations 2021-08-26 23:46:07 +02:00
fincs
6b6e9eef80 Fix C3D_TexShadowParams not updating TexStatus (reported by @wwylele) 2018-03-13 13:14:32 +01:00
fincs
8f3fda7986 Deprecate C3D_SafeXYZ functions & replace them with C3D_SyncXYZ 2017-12-01 17:46:14 +01:00
fincs
d24e404582 Properly validate dimensions in texture init 2017-12-01 17:46:14 +01:00
fincs
145cea4e89 Fix typo inside C3D_TexInitWithParams() 2017-05-27 13:01:50 +02:00
fincs
033c600e20 Remove counterintuitive NULL protection in texture code (fixes #31) 2017-02-15 17:42:23 +01:00
fincs
ac755aa3ec Add some shadow-related texture functions:
- C3D_TexShadowParams: configure GPUREG_TEXUNIT0_SHADOW
- C3D_TexInitShadow: create shadow map texture
- C3D_TexInitShadowCube: as above, but for shadow cubemaps
2017-02-14 19:40:07 +01:00
fincs
82b9eea410 Refactor GPUREG_TEXUNIT_CONFIG state (in preparation of future changes) 2017-02-14 18:40:58 +01:00
fincs
5c1d037fa2 Introduce framebuffer (light renderbuffer) infrastructure 2017-02-14 18:24:57 +01:00
fincs
15de0e300e Add support for cube textures, see below:
- Added C3D_TexCube structure for holding pointers to all 6 faces
- C3D_TexLoadImage accepts face number and mipmap level
- C3D_TexGenerateMipmap accepts face number
- Added functions (C3D_Tex*GetImagePtr) for accessing image data
- Now using GX to copy texture data to VRAM instead of failing
- Moved texunit setup code to texture.c
2017-02-12 00:14:04 +01:00
fincs
6ec42ae8a1 Calculate total mipmap texture size with geometric series formula 2017-02-11 18:29:41 +01:00
fincs
0fd245b171 Begin overhauling texture API, see details:
- Now supports multilevel data (LOD) used for mipmapping
- Basic mipmap generation (currently only for RGBA8 and RGB8 textures)
- Texture type can now be specified (TODO: support cube textures)
- Border color can also be specified now
- More flexibility in texture initialization parameters
2017-02-09 20:07:37 +01:00
Michael Theall
3ae31adab4 Add doxygen support 2017-02-09 19:45:33 +01:00
Thomas Edvalson
909bfc9174 Add ETC1 and ETC1A4 texture support 2016-05-03 02:41:05 -04:00
fincs
2cc0a08268 Add missing texture formats to fmtSize (fix #6) 2016-04-04 00:10:06 +02:00
fincs
209de933de Add C3D_TexInitVRAM 2015-11-28 15:51:07 +01:00
fincs
3e42b1a9a4 Adapt to the great-refactor libctru branch 2015-09-06 22:08:28 +02:00
fincs
6243cc830d Textures: micro-optimization 2015-07-23 22:22:28 +02:00
fincs
e7d0632224 Initial commit 2014-12-20 21:34:19 +01:00