Commit Graph

52 Commits

Author SHA1 Message Date
fincs
a382eeed2b Use framebuffers instead of renderbuffers in rendertargets, details:
- The color buffer is mandatory, and it can either be a simple buffer
  (whose allocation lifetime managed automatically by citro3d), or be
  linked to a texture
- The depth buffer is optional, and it can only be a simple buffer
- Added C3D_RenderTargetCreateFromTex
- Clear bits in C3D_RenderTargetSetClear now work properly
2017-02-14 18:34:14 +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
fincs
2a1dc2ba87 Added C3D_FragOpShadow() 2017-02-09 19:59:46 +01:00
fincs
73aea35120 Add bIsZBuffer parameter to C3D_DepthMap 2017-02-09 19:59:31 +01:00
fincs
a91889f5ba Added C3D_FrameRate() for controlling output framerate 2017-02-09 19:57:02 +01:00
Michael Theall
3ae31adab4 Add doxygen support 2017-02-09 19:45:33 +01:00
Thompson Lee
642545d2e2 Added Mtx_Add() and Mtx_Subtract(). (#28) 2016-09-12 00:23:21 +02:00
Thompson Lee
7960e832de Added Mtx_Diagonal(). (#27) 2016-09-11 23:40:10 +02:00
Thompson Lee
b32275ee94 Squashing all commits from the previous pull requests. #21, #22, and #23. (#26) 2016-08-30 21:18:37 +02:00
Thompson Lee
8a3982d625 Added Quat_FromPitchYawRoll() helper function. (#25)
Quickly converts pitch, yaw, and roll rotations to the Quaternion equivalent orientation, with optimized code.
2016-08-22 22:14:26 +02:00
Thompson Lee
ae0ce14c9d Enhancement: Mtx_Inverse() returns a non-zero determinant if the matrix passed in can be inverted, otherwise returns zero if the matrix is singular/degenerative. 2016-08-05 01:02:59 -05:00
Thompson Lee
59b0311f48 Minor Fixes series
- Added a missing @param[in].
- Added @mtheall 's Mtx_Multiply() enhancement.
2016-08-05 00:19:55 -05:00
mtheall
dc4d81eea9 More additions and enhancements to math code, see details (#19)
Added C3D_AngleFromDegrees
Added FVec4_PerspDivide
Added LH option for projections
2016-08-04 21:23:28 +02:00
Thompson Lee
dde8877f38 Left-handed and Right-handed Look-At Matrix functions (#17) 2016-08-04 12:43:33 +02:00
mtheall
766def30a3 Optimized matrix math (#15)
Added non-tilt projections
Added quaternions
Added test framework
Created logo
2016-08-04 11:33:18 +02:00
Thompson Lee
d7d5ba28a1 Added a Matrix Inverse Function (#14) 2016-07-31 13:20:36 +02:00
Thomas Edvalson
b0b46b7133 Make uniform matrix pointers const 2016-05-23 13:43:48 -04:00
fincs
a37648f42f Add renderqueue-safe versions of GX_DisplayTransfer/TextureCopy/MemoryFill 2016-03-26 00:30:43 +01:00
fincs
1e9e8ead11 Fix integer and boolean uniforms 2016-01-24 01:45:39 +01:00
fincs
7e30059573 Add C3D_ImmDrawRestartPrim 2016-01-19 22:33:04 +01:00
fincs
184fad0623 Add C3D_GetCmdBufUsage 2016-01-19 22:32:55 +01:00
fincs
39a71a5fbf Implement render queue system 2016-01-05 17:30:05 +01:00
fincs
959f250f4e Add C3D_BoolUnifSet, correct int/bool uniform IDs 2015-12-05 14:23:54 +01:00
fincs
c188bcf5df Add C3D_VideoSync() 2015-11-28 16:41:20 +01:00
fincs
ae4d9aba93 Generalize C3D_FVUnifMtx to support 2x4, 3x4 and 4x4 matrices 2015-11-28 16:25:23 +01:00
fincs
4814f804c6 Add missing fragment lighting functionality 2015-11-28 15:56:20 +01:00
fincs
912e9b152c Refactor renderbuffer code to create and use texture objects 2015-11-28 15:53:06 +01:00
fincs
209de933de Add C3D_TexInitVRAM 2015-11-28 15:51:07 +01:00
fincs
1fec391865 Correct C3D_SetScissor 2015-11-26 23:54:06 +01:00
fincs
cd39c3b8d1 Improve and correct support for light distance attenuation 2015-11-26 12:28:09 +01:00
fincs
497a4ff9b7 Add C3D_ColorLogicOp and C3D_FragOpMode 2015-11-25 22:02:16 +01:00
fincs
8992e6fd18 Actually implement fixed vertex attribute support 2015-11-22 17:47:33 +01:00
fincs
d93987403a Add support for immediate mode & fixed vertex attributes w/ example 2015-11-22 17:28:33 +01:00
fincs
a39ca9971d Remove old VBO/IBO code 2015-11-22 12:30:51 +01:00
fincs
447c5b05bb Add Mtx_PerspStereoTilt() for stereo 3D rendering 2015-09-16 13:29:48 +02:00
fincs
0922a64ed3 Add fragment light LUT support 2015-09-15 23:02:35 +02:00
fincs
133d10c629 Some corrections, fragment lighting still not working 2015-09-14 17:00:58 +02:00
fincs
53cf76feac Begin implementing fragment lighting functionality 2015-09-13 23:27:38 +02:00
fincs
b2584cb71a Add some missing TexEnv functionality 2015-09-10 13:47:16 +02:00
fincs
f7d344843e Simply uniform set code in example 2015-09-09 17:21:40 +02:00
fincs
60df9ed7d6 Add textured_cube example (a ported libctru example) 2015-09-09 01:14:20 +02:00
fincs
f640360108 Decouple attribute and buffer management 2015-09-07 14:47:20 +02:00
fincs
a8ce19c3b5 Updates for latest libctru and picasso 2015-08-23 18:54:44 +02:00
fincs
6243cc830d Textures: micro-optimization 2015-07-23 22:22:28 +02:00
fincs
d4971ddca5 Use APT hooks to restore GPU state when returning from homemenu 2015-06-27 19:17:50 +02:00
fincs
153f01e741 Add Render Buffer API + Viewport/Scissor + Update Example 2015-03-07 23:41:32 +01:00
fincs
87d4751a87 C3D_DepthRange() -> C3D_DepthMap() 2015-03-07 17:02:38 +01:00