diff --git a/docs/html/annotated.html b/docs/html/annotated.html new file mode 100644 index 0000000..bbe75d7 --- /dev/null +++ b/docs/html/annotated.html @@ -0,0 +1,112 @@ + + + + + + + +Citro3d: Class List + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + +
 CC3D_Context
 CC3D_Effect
 CTex3DS_Texture_sTex3DS texture
 CTex3DSi_SubTexture
+
+
+
+ + + + diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js new file mode 100644 index 0000000..988751a --- /dev/null +++ b/docs/html/annotated_dup.js @@ -0,0 +1,7 @@ +var annotated_dup = +[ + [ "C3D_Context", "struct_c3_d___context.html", "struct_c3_d___context" ], + [ "C3D_Effect", "struct_c3_d___effect.html", "struct_c3_d___effect" ], + [ "Tex3DS_Texture_s", "struct_tex3_d_s___texture__s.html", "struct_tex3_d_s___texture__s" ], + [ "Tex3DSi_SubTexture", "struct_tex3_d_si___sub_texture.html", "struct_tex3_d_si___sub_texture" ] +]; \ No newline at end of file diff --git a/docs/html/attribs_8c.html b/docs/html/attribs_8c.html new file mode 100644 index 0000000..5390d5b --- /dev/null +++ b/docs/html/attribs_8c.html @@ -0,0 +1,280 @@ + + + + + + + +Citro3d: source/attribs.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
attribs.c File Reference
+
+
+
#include "internal.h"
+#include <c3d/attribs.h>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

void AttrInfo_Init (C3D_AttrInfo *info)
 
int AttrInfo_AddLoader (C3D_AttrInfo *info, int regId, GPU_FORMATS format, int count)
 
int AttrInfo_AddFixed (C3D_AttrInfo *info, int regId)
 
C3D_AttrInfo * C3D_GetAttrInfo (void)
 
void C3D_SetAttrInfo (C3D_AttrInfo *info)
 
void C3Di_AttrInfoBind (C3D_AttrInfo *info)
 
+

Function Documentation

+ +

◆ AttrInfo_AddFixed()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int AttrInfo_AddFixed (C3D_AttrInfo * info,
int regId 
)
+
+ +

Definition at line 25 of file attribs.c.

+ +
+
+ +

◆ AttrInfo_AddLoader()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int AttrInfo_AddLoader (C3D_AttrInfo * info,
int regId,
GPU_FORMATS format,
int count 
)
+
+ +

Definition at line 10 of file attribs.c.

+ +
+
+ +

◆ AttrInfo_Init()

+ +
+
+ + + + + + + + +
void AttrInfo_Init (C3D_AttrInfo * info)
+
+ +

Definition at line 4 of file attribs.c.

+ +
+
+ +

◆ C3D_GetAttrInfo()

+ +
+
+ + + + + + + + +
C3D_AttrInfo * C3D_GetAttrInfo (void )
+
+ +

Definition at line 36 of file attribs.c.

+ +
+
+ +

◆ C3D_SetAttrInfo()

+ +
+
+ + + + + + + + +
void C3D_SetAttrInfo (C3D_AttrInfo * info)
+
+ +

Definition at line 47 of file attribs.c.

+ +
+
+ +

◆ C3Di_AttrInfoBind()

+ +
+
+ + + + + + + + +
void C3Di_AttrInfoBind (C3D_AttrInfo * info)
+
+ +

Definition at line 59 of file attribs.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/attribs_8c.js b/docs/html/attribs_8c.js new file mode 100644 index 0000000..d76c09d --- /dev/null +++ b/docs/html/attribs_8c.js @@ -0,0 +1,9 @@ +var attribs_8c = +[ + [ "AttrInfo_AddFixed", "attribs_8c.html#a7ef5c674515715bc56c3d585ba3e729d", null ], + [ "AttrInfo_AddLoader", "attribs_8c.html#a4e2e4bdce8a218aa36b168e61a081c21", null ], + [ "AttrInfo_Init", "attribs_8c.html#aa0f970274110d97b21d52d89bd7d0ba5", null ], + [ "C3D_GetAttrInfo", "attribs_8c.html#ad0410a84631efa152a0e122c9b7deb1b", null ], + [ "C3D_SetAttrInfo", "attribs_8c.html#a6b5dbb56e3874447d62ca53182cf7795", null ], + [ "C3Di_AttrInfoBind", "attribs_8c.html#ac600ec36cc12c6473e0574f38ce2a6ef", null ] +]; \ No newline at end of file diff --git a/docs/html/attribs_8c_source.html b/docs/html/attribs_8c_source.html new file mode 100644 index 0000000..d870620 --- /dev/null +++ b/docs/html/attribs_8c_source.html @@ -0,0 +1,183 @@ + + + + + + + +Citro3d: source/attribs.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
attribs.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2#include <c3d/attribs.h>
+
3
+
4void AttrInfo_Init(C3D_AttrInfo* info)
+
5{
+
6 memset(info, 0, sizeof(*info));
+
7 info->flags[1] = 0xFFF << 16;
+
8}
+
9
+
10int AttrInfo_AddLoader(C3D_AttrInfo* info, int regId, GPU_FORMATS format, int count)
+
11{
+
12 if (info->attrCount == 12) return -1;
+
13 int id = info->attrCount++;
+
14 if (regId < 0) regId = id;
+
15 if (id < 8)
+
16 info->flags[0] |= GPU_ATTRIBFMT(id, count, format);
+
17 else
+
18 info->flags[1] |= GPU_ATTRIBFMT(id-8, count, format);
+
19
+
20 info->flags[1] = (info->flags[1] &~ (0xF0000000 | BIT(id+16))) | (id << 28);
+
21 info->permutation |= regId << (id*4);
+
22 return id;
+
23}
+
24
+
25int AttrInfo_AddFixed(C3D_AttrInfo* info, int regId)
+
26{
+
27 if (info->attrCount == 12) return -1;
+
28 int id = info->attrCount++;
+
29 if (regId < 0) regId = id;
+
30
+
31 info->flags[1] = (info->flags[1] &~ 0xF0000000) | (id << 28);
+
32 info->permutation |= regId << (id*4);
+
33 return id;
+
34}
+
35
+
36C3D_AttrInfo* C3D_GetAttrInfo(void)
+
37{
+
38 C3D_Context* ctx = C3Di_GetContext();
+
39
+
40 if (!(ctx->flags & C3DiF_Active))
+
41 return NULL;
+
42
+
43 ctx->flags |= C3DiF_AttrInfo;
+
44 return &ctx->attrInfo;
+
45}
+
46
+
47void C3D_SetAttrInfo(C3D_AttrInfo* info)
+
48{
+
49 C3D_Context* ctx = C3Di_GetContext();
+
50
+
51 if (!(ctx->flags & C3DiF_Active))
+
52 return;
+
53
+
54 if (info != &ctx->attrInfo)
+
55 memcpy(&ctx->attrInfo, info, sizeof(*info));
+
56 ctx->flags |= C3DiF_AttrInfo;
+
57}
+
58
+
59void C3Di_AttrInfoBind(C3D_AttrInfo* info)
+
60{
+
61 GPUCMD_AddIncrementalWrites(GPUREG_ATTRIBBUFFERS_FORMAT_LOW, (u32*)info->flags, sizeof(info->flags)/sizeof(u32));
+
62 GPUCMD_AddMaskedWrite(GPUREG_VSH_INPUTBUFFER_CONFIG, 0xB, 0xA0000000 | (info->attrCount - 1));
+
63 GPUCMD_AddWrite(GPUREG_VSH_NUM_ATTR, info->attrCount - 1);
+
64 GPUCMD_AddIncrementalWrites(GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW, (u32*)&info->permutation, 2);
+
65}
+
int AttrInfo_AddLoader(C3D_AttrInfo *info, int regId, GPU_FORMATS format, int count)
Definition: attribs.c:10
+
void C3D_SetAttrInfo(C3D_AttrInfo *info)
Definition: attribs.c:47
+
int AttrInfo_AddFixed(C3D_AttrInfo *info, int regId)
Definition: attribs.c:25
+
void AttrInfo_Init(C3D_AttrInfo *info)
Definition: attribs.c:4
+
void C3Di_AttrInfoBind(C3D_AttrInfo *info)
Definition: attribs.c:59
+
C3D_AttrInfo * C3D_GetAttrInfo(void)
Definition: attribs.c:36
+ +
@ C3DiF_AttrInfo
Definition: internal.h:77
+
@ C3DiF_Active
Definition: internal.h:75
+ +
u32 flags
Definition: internal.h:38
+
C3D_AttrInfo attrInfo
Definition: internal.h:41
+
int count
Definition: uniforms.c:15
+
+
+ + + + diff --git a/docs/html/base_8c.html b/docs/html/base_8c.html new file mode 100644 index 0000000..3e61451 --- /dev/null +++ b/docs/html/base_8c.html @@ -0,0 +1,422 @@ + + + + + + + +Citro3d: source/base.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
base.c File Reference
+
+
+
#include "internal.h"
+#include <stdlib.h>
+#include <c3d/base.h>
+#include <c3d/effect.h>
+#include <c3d/uniforms.h>
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + +

+Functions

 __attribute__ ((weak))
 
bool C3D_Init (size_t cmdBufSize)
 
void C3D_SetViewport (u32 x, u32 y, u32 w, u32 h)
 
void C3D_SetScissor (GPU_SCISSORMODE mode, u32 left, u32 top, u32 right, u32 bottom)
 
void C3Di_UpdateContext (void)
 
bool C3Di_SplitFrame (u32 **pBuf, u32 *pSize)
 
float C3D_GetCmdBufUsage (void)
 
void C3D_Fini (void)
 
void C3D_BindProgram (shaderProgram_s *program)
 
C3D_FVec * C3D_FixedAttribGetWritePtr (int id)
 
+ + + +

+Variables

C3D_Context __C3D_Context
 
+

Function Documentation

+ +

◆ __attribute__()

+ +
+
+ + + + + + + + +
__attribute__ ((weak) )
+
+ +

Definition at line 11 of file base.c.

+ +
+
+ +

◆ C3D_BindProgram()

+ +
+
+ + + + + + + + +
void C3D_BindProgram (shaderProgram_s * program)
+
+ +

Definition at line 349 of file base.c.

+ +
+
+ +

◆ C3D_Fini()

+ +
+
+ + + + + + + + +
void C3D_Fini (void )
+
+ +

Definition at line 335 of file base.c.

+ +
+
+ +

◆ C3D_FixedAttribGetWritePtr()

+ +
+
+ + + + + + + + +
C3D_FVec * C3D_FixedAttribGetWritePtr (int id)
+
+ +

Definition at line 389 of file base.c.

+ +
+
+ +

◆ C3D_GetCmdBufUsage()

+ +
+
+ + + + + + + + +
float C3D_GetCmdBufUsage (void )
+
+ +

Definition at line 330 of file base.c.

+ +
+
+ +

◆ C3D_Init()

+ +
+
+ + + + + + + + +
bool C3D_Init (size_t cmdBufSize)
+
+ +

Definition at line 76 of file base.c.

+ +
+
+ +

◆ C3D_SetScissor()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_SetScissor (GPU_SCISSORMODE mode,
u32 left,
u32 top,
u32 right,
u32 bottom 
)
+
+ +

Definition at line 148 of file base.c.

+ +
+
+ +

◆ C3D_SetViewport()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_SetViewport (u32 x,
u32 y,
u32 w,
u32 h 
)
+
+ +

Definition at line 136 of file base.c.

+ +
+
+ +

◆ C3Di_SplitFrame()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool C3Di_SplitFrame (u32 ** pBuf,
u32 * pSize 
)
+
+ +

Definition at line 309 of file base.c.

+ +
+
+ +

◆ C3Di_UpdateContext()

+ +
+
+ + + + + + + + +
void C3Di_UpdateContext (void )
+
+ +

Definition at line 158 of file base.c.

+ +
+
+

Variable Documentation

+ +

◆ __C3D_Context

+ +
+
+ + + + +
C3D_Context __C3D_Context
+
+ +

Definition at line 7 of file base.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/base_8c.js b/docs/html/base_8c.js new file mode 100644 index 0000000..70118f2 --- /dev/null +++ b/docs/html/base_8c.js @@ -0,0 +1,14 @@ +var base_8c = +[ + [ "__attribute__", "base_8c.html#af9aace1b44b73111e15aa39f06f43456", null ], + [ "C3D_BindProgram", "base_8c.html#a46a4b1c8578240f5f303e18e99d97af1", null ], + [ "C3D_Fini", "base_8c.html#af09c99c8398f086e77bbdbf618e32df6", null ], + [ "C3D_FixedAttribGetWritePtr", "base_8c.html#aa7d62486a2373a05fb5e66859589f800", null ], + [ "C3D_GetCmdBufUsage", "base_8c.html#aedb07e1e24a9a95654bef448a8067a3b", null ], + [ "C3D_Init", "base_8c.html#adec4fb78c37b9f9b5a23e95d0c6ed48e", null ], + [ "C3D_SetScissor", "base_8c.html#ad1dc1878d090a2a8946e40265b56fecc", null ], + [ "C3D_SetViewport", "base_8c.html#af0c625289847e014e5045cd61218a559", null ], + [ "C3Di_SplitFrame", "base_8c.html#a139aee1e5943be7dfb22a011f6057689", null ], + [ "C3Di_UpdateContext", "base_8c.html#a4cfecbe235841f7d41495a8dc6b15c32", null ], + [ "__C3D_Context", "base_8c.html#a9a995e066df9295b40179eb0d2b8fe01", null ] +]; \ No newline at end of file diff --git a/docs/html/base_8c_source.html b/docs/html/base_8c_source.html new file mode 100644 index 0000000..0d2212f --- /dev/null +++ b/docs/html/base_8c_source.html @@ -0,0 +1,606 @@ + + + + + + + +Citro3d: source/base.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
base.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2#include <stdlib.h>
+
3#include <c3d/base.h>
+
4#include <c3d/effect.h>
+
5#include <c3d/uniforms.h>
+
6
+ +
8
+
9static aptHookCookie hookCookie;
+
10
+
11__attribute__((weak)) void C3Di_LightEnvUpdate(C3D_LightEnv* env)
+
12{
+
13 (void)env;
+
14}
+
15
+
16__attribute__((weak)) void C3Di_LightEnvDirty(C3D_LightEnv* env)
+
17{
+
18 (void)env;
+
19}
+
20
+ +
22{
+
23 (void)ctx;
+
24}
+
25
+ +
27{
+
28 (void)ctx;
+
29}
+
30
+ +
32{
+
33 (void)ctx;
+
34}
+
35
+
36static void C3Di_AptEventHook(APT_HookType hookType, C3D_UNUSED void* param)
+
37{
+
38 C3D_Context* ctx = C3Di_GetContext();
+
39
+
40 switch (hookType)
+
41 {
+
42 case APTHOOK_ONSUSPEND:
+
43 {
+ + +
46 break;
+
47 }
+
48 case APTHOOK_ONRESTORE:
+
49 {
+ + + + +
54
+
55 C3Di_DirtyUniforms(GPU_VERTEX_SHADER);
+
56 C3Di_DirtyUniforms(GPU_GEOMETRY_SHADER);
+
57
+ + +
60
+
61 C3D_LightEnv* env = ctx->lightEnv;
+
62 if (ctx->fogLut)
+
63 ctx->flags |= C3DiF_FogLut;
+
64 if (ctx->gasLut)
+
65 ctx->flags |= C3DiF_GasLut;
+
66 if (env)
+ + +
69 break;
+
70 }
+
71 default:
+
72 break;
+
73 }
+
74}
+
75
+
76bool C3D_Init(size_t cmdBufSize)
+
77{
+
78 int i;
+
79 C3D_Context* ctx = C3Di_GetContext();
+
80
+
81 if (ctx->flags & C3DiF_Active)
+
82 return false;
+
83
+
84 cmdBufSize = (cmdBufSize + 0xF) &~ 0xF; // 0x10-byte align
+
85 ctx->cmdBufSize = cmdBufSize/4;
+
86 ctx->cmdBuf = (u32*)linearAlloc(cmdBufSize);
+
87 ctx->cmdBufUsage = 0;
+
88 if (!ctx->cmdBuf)
+
89 return false;
+
90
+
91 ctx->gxQueue.maxEntries = 32;
+
92 ctx->gxQueue.entries = (gxCmdEntry_s*)malloc(ctx->gxQueue.maxEntries*sizeof(gxCmdEntry_s));
+
93 if (!ctx->gxQueue.entries)
+
94 {
+
95 linearFree(ctx->cmdBuf);
+
96 return false;
+
97 }
+
98
+ +
100
+
101 // TODO: replace with direct struct access
+
102 C3D_DepthMap(true, -1.0f, 0.0f);
+
103 C3D_CullFace(GPU_CULL_BACK_CCW);
+
104 C3D_StencilTest(false, GPU_ALWAYS, 0x00, 0xFF, 0x00);
+
105 C3D_StencilOp(GPU_STENCIL_KEEP, GPU_STENCIL_KEEP, GPU_STENCIL_KEEP);
+ +
107 C3D_EarlyDepthTest(false, GPU_EARLYDEPTH_GREATER, 0);
+
108 C3D_DepthTest(true, GPU_GREATER, GPU_WRITE_ALL);
+
109 C3D_AlphaTest(false, GPU_ALWAYS, 0x00);
+
110 C3D_AlphaBlend(GPU_BLEND_ADD, GPU_BLEND_ADD, GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA);
+
111 C3D_FragOpMode(GPU_FRAGOPMODE_GL);
+
112 C3D_FragOpShadow(0.0, 1.0);
+
113
+
114 ctx->texConfig = BIT(12);
+
115 ctx->texShadow = BIT(0);
+
116 ctx->texEnvBuf = 0;
+
117 ctx->texEnvBufClr = 0xFFFFFFFF;
+
118 ctx->fogClr = 0;
+
119 ctx->fogLut = NULL;
+
120
+
121 for (i = 0; i < 3; i ++)
+
122 ctx->tex[i] = NULL;
+
123
+
124 for (i = 0; i < 6; i ++)
+
125 C3D_TexEnvInit(&ctx->texEnv[i]);
+
126
+
127 ctx->fixedAttribDirty = 0;
+
128 ctx->fixedAttribEverDirty = 0;
+
129
+ +
131 aptHook(&hookCookie, C3Di_AptEventHook, NULL);
+
132
+
133 return true;
+
134}
+
135
+
136void C3D_SetViewport(u32 x, u32 y, u32 w, u32 h)
+
137{
+
138 C3D_Context* ctx = C3Di_GetContext();
+ +
140 ctx->viewport[0] = f32tof24(w / 2.0f);
+
141 ctx->viewport[1] = f32tof31(2.0f / w) << 1;
+
142 ctx->viewport[2] = f32tof24(h / 2.0f);
+
143 ctx->viewport[3] = f32tof31(2.0f / h) << 1;
+
144 ctx->viewport[4] = (y << 16) | (x & 0xFFFF);
+
145 ctx->scissor[0] = GPU_SCISSOR_DISABLE;
+
146}
+
147
+
148void C3D_SetScissor(GPU_SCISSORMODE mode, u32 left, u32 top, u32 right, u32 bottom)
+
149{
+
150 C3D_Context* ctx = C3Di_GetContext();
+
151 ctx->flags |= C3DiF_Scissor;
+
152 ctx->scissor[0] = mode;
+
153 if (mode == GPU_SCISSOR_DISABLE) return;
+
154 ctx->scissor[1] = (top << 16) | (left & 0xFFFF);
+
155 ctx->scissor[2] = ((bottom-1) << 16) | ((right-1) & 0xFFFF);
+
156}
+
157
+ +
159{
+
160 int i;
+
161 C3D_Context* ctx = C3Di_GetContext();
+
162
+
163 if (ctx->flags & C3DiF_FrameBuf)
+
164 {
+
165 ctx->flags &= ~C3DiF_FrameBuf;
+
166 if (ctx->flags & C3DiF_DrawUsed)
+
167 {
+
168 ctx->flags &= ~C3DiF_DrawUsed;
+
169 GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_FLUSH, 1);
+
170 GPUCMD_AddWrite(GPUREG_EARLYDEPTH_CLEAR, 1);
+
171 }
+
172 C3Di_FrameBufBind(&ctx->fb);
+
173 }
+
174
+
175 if (ctx->flags & C3DiF_Viewport)
+
176 {
+
177 ctx->flags &= ~C3DiF_Viewport;
+
178 GPUCMD_AddIncrementalWrites(GPUREG_VIEWPORT_WIDTH, ctx->viewport, 4);
+
179 GPUCMD_AddWrite(GPUREG_VIEWPORT_XY, ctx->viewport[4]);
+
180 }
+
181
+
182 if (ctx->flags & C3DiF_Scissor)
+
183 {
+
184 ctx->flags &= ~C3DiF_Scissor;
+
185 GPUCMD_AddIncrementalWrites(GPUREG_SCISSORTEST_MODE, ctx->scissor, 3);
+
186 }
+
187
+
188 if (ctx->flags & C3DiF_Program)
+
189 {
+
190 shaderProgramConfigure(ctx->program, (ctx->flags & C3DiF_VshCode) != 0, (ctx->flags & C3DiF_GshCode) != 0);
+ +
192 }
+
193
+
194 if (ctx->flags & C3DiF_AttrInfo)
+
195 {
+
196 ctx->flags &= ~C3DiF_AttrInfo;
+ +
198 }
+
199
+
200 if (ctx->flags & C3DiF_BufInfo)
+
201 {
+
202 ctx->flags &= ~C3DiF_BufInfo;
+ +
204 }
+
205
+
206 if (ctx->flags & C3DiF_Effect)
+
207 {
+
208 ctx->flags &= ~C3DiF_Effect;
+
209 C3Di_EffectBind(&ctx->effect);
+
210 }
+
211
+
212 if (ctx->flags & C3DiF_TexAll)
+
213 {
+
214 u32 units = 0;
+
215 for (i = 0; i < 3; i ++)
+
216 {
+
217 if (ctx->tex[i])
+
218 {
+
219 units |= BIT(i);
+
220 if (ctx->flags & C3DiF_Tex(i))
+
221 C3Di_SetTex(i, ctx->tex[i]);
+
222 }
+
223 }
+
224
+
225 // Enable texture units and clear texture cache
+
226 ctx->texConfig &= ~7;
+
227 ctx->texConfig |= units | BIT(16);
+
228 ctx->flags &= ~C3DiF_TexAll;
+
229 ctx->flags |= C3DiF_TexStatus;
+
230 }
+
231
+
232 if (ctx->flags & C3DiF_TexStatus)
+
233 {
+
234 ctx->flags &= ~C3DiF_TexStatus;
+
235 GPUCMD_AddMaskedWrite(GPUREG_TEXUNIT_CONFIG, 0xB, ctx->texConfig);
+
236 // Clear texture cache if requested *after* configuring texture units
+
237 if (ctx->texConfig & BIT(16))
+
238 {
+
239 ctx->texConfig &= ~BIT(16);
+
240 GPUCMD_AddMaskedWrite(GPUREG_TEXUNIT_CONFIG, 0x4, BIT(16));
+
241 }
+
242 GPUCMD_AddWrite(GPUREG_TEXUNIT0_SHADOW, ctx->texShadow);
+
243 }
+
244
+ + +
247
+
248 if (ctx->flags & C3DiF_TexEnvBuf)
+
249 {
+
250 ctx->flags &= ~C3DiF_TexEnvBuf;
+
251 GPUCMD_AddMaskedWrite(GPUREG_TEXENV_UPDATE_BUFFER, 0x7, ctx->texEnvBuf);
+
252 GPUCMD_AddWrite(GPUREG_TEXENV_BUFFER_COLOR, ctx->texEnvBufClr);
+
253 GPUCMD_AddWrite(GPUREG_FOG_COLOR, ctx->fogClr);
+
254 }
+
255
+
256 if ((ctx->flags & C3DiF_FogLut) && (ctx->texEnvBuf&7) != GPU_NO_FOG)
+
257 {
+
258 ctx->flags &= ~C3DiF_FogLut;
+
259 if (ctx->fogLut)
+
260 {
+
261 GPUCMD_AddWrite(GPUREG_FOG_LUT_INDEX, 0);
+
262 GPUCMD_AddWrites(GPUREG_FOG_LUT_DATA0, ctx->fogLut->data, 128);
+
263 }
+
264 }
+
265
+
266 if ((ctx->texEnvBuf&7) == GPU_GAS)
+
267 C3Di_GasUpdate(ctx);
+
268
+
269 if (ctx->flags & C3DiF_TexEnvAll)
+
270 {
+
271 for (i = 0; i < 6; i ++)
+
272 {
+
273 if (!(ctx->flags & C3DiF_TexEnv(i))) continue;
+
274 C3Di_TexEnvBind(i, &ctx->texEnv[i]);
+
275 }
+
276 ctx->flags &= ~C3DiF_TexEnvAll;
+
277 }
+
278
+
279 C3D_LightEnv* env = ctx->lightEnv;
+
280
+
281 if (ctx->flags & C3DiF_LightEnv)
+
282 {
+
283 u32 enable = env != NULL;
+
284 GPUCMD_AddWrite(GPUREG_LIGHTING_ENABLE0, enable);
+
285 GPUCMD_AddWrite(GPUREG_LIGHTING_ENABLE1, !enable);
+
286 ctx->flags &= ~C3DiF_LightEnv;
+
287 }
+
288
+
289 if (env)
+ +
291
+
292 if (ctx->fixedAttribDirty)
+
293 {
+
294 for (i = 0; i < 12; i ++)
+
295 {
+
296 if (!(ctx->fixedAttribDirty & BIT(i))) continue;
+
297 C3D_FVec* v = &ctx->fixedAttribs[i];
+
298
+
299 GPUCMD_AddWrite(GPUREG_FIXEDATTRIB_INDEX, i);
+
300 C3D_ImmSendAttrib(v->x, v->y, v->z, v->w);
+
301 }
+
302 ctx->fixedAttribDirty = 0;
+
303 }
+
304
+
305 C3D_UpdateUniforms(GPU_VERTEX_SHADER);
+
306 C3D_UpdateUniforms(GPU_GEOMETRY_SHADER);
+
307}
+
308
+
309bool C3Di_SplitFrame(u32** pBuf, u32* pSize)
+
310{
+
311 C3D_Context* ctx = C3Di_GetContext();
+
312
+
313 if (!gpuCmdBufOffset)
+
314 return false; // Nothing was drawn
+
315
+
316 if (ctx->flags & C3DiF_DrawUsed)
+
317 {
+
318 ctx->flags &= ~C3DiF_DrawUsed;
+
319 GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_FLUSH, 1);
+
320 GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 1);
+
321 GPUCMD_AddWrite(GPUREG_EARLYDEPTH_CLEAR, 1);
+
322 }
+
323
+
324 GPUCMD_Split(pBuf, pSize);
+
325 u32 totalCmdBufSize = *pBuf + *pSize - ctx->cmdBuf;
+
326 ctx->cmdBufUsage = (float)totalCmdBufSize / ctx->cmdBufSize;
+
327 return true;
+
328}
+
329
+ +
331{
+
332 return C3Di_GetContext()->cmdBufUsage;
+
333}
+
334
+
335void C3D_Fini(void)
+
336{
+
337 C3D_Context* ctx = C3Di_GetContext();
+
338
+
339 if (!(ctx->flags & C3DiF_Active))
+
340 return;
+
341
+
342 aptUnhook(&hookCookie);
+ +
344 free(ctx->gxQueue.entries);
+
345 linearFree(ctx->cmdBuf);
+
346 ctx->flags = 0;
+
347}
+
348
+
349void C3D_BindProgram(shaderProgram_s* program)
+
350{
+
351 C3D_Context* ctx = C3Di_GetContext();
+
352
+
353 if (!(ctx->flags & C3DiF_Active))
+
354 return;
+
355
+
356 shaderProgram_s* oldProg = ctx->program;
+
357 shaderInstance_s* newGsh = program->geometryShader;
+
358 if (oldProg != program)
+
359 {
+
360 ctx->program = program;
+ +
362
+
363 if (!oldProg)
+ +
365 else
+
366 {
+
367 shaderInstance_s* oldGsh = oldProg->geometryShader;
+
368
+
369 DVLP_s* oldProgV = oldProg->vertexShader->dvle->dvlp;
+
370 DVLP_s* oldProgG = oldGsh ? oldGsh->dvle->dvlp : oldProgV;
+
371
+
372 DVLP_s* newProgV = program->vertexShader->dvle->dvlp;
+
373 DVLP_s* newProgG = newGsh ? newGsh->dvle->dvlp : newProgV;
+
374
+
375 if (oldProgV != newProgV || (!newGsh && oldProgG != newProgG))
+
376 ctx->flags |= C3DiF_VshCode;
+
377 if (oldProgG != newProgG || (newProgG==oldProgV && newProgG->codeSize >= 512))
+
378 ctx->flags |= C3DiF_GshCode;
+
379 }
+
380 }
+
381
+
382 C3Di_LoadShaderUniforms(program->vertexShader);
+
383 if (newGsh)
+ +
385 else
+
386 C3Di_ClearShaderUniforms(GPU_GEOMETRY_SHADER);
+
387}
+
388
+ +
390{
+
391 if (id < 0 || id >= 12)
+
392 return NULL;
+
393
+
394 C3D_Context* ctx = C3Di_GetContext();
+
395
+
396 if (!(ctx->flags & C3DiF_Active))
+
397 return NULL;
+
398
+
399 ctx->fixedAttribDirty |= BIT(id);
+
400 ctx->fixedAttribEverDirty |= BIT(id);
+
401 return &ctx->fixedAttribs[id];
+
402}
+
void C3Di_AttrInfoBind(C3D_AttrInfo *info)
Definition: attribs.c:59
+
bool C3Di_SplitFrame(u32 **pBuf, u32 *pSize)
Definition: base.c:309
+
void C3D_BindProgram(shaderProgram_s *program)
Definition: base.c:349
+
void C3Di_UpdateContext(void)
Definition: base.c:158
+
C3D_Context __C3D_Context
Definition: base.c:7
+
C3D_FVec * C3D_FixedAttribGetWritePtr(int id)
Definition: base.c:389
+
void C3D_SetScissor(GPU_SCISSORMODE mode, u32 left, u32 top, u32 right, u32 bottom)
Definition: base.c:148
+
bool C3D_Init(size_t cmdBufSize)
Definition: base.c:76
+
float C3D_GetCmdBufUsage(void)
Definition: base.c:330
+
void C3D_Fini(void)
Definition: base.c:335
+
void C3D_SetViewport(u32 x, u32 y, u32 w, u32 h)
Definition: base.c:136
+
__attribute__((weak))
Definition: base.c:11
+
void C3Di_BufInfoBind(C3D_BufInfo *info)
Definition: buffers.c:49
+
void C3D_DepthMap(bool bIsZBuffer, float zScale, float zOffset)
Definition: effect.c:10
+
void C3D_AlphaTest(bool enable, GPU_TESTFUNC function, int ref)
Definition: effect.c:56
+
void C3Di_EffectBind(C3D_Effect *e)
Definition: effect.c:90
+
void C3D_CullFace(GPU_CULLMODE mode)
Definition: effect.c:18
+
void C3D_FragOpMode(GPU_FRAGOPMODE mode)
Definition: effect.c:77
+
void C3D_StencilTest(bool enable, GPU_TESTFUNC function, int ref, int inputMask, int writeMask)
Definition: effect.c:24
+
void C3D_FragOpShadow(float scale, float bias)
Definition: effect.c:84
+
void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
Definition: effect.c:30
+
void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha)
Definition: effect.c:62
+
void C3D_BlendingColor(u32 color)
Definition: effect.c:36
+
void C3D_DepthTest(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
Definition: effect.c:50
+
void C3D_EarlyDepthTest(bool enable, GPU_EARLYDEPTHFUNC function, u32 ref)
Definition: effect.c:42
+
void C3Di_FrameBufBind(C3D_FrameBuf *fb)
Definition: framebuffer.c:49
+
void C3Di_GasUpdate(C3D_Context *ctx)
Definition: gas.c:153
+
void C3D_ImmSendAttrib(float x, float y, float z, float w)
Definition: immediate.c:28
+ +
@ C3DiF_Gas
Definition: internal.h:92
+
@ C3DiF_AttrInfo
Definition: internal.h:77
+
@ C3DiF_TexAll
Definition: internal.h:98
+
@ C3DiF_Scissor
Definition: internal.h:82
+
@ C3DiF_VshCode
Definition: internal.h:86
+
@ C3DiF_Effect
Definition: internal.h:79
+
@ C3DiF_Viewport
Definition: internal.h:81
+
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_GshCode
Definition: internal.h:87
+
@ C3DiF_TexEnvBuf
Definition: internal.h:84
+
@ C3DiF_FogLut
Definition: internal.h:91
+
@ C3DiF_ProcTexColorLut
Definition: internal.h:90
+
@ C3DiF_LightEnv
Definition: internal.h:85
+
@ C3DiF_DrawUsed
Definition: internal.h:76
+
@ C3DiF_TexStatus
Definition: internal.h:88
+
@ C3DiF_BufInfo
Definition: internal.h:78
+
@ C3DiF_ProcTex
Definition: internal.h:89
+
@ C3DiF_FrameBuf
Definition: internal.h:80
+
@ C3DiF_GasLut
Definition: internal.h:93
+
@ C3DiF_ProcTexLutAll
Definition: internal.h:96
+
@ C3DiF_Program
Definition: internal.h:83
+
@ C3DiF_TexEnvAll
Definition: internal.h:100
+
void C3Di_RenderQueueInit(void)
Definition: renderqueue.c:114
+
void C3Di_DirtyUniforms(GPU_SHADER_TYPE type)
Definition: uniforms.c:87
+
#define C3DiF_Tex(n)
Definition: internal.h:97
+
void C3Di_LoadShaderUniforms(shaderInstance_s *si)
Definition: uniforms.c:99
+
#define C3DiF_TexEnv(n)
Definition: internal.h:99
+
void C3Di_RenderQueueDisableVBlank(void)
Definition: renderqueue.c:108
+
void C3Di_RenderQueueEnableVBlank(void)
Definition: renderqueue.c:102
+
void C3Di_RenderQueueWaitDone(void)
Definition: renderqueue.c:146
+
#define C3D_UNUSED
Definition: internal.h:10
+
void C3Di_SetTex(int unit, C3D_Tex *tex)
Definition: texture.c:265
+
void C3Di_RenderQueueExit(void)
Definition: renderqueue.c:125
+
void C3Di_TexEnvBind(int id, C3D_TexEnv *env)
Definition: texenv.c:40
+
@ C3DiG_BeginAcc
Definition: internal.h:105
+
@ C3DiG_RenderStage
Definition: internal.h:108
+
@ C3DiG_AccStage
Definition: internal.h:106
+
void C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type)
Definition: uniforms.c:129
+
void C3Di_LightEnvDirty(C3D_LightEnv *env)
Definition: lightenv.c:134
+
void C3Di_LightEnvUpdate(C3D_LightEnv *env)
Definition: lightenv.c:52
+
void C3Di_ProcTexUpdate(C3D_Context *ctx)
Definition: proctex.c:144
+
void C3Di_ProcTexDirty(C3D_Context *ctx)
Definition: proctex.c:182
+ +
C3D_FVec fixedAttribs[12]
Definition: internal.h:70
+
u32 flags
Definition: internal.h:38
+
C3D_BufInfo bufInfo
Definition: internal.h:42
+
u16 fixedAttribDirty
Definition: internal.h:69
+
u32 * cmdBuf
Definition: internal.h:34
+
u32 texConfig
Definition: internal.h:46
+
u32 gasFlags
Definition: internal.h:58
+
u16 fixedAttribEverDirty
Definition: internal.h:69
+
C3D_Tex * tex[3]
Definition: internal.h:48
+
gxCmdQueue_s gxQueue
Definition: internal.h:33
+
u32 texEnvBuf
Definition: internal.h:51
+
u32 scissor[3]
Definition: internal.h:67
+
C3D_AttrInfo attrInfo
Definition: internal.h:41
+
C3D_TexEnv texEnv[6]
Definition: internal.h:49
+
C3D_GasLut * gasLut
Definition: internal.h:59
+
shaderProgram_s * program
Definition: internal.h:39
+
u32 fogClr
Definition: internal.h:52
+
u32 viewport[5]
Definition: internal.h:66
+
C3D_FogLut * fogLut
Definition: internal.h:53
+
float cmdBufUsage
Definition: internal.h:36
+
C3D_Effect effect
Definition: internal.h:43
+
u32 texShadow
Definition: internal.h:47
+
C3D_LightEnv * lightEnv
Definition: internal.h:44
+
size_t cmdBufSize
Definition: internal.h:35
+
u32 texEnvBufClr
Definition: internal.h:51
+
C3D_FrameBuf fb
Definition: internal.h:65
+
void C3D_UpdateUniforms(GPU_SHADER_TYPE type)
Definition: uniforms.c:22
+
+
+ + + + diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/docs/html/bc_s.png differ diff --git a/docs/html/bc_sd.png b/docs/html/bc_sd.png new file mode 100644 index 0000000..31ca888 Binary files /dev/null and b/docs/html/bc_sd.png differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/html/bdwn.png differ diff --git a/docs/html/buffers_8c.html b/docs/html/buffers_8c.html new file mode 100644 index 0000000..d3a534f --- /dev/null +++ b/docs/html/buffers_8c.html @@ -0,0 +1,276 @@ + + + + + + + +Citro3d: source/buffers.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
buffers.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define BUFFER_BASE_PADDR   0x18000000
 
+ + + + + + + + + + + +

+Functions

void BufInfo_Init (C3D_BufInfo *info)
 
int BufInfo_Add (C3D_BufInfo *info, const void *data, ptrdiff_t stride, int attribCount, u64 permutation)
 
C3D_BufInfo * C3D_GetBufInfo (void)
 
void C3D_SetBufInfo (C3D_BufInfo *info)
 
void C3Di_BufInfoBind (C3D_BufInfo *info)
 
+

Macro Definition Documentation

+ +

◆ BUFFER_BASE_PADDR

+ +
+
+ + + + +
#define BUFFER_BASE_PADDR   0x18000000
+
+ +

Definition at line 3 of file buffers.c.

+ +
+
+

Function Documentation

+ +

◆ BufInfo_Add()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int BufInfo_Add (C3D_BufInfo * info,
const void * data,
ptrdiff_t stride,
int attribCount,
u64 permutation 
)
+
+ +

Definition at line 11 of file buffers.c.

+ +
+
+ +

◆ BufInfo_Init()

+ +
+
+ + + + + + + + +
void BufInfo_Init (C3D_BufInfo * info)
+
+ +

Definition at line 5 of file buffers.c.

+ +
+
+ +

◆ C3D_GetBufInfo()

+ +
+
+ + + + + + + + +
C3D_BufInfo * C3D_GetBufInfo (void )
+
+ +

Definition at line 26 of file buffers.c.

+ +
+
+ +

◆ C3D_SetBufInfo()

+ +
+
+ + + + + + + + +
void C3D_SetBufInfo (C3D_BufInfo * info)
+
+ +

Definition at line 37 of file buffers.c.

+ +
+
+ +

◆ C3Di_BufInfoBind()

+ +
+
+ + + + + + + + +
void C3Di_BufInfoBind (C3D_BufInfo * info)
+
+ +

Definition at line 49 of file buffers.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/buffers_8c.js b/docs/html/buffers_8c.js new file mode 100644 index 0000000..98f4146 --- /dev/null +++ b/docs/html/buffers_8c.js @@ -0,0 +1,9 @@ +var buffers_8c = +[ + [ "BUFFER_BASE_PADDR", "buffers_8c.html#abbe2effeef5ab2b53c5002dfd7dacfd2", null ], + [ "BufInfo_Add", "buffers_8c.html#ace3c32831df0d7cbe2890990a5d06749", null ], + [ "BufInfo_Init", "buffers_8c.html#a6bd7a8fb0f9a2922c4d3f27bbe14dc4a", null ], + [ "C3D_GetBufInfo", "buffers_8c.html#af67da4e259a0b0fc0e54f8e32249d817", null ], + [ "C3D_SetBufInfo", "buffers_8c.html#a171a9cd987caaa33b5556e60b1a716e6", null ], + [ "C3Di_BufInfoBind", "buffers_8c.html#a49e592c82e10a02ca46a91745ba53182", null ] +]; \ No newline at end of file diff --git a/docs/html/buffers_8c_source.html b/docs/html/buffers_8c_source.html new file mode 100644 index 0000000..5e17f13 --- /dev/null +++ b/docs/html/buffers_8c_source.html @@ -0,0 +1,171 @@ + + + + + + + +Citro3d: source/buffers.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
buffers.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3#define BUFFER_BASE_PADDR 0x18000000
+
4
+
5void BufInfo_Init(C3D_BufInfo* info)
+
6{
+
7 memset(info, 0, sizeof(*info));
+
8 info->base_paddr = BUFFER_BASE_PADDR;
+
9}
+
10
+
11int BufInfo_Add(C3D_BufInfo* info, const void* data, ptrdiff_t stride, int attribCount, u64 permutation)
+
12{
+
13 if (info->bufCount == 12) return -1;
+
14 int id = info->bufCount++;
+
15
+
16 u32 pa = osConvertVirtToPhys(data);
+
17 if (pa < info->base_paddr) return -2;
+
18
+
19 C3D_BufCfg* buf = &info->buffers[id];
+
20 buf->offset = pa - info->base_paddr;
+
21 buf->flags[0] = permutation & 0xFFFFFFFF;
+
22 buf->flags[1] = (permutation >> 32) | (stride << 16) | (attribCount << 28);
+
23 return id;
+
24}
+
25
+
26C3D_BufInfo* C3D_GetBufInfo(void)
+
27{
+
28 C3D_Context* ctx = C3Di_GetContext();
+
29
+
30 if (!(ctx->flags & C3DiF_Active))
+
31 return NULL;
+
32
+
33 ctx->flags |= C3DiF_BufInfo;
+
34 return &ctx->bufInfo;
+
35}
+
36
+
37void C3D_SetBufInfo(C3D_BufInfo* info)
+
38{
+
39 C3D_Context* ctx = C3Di_GetContext();
+
40
+
41 if (!(ctx->flags & C3DiF_Active))
+
42 return;
+
43
+
44 if (info != &ctx->bufInfo)
+
45 memcpy(&ctx->bufInfo, info, sizeof(*info));
+
46 ctx->flags |= C3DiF_BufInfo;
+
47}
+
48
+
49void C3Di_BufInfoBind(C3D_BufInfo* info)
+
50{
+
51 GPUCMD_AddWrite(GPUREG_ATTRIBBUFFERS_LOC, info->base_paddr >> 3);
+
52 GPUCMD_AddIncrementalWrites(GPUREG_ATTRIBBUFFER0_OFFSET, (u32*)info->buffers, sizeof(info->buffers)/sizeof(u32));
+
53}
+
void C3D_SetBufInfo(C3D_BufInfo *info)
Definition: buffers.c:37
+
void C3Di_BufInfoBind(C3D_BufInfo *info)
Definition: buffers.c:49
+
void BufInfo_Init(C3D_BufInfo *info)
Definition: buffers.c:5
+
#define BUFFER_BASE_PADDR
Definition: buffers.c:3
+
int BufInfo_Add(C3D_BufInfo *info, const void *data, ptrdiff_t stride, int attribCount, u64 permutation)
Definition: buffers.c:11
+
C3D_BufInfo * C3D_GetBufInfo(void)
Definition: buffers.c:26
+ +
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_BufInfo
Definition: internal.h:78
+ +
u32 flags
Definition: internal.h:38
+
C3D_BufInfo bufInfo
Definition: internal.h:42
+
float24Uniform_s * data
Definition: uniforms.c:16
+
+
+ + + + diff --git a/docs/html/classes.html b/docs/html/classes.html new file mode 100644 index 0000000..9f39a9a --- /dev/null +++ b/docs/html/classes.html @@ -0,0 +1,113 @@ + + + + + + + +Citro3d: Class Index + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+
+
C | T
+ +
+
+ + + + diff --git a/docs/html/closed.png b/docs/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/docs/html/closed.png differ diff --git a/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html b/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html new file mode 100644 index 0000000..8419551 --- /dev/null +++ b/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html @@ -0,0 +1,152 @@ + + + + + + + +Citro3d: source Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
source Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  attribs.c [code]
 
file  base.c [code]
 
file  buffers.c [code]
 
file  drawArrays.c [code]
 
file  drawElements.c [code]
 
file  effect.c [code]
 
file  fog.c [code]
 
file  framebuffer.c [code]
 
file  gas.c [code]
 
file  immediate.c [code]
 
file  internal.h [code]
 
file  light.c [code]
 
file  lightenv.c [code]
 
file  lightlut.c [code]
 
file  mtxstack.c [code]
 
file  proctex.c [code]
 
file  renderqueue.c [code]
 
file  tex3ds.c [code]
 Tex3DS routines.
 
file  texenv.c [code]
 
file  texture.c [code]
 
file  uniforms.c [code]
 
+
+
+ + + + diff --git a/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.js b/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.js new file mode 100644 index 0000000..4a3dd9a --- /dev/null +++ b/docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.js @@ -0,0 +1,24 @@ +var dir_b2f33c71d4aa5e7af42a1ca61ff5af1b = +[ + [ "attribs.c", "attribs_8c.html", "attribs_8c" ], + [ "base.c", "base_8c.html", "base_8c" ], + [ "buffers.c", "buffers_8c.html", "buffers_8c" ], + [ "drawArrays.c", "draw_arrays_8c.html", "draw_arrays_8c" ], + [ "drawElements.c", "draw_elements_8c.html", "draw_elements_8c" ], + [ "effect.c", "effect_8c.html", "effect_8c" ], + [ "fog.c", "fog_8c.html", "fog_8c" ], + [ "framebuffer.c", "framebuffer_8c.html", "framebuffer_8c" ], + [ "gas.c", "gas_8c.html", "gas_8c" ], + [ "immediate.c", "immediate_8c.html", "immediate_8c" ], + [ "internal.h", "internal_8h.html", "internal_8h" ], + [ "light.c", "light_8c.html", "light_8c" ], + [ "lightenv.c", "lightenv_8c.html", "lightenv_8c" ], + [ "lightlut.c", "lightlut_8c.html", "lightlut_8c" ], + [ "mtxstack.c", "mtxstack_8c.html", "mtxstack_8c" ], + [ "proctex.c", "proctex_8c.html", "proctex_8c" ], + [ "renderqueue.c", "renderqueue_8c.html", "renderqueue_8c" ], + [ "tex3ds.c", "tex3ds_8c.html", "tex3ds_8c" ], + [ "texenv.c", "texenv_8c.html", "texenv_8c" ], + [ "texture.c", "texture_8c.html", "texture_8c" ], + [ "uniforms.c", "uniforms_8c.html", "uniforms_8c" ] +]; \ No newline at end of file diff --git a/docs/html/doc.png b/docs/html/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/html/doc.png differ diff --git a/docs/html/docd.png b/docs/html/docd.png new file mode 100644 index 0000000..d7c94fd Binary files /dev/null and b/docs/html/docd.png differ diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css new file mode 100644 index 0000000..89dee6c --- /dev/null +++ b/docs/html/doxygen.css @@ -0,0 +1,1973 @@ +/* The standard CSS for doxygen 1.9.5*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.png'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.png'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: black; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 10px; + width: 10px; +} +::-webkit-scrollbar-thumb { + background-color: var(--scrollbar-thumb-color); + border-radius: 8px; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: underline; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid var(--fragment-border-color); + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: var(--font-family-monospace); + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + color: var(--fragment-foreground-color); + background-color: var(--fragment-background-color); + border: 1px solid var(--fragment-border-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: var(--memdef-param-name-color); + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/docs/html/doxygen.svg b/docs/html/doxygen.svg new file mode 100644 index 0000000..d42dad5 --- /dev/null +++ b/docs/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/html/draw_arrays_8c.html b/docs/html/draw_arrays_8c.html new file mode 100644 index 0000000..c391465 --- /dev/null +++ b/docs/html/draw_arrays_8c.html @@ -0,0 +1,153 @@ + + + + + + + +Citro3d: source/drawArrays.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
drawArrays.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void C3D_DrawArrays (GPU_Primitive_t primitive, int first, int size)
 
+

Function Documentation

+ +

◆ C3D_DrawArrays()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_DrawArrays (GPU_Primitive_t primitive,
int first,
int size 
)
+
+ +

Definition at line 3 of file drawArrays.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/draw_arrays_8c.js b/docs/html/draw_arrays_8c.js new file mode 100644 index 0000000..9b2122c --- /dev/null +++ b/docs/html/draw_arrays_8c.js @@ -0,0 +1,4 @@ +var draw_arrays_8c = +[ + [ "C3D_DrawArrays", "draw_arrays_8c.html#a3622d8b83a5912c50432f330085564c6", null ] +]; \ No newline at end of file diff --git a/docs/html/draw_arrays_8c_source.html b/docs/html/draw_arrays_8c_source.html new file mode 100644 index 0000000..c22621b --- /dev/null +++ b/docs/html/draw_arrays_8c_source.html @@ -0,0 +1,140 @@ + + + + + + + +Citro3d: source/drawArrays.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
drawArrays.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void C3D_DrawArrays(GPU_Primitive_t primitive, int first, int size)
+
4{
+ +
6
+
7 // Set primitive type
+
8 GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 2, primitive);
+
9 // Start a new primitive (breaks off a triangle strip/fan)
+
10 GPUCMD_AddWrite(GPUREG_RESTART_PRIMITIVE, 1);
+
11 // The index buffer is not used, but this command is still required
+
12 GPUCMD_AddWrite(GPUREG_INDEXBUFFER_CONFIG, 0x80000000);
+
13 // Number of vertices
+
14 GPUCMD_AddWrite(GPUREG_NUMVERTICES, size);
+
15 // First vertex
+
16 GPUCMD_AddWrite(GPUREG_VERTEX_OFFSET, first);
+
17 // Enable array drawing mode
+
18 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 1, 1);
+
19 // Enable drawing mode
+
20 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 0);
+
21 // Trigger array drawing
+
22 GPUCMD_AddWrite(GPUREG_DRAWARRAYS, 1);
+
23 // Go back to configuration mode
+
24 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 1);
+
25 // Disable array drawing mode
+
26 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 1, 0);
+
27 // Clear the post-vertex cache
+
28 GPUCMD_AddWrite(GPUREG_VTX_FUNC, 1);
+
29
+
30 C3Di_GetContext()->flags |= C3DiF_DrawUsed;
+
31}
+
void C3Di_UpdateContext(void)
Definition: base.c:158
+
void C3D_DrawArrays(GPU_Primitive_t primitive, int first, int size)
Definition: drawArrays.c:3
+ +
@ C3DiF_DrawUsed
Definition: internal.h:76
+
+
+ + + + diff --git a/docs/html/draw_elements_8c.html b/docs/html/draw_elements_8c.html new file mode 100644 index 0000000..ac3068f --- /dev/null +++ b/docs/html/draw_elements_8c.html @@ -0,0 +1,159 @@ + + + + + + + +Citro3d: source/drawElements.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
drawElements.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

void C3D_DrawElements (GPU_Primitive_t primitive, int count, int type, const void *indices)
 
+

Function Documentation

+ +

◆ C3D_DrawElements()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_DrawElements (GPU_Primitive_t primitive,
int count,
int type,
const void * indices 
)
+
+ +

Definition at line 3 of file drawElements.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/draw_elements_8c.js b/docs/html/draw_elements_8c.js new file mode 100644 index 0000000..6e1e01a --- /dev/null +++ b/docs/html/draw_elements_8c.js @@ -0,0 +1,4 @@ +var draw_elements_8c = +[ + [ "C3D_DrawElements", "draw_elements_8c.html#a9fa75694d9963a1800141b2452badd5c", null ] +]; \ No newline at end of file diff --git a/docs/html/draw_elements_8c_source.html b/docs/html/draw_elements_8c_source.html new file mode 100644 index 0000000..b44d15a --- /dev/null +++ b/docs/html/draw_elements_8c_source.html @@ -0,0 +1,158 @@ + + + + + + + +Citro3d: source/drawElements.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
drawElements.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void C3D_DrawElements(GPU_Primitive_t primitive, int count, int type, const void* indices)
+
4{
+
5 C3D_Context* ctx = C3Di_GetContext();
+
6 u32 pa = osConvertVirtToPhys(indices);
+
7 u32 base = ctx->bufInfo.base_paddr;
+
8 if (pa < base) return;
+
9
+ +
11
+
12 // Set primitive type
+
13 GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 2, primitive != GPU_TRIANGLES ? primitive : GPU_GEOMETRY_PRIM);
+
14 // Start a new primitive (breaks off a triangle strip/fan)
+
15 GPUCMD_AddWrite(GPUREG_RESTART_PRIMITIVE, 1);
+
16 // Configure the index buffer
+
17 GPUCMD_AddWrite(GPUREG_INDEXBUFFER_CONFIG, (pa - base) | (type << 31));
+
18 // Number of vertices
+
19 GPUCMD_AddWrite(GPUREG_NUMVERTICES, count);
+
20 // First vertex
+
21 GPUCMD_AddWrite(GPUREG_VERTEX_OFFSET, 0);
+
22 // Enable triangle element drawing mode if necessary
+
23 if (primitive == GPU_TRIANGLES)
+
24 {
+
25 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG, 2, 0x100);
+
26 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 2, 0x100);
+
27 }
+
28 // Enable drawing mode
+
29 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 0);
+
30 // Trigger element drawing
+
31 GPUCMD_AddWrite(GPUREG_DRAWELEMENTS, 1);
+
32 // Go back to configuration mode
+
33 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 1);
+
34 // Disable triangle element drawing mode if necessary
+
35 if (primitive == GPU_TRIANGLES)
+
36 {
+
37 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG, 2, 0);
+
38 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 2, 0);
+
39 }
+
40 // Clear the post-vertex cache
+
41 GPUCMD_AddWrite(GPUREG_VTX_FUNC, 1);
+
42 GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 0x8, 0);
+
43 GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 0x8, 0);
+
44
+
45 C3Di_GetContext()->flags |= C3DiF_DrawUsed;
+
46}
+
void C3Di_UpdateContext(void)
Definition: base.c:158
+
void C3D_DrawElements(GPU_Primitive_t primitive, int count, int type, const void *indices)
Definition: drawElements.c:3
+ +
@ C3DiF_DrawUsed
Definition: internal.h:76
+ +
C3D_BufInfo bufInfo
Definition: internal.h:42
+
int count
Definition: uniforms.c:15
+
+
+ + + + diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js new file mode 100644 index 0000000..1f4cd14 --- /dev/null +++ b/docs/html/dynsections.js @@ -0,0 +1,130 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +Citro3d: source/effect.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
effect.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void C3D_DepthMap (bool bIsZBuffer, float zScale, float zOffset)
 
void C3D_CullFace (GPU_CULLMODE mode)
 
void C3D_StencilTest (bool enable, GPU_TESTFUNC function, int ref, int inputMask, int writeMask)
 
void C3D_StencilOp (GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
 
void C3D_BlendingColor (u32 color)
 
void C3D_EarlyDepthTest (bool enable, GPU_EARLYDEPTHFUNC function, u32 ref)
 
void C3D_DepthTest (bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
 
void C3D_AlphaTest (bool enable, GPU_TESTFUNC function, int ref)
 
void C3D_AlphaBlend (GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha)
 
void C3D_ColorLogicOp (GPU_LOGICOP op)
 
void C3D_FragOpMode (GPU_FRAGOPMODE mode)
 
void C3D_FragOpShadow (float scale, float bias)
 
void C3Di_EffectBind (C3D_Effect *e)
 
+

Function Documentation

+ +

◆ C3D_AlphaBlend()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_AlphaBlend (GPU_BLENDEQUATION colorEq,
GPU_BLENDEQUATION alphaEq,
GPU_BLENDFACTOR srcClr,
GPU_BLENDFACTOR dstClr,
GPU_BLENDFACTOR srcAlpha,
GPU_BLENDFACTOR dstAlpha 
)
+
+ +

Definition at line 62 of file effect.c.

+ +
+
+ +

◆ C3D_AlphaTest()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_AlphaTest (bool enable,
GPU_TESTFUNC function,
int ref 
)
+
+ +

Definition at line 56 of file effect.c.

+ +
+
+ +

◆ C3D_BlendingColor()

+ +
+
+ + + + + + + + +
void C3D_BlendingColor (u32 color)
+
+ +

Definition at line 36 of file effect.c.

+ +
+
+ +

◆ C3D_ColorLogicOp()

+ +
+
+ + + + + + + + +
void C3D_ColorLogicOp (GPU_LOGICOP op)
+
+ +

Definition at line 70 of file effect.c.

+ +
+
+ +

◆ C3D_CullFace()

+ +
+
+ + + + + + + + +
void C3D_CullFace (GPU_CULLMODE mode)
+
+ +

Definition at line 18 of file effect.c.

+ +
+
+ +

◆ C3D_DepthMap()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_DepthMap (bool bIsZBuffer,
float zScale,
float zOffset 
)
+
+ +

Definition at line 10 of file effect.c.

+ +
+
+ +

◆ C3D_DepthTest()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_DepthTest (bool enable,
GPU_TESTFUNC function,
GPU_WRITEMASK writemask 
)
+
+ +

Definition at line 50 of file effect.c.

+ +
+
+ +

◆ C3D_EarlyDepthTest()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_EarlyDepthTest (bool enable,
GPU_EARLYDEPTHFUNC function,
u32 ref 
)
+
+ +

Definition at line 42 of file effect.c.

+ +
+
+ +

◆ C3D_FragOpMode()

+ +
+
+ + + + + + + + +
void C3D_FragOpMode (GPU_FRAGOPMODE mode)
+
+ +

Definition at line 77 of file effect.c.

+ +
+
+ +

◆ C3D_FragOpShadow()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_FragOpShadow (float scale,
float bias 
)
+
+ +

Definition at line 84 of file effect.c.

+ +
+
+ +

◆ C3D_StencilOp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_StencilOp (GPU_STENCILOP sfail,
GPU_STENCILOP dfail,
GPU_STENCILOP pass 
)
+
+ +

Definition at line 30 of file effect.c.

+ +
+
+ +

◆ C3D_StencilTest()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_StencilTest (bool enable,
GPU_TESTFUNC function,
int ref,
int inputMask,
int writeMask 
)
+
+ +

Definition at line 24 of file effect.c.

+ +
+
+ +

◆ C3Di_EffectBind()

+ +
+
+ + + + + + + + +
void C3Di_EffectBind (C3D_Effecte)
+
+ +

Definition at line 90 of file effect.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/effect_8c.js b/docs/html/effect_8c.js new file mode 100644 index 0000000..a8c446d --- /dev/null +++ b/docs/html/effect_8c.js @@ -0,0 +1,16 @@ +var effect_8c = +[ + [ "C3D_AlphaBlend", "effect_8c.html#aef14b560979a4fabc7ae5057a18c5445", null ], + [ "C3D_AlphaTest", "effect_8c.html#a555cd40790b14750276cd36f47041c2a", null ], + [ "C3D_BlendingColor", "effect_8c.html#af07e35a0f7f647f995c7f6f337d4b2eb", null ], + [ "C3D_ColorLogicOp", "effect_8c.html#aeea658d49c9a03e5432ef797dd1bd630", null ], + [ "C3D_CullFace", "effect_8c.html#a711302406d9e93d5ed71bd782c83918e", null ], + [ "C3D_DepthMap", "effect_8c.html#a089d29970416d0e2afd28de2d88b25d5", null ], + [ "C3D_DepthTest", "effect_8c.html#af38339706d598b6e5e3a88766e95a99f", null ], + [ "C3D_EarlyDepthTest", "effect_8c.html#af6d28032f679a91d505185eb8e59d019", null ], + [ "C3D_FragOpMode", "effect_8c.html#a72bafc7ade3093d1c90feb244fcc7e1d", null ], + [ "C3D_FragOpShadow", "effect_8c.html#ac76152822ff9433cacc9c1cbc8e0c4cf", null ], + [ "C3D_StencilOp", "effect_8c.html#ad8a3f3ce3342c2fc2cbee737d5eeaf5d", null ], + [ "C3D_StencilTest", "effect_8c.html#a97039180afd2adbc0659fb37790008cb", null ], + [ "C3Di_EffectBind", "effect_8c.html#a70021f960e770a637643fcfa5e0d1c9c", null ] +]; \ No newline at end of file diff --git a/docs/html/effect_8c_source.html b/docs/html/effect_8c_source.html new file mode 100644 index 0000000..f53394a --- /dev/null +++ b/docs/html/effect_8c_source.html @@ -0,0 +1,246 @@ + + + + + + + +Citro3d: source/effect.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
effect.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3static inline C3D_Effect* getEffect()
+
4{
+
5 C3D_Context* ctx = C3Di_GetContext();
+
6 ctx->flags |= C3DiF_Effect;
+
7 return &ctx->effect;
+
8}
+
9
+
10void C3D_DepthMap(bool bIsZBuffer, float zScale, float zOffset)
+
11{
+
12 C3D_Effect* e = getEffect();
+
13 e->zBuffer = bIsZBuffer;
+
14 e->zScale = f32tof24(zScale);
+
15 e->zOffset = f32tof24(zOffset);
+
16}
+
17
+
18void C3D_CullFace(GPU_CULLMODE mode)
+
19{
+
20 C3D_Effect* e = getEffect();
+
21 e->cullMode = mode;
+
22}
+
23
+
24void C3D_StencilTest(bool enable, GPU_TESTFUNC function, int ref, int inputMask, int writeMask)
+
25{
+
26 C3D_Effect* e = getEffect();
+
27 e->stencilMode = (!!enable) | ((function & 7) << 4) | (writeMask << 8) | (ref << 16) | (inputMask << 24);
+
28}
+
29
+
30void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
+
31{
+
32 C3D_Effect* e = getEffect();
+
33 e->stencilOp = sfail | (dfail << 4) | (pass << 8);
+
34}
+
35
+
36void C3D_BlendingColor(u32 color)
+
37{
+
38 C3D_Effect* e = getEffect();
+
39 e->blendClr = color;
+
40}
+
41
+
42void C3D_EarlyDepthTest(bool enable, GPU_EARLYDEPTHFUNC function, u32 ref)
+
43{
+
44 C3D_Effect* e = getEffect();
+
45 e->earlyDepth = enable;
+
46 e->earlyDepthFunc = function;
+
47 e->earlyDepthRef = ref;
+
48}
+
49
+
50void C3D_DepthTest(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
+
51{
+
52 C3D_Effect* e = getEffect();
+
53 e->depthTest = (!!enable) | ((function & 7) << 4) | (writemask << 8);
+
54}
+
55
+
56void C3D_AlphaTest(bool enable, GPU_TESTFUNC function, int ref)
+
57{
+
58 C3D_Effect* e = getEffect();
+
59 e->alphaTest = (!!enable) | ((function & 7) << 4) | (ref << 8);
+
60}
+
61
+
62void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha)
+
63{
+
64 C3D_Effect* e = getEffect();
+
65 e->alphaBlend = colorEq | (alphaEq << 8) | (srcClr << 16) | (dstClr << 20) | (srcAlpha << 24) | (dstAlpha << 28);
+
66 e->fragOpMode &= ~0xFF00;
+
67 e->fragOpMode |= 0x0100;
+
68}
+
69
+
70void C3D_ColorLogicOp(GPU_LOGICOP op)
+
71{
+
72 C3D_Effect* e = getEffect();
+
73 e->fragOpMode &= ~0xFF00;
+
74 e->clrLogicOp = op;
+
75}
+
76
+
77void C3D_FragOpMode(GPU_FRAGOPMODE mode)
+
78{
+
79 C3D_Effect* e = getEffect();
+
80 e->fragOpMode &= ~0xFF00FF;
+
81 e->fragOpMode |= 0xE40000 | mode;
+
82}
+
83
+
84void C3D_FragOpShadow(float scale, float bias)
+
85{
+
86 C3D_Effect* e = getEffect();
+
87 e->fragOpShadow = f32tof16(scale+bias) | (f32tof16(-scale)<<16);
+
88}
+
89
+ +
91{
+
92 GPUCMD_AddWrite(GPUREG_DEPTHMAP_ENABLE, e->zBuffer ? 1 : 0);
+
93 GPUCMD_AddWrite(GPUREG_FACECULLING_CONFIG, e->cullMode & 0x3);
+
94 GPUCMD_AddIncrementalWrites(GPUREG_DEPTHMAP_SCALE, (u32*)&e->zScale, 2);
+
95 GPUCMD_AddIncrementalWrites(GPUREG_FRAGOP_ALPHA_TEST, (u32*)&e->alphaTest, 4);
+
96 GPUCMD_AddMaskedWrite(GPUREG_GAS_DELTAZ_DEPTH, 0x8, (u32)GPU_MAKEGASDEPTHFUNC((e->depthTest>>4)&7) << 24);
+
97 GPUCMD_AddWrite(GPUREG_BLEND_COLOR, e->blendClr);
+
98 GPUCMD_AddWrite(GPUREG_BLEND_FUNC, e->alphaBlend);
+
99 GPUCMD_AddWrite(GPUREG_LOGIC_OP, e->clrLogicOp);
+
100 GPUCMD_AddMaskedWrite(GPUREG_COLOR_OPERATION, 7, e->fragOpMode);
+
101 GPUCMD_AddWrite(GPUREG_FRAGOP_SHADOW, e->fragOpShadow);
+
102 GPUCMD_AddMaskedWrite(GPUREG_EARLYDEPTH_TEST1, 1, e->earlyDepth ? 1 : 0);
+
103 GPUCMD_AddWrite(GPUREG_EARLYDEPTH_TEST2, e->earlyDepth ? 1 : 0);
+
104 GPUCMD_AddMaskedWrite(GPUREG_EARLYDEPTH_FUNC, 1, e->earlyDepthFunc);
+
105 GPUCMD_AddMaskedWrite(GPUREG_EARLYDEPTH_DATA, 0x7, e->earlyDepthRef);
+
106}
+
void C3D_DepthMap(bool bIsZBuffer, float zScale, float zOffset)
Definition: effect.c:10
+
void C3D_AlphaTest(bool enable, GPU_TESTFUNC function, int ref)
Definition: effect.c:56
+
void C3Di_EffectBind(C3D_Effect *e)
Definition: effect.c:90
+
void C3D_CullFace(GPU_CULLMODE mode)
Definition: effect.c:18
+
void C3D_FragOpMode(GPU_FRAGOPMODE mode)
Definition: effect.c:77
+
void C3D_StencilTest(bool enable, GPU_TESTFUNC function, int ref, int inputMask, int writeMask)
Definition: effect.c:24
+
void C3D_FragOpShadow(float scale, float bias)
Definition: effect.c:84
+
void C3D_StencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
Definition: effect.c:30
+
void C3D_ColorLogicOp(GPU_LOGICOP op)
Definition: effect.c:70
+
void C3D_AlphaBlend(GPU_BLENDEQUATION colorEq, GPU_BLENDEQUATION alphaEq, GPU_BLENDFACTOR srcClr, GPU_BLENDFACTOR dstClr, GPU_BLENDFACTOR srcAlpha, GPU_BLENDFACTOR dstAlpha)
Definition: effect.c:62
+
void C3D_BlendingColor(u32 color)
Definition: effect.c:36
+
void C3D_DepthTest(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
Definition: effect.c:50
+
void C3D_EarlyDepthTest(bool enable, GPU_EARLYDEPTHFUNC function, u32 ref)
Definition: effect.c:42
+ +
@ C3DiF_Effect
Definition: internal.h:79
+ +
u32 flags
Definition: internal.h:38
+
C3D_Effect effect
Definition: internal.h:43
+ +
u32 stencilMode
Definition: internal.h:23
+
u32 blendClr
Definition: internal.h:26
+
u32 alphaTest
Definition: internal.h:22
+
bool earlyDepth
Definition: internal.h:18
+
GPU_CULLMODE cullMode
Definition: internal.h:17
+
u32 stencilOp
Definition: internal.h:23
+
bool zBuffer
Definition: internal.h:18
+
u32 zOffset
Definition: internal.h:16
+
u32 depthTest
Definition: internal.h:24
+
u32 fragOpMode
Definition: internal.h:14
+
u32 earlyDepthRef
Definition: internal.h:20
+
GPU_LOGICOP clrLogicOp
Definition: internal.h:28
+
GPU_EARLYDEPTHFUNC earlyDepthFunc
Definition: internal.h:19
+
u32 alphaBlend
Definition: internal.h:27
+
u32 fragOpShadow
Definition: internal.h:15
+
u32 zScale
Definition: internal.h:16
+
+
+ + + + diff --git a/docs/html/files.html b/docs/html/files.html new file mode 100644 index 0000000..c46509a --- /dev/null +++ b/docs/html/files.html @@ -0,0 +1,130 @@ + + + + + + + +Citro3d: File List + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+
+ + + + diff --git a/docs/html/files_dup.js b/docs/html/files_dup.js new file mode 100644 index 0000000..928df67 --- /dev/null +++ b/docs/html/files_dup.js @@ -0,0 +1,4 @@ +var files_dup = +[ + [ "source", "dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html", "dir_b2f33c71d4aa5e7af42a1ca61ff5af1b" ] +]; \ No newline at end of file diff --git a/docs/html/fog_8c.html b/docs/html/fog_8c.html new file mode 100644 index 0000000..1674fab --- /dev/null +++ b/docs/html/fog_8c.html @@ -0,0 +1,279 @@ + + + + + + + +Citro3d: source/fog.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
fog.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + +

+Functions

void FogLut_FromArray (C3D_FogLut *lut, const float data[256])
 
void FogLut_Exp (C3D_FogLut *lut, float density, float gradient, float near, float far)
 
void C3D_FogGasMode (GPU_FOGMODE fogMode, GPU_GASMODE gasMode, bool zFlip)
 
void C3D_FogColor (u32 color)
 
void C3D_FogLutBind (C3D_FogLut *lut)
 
+

Function Documentation

+ +

◆ C3D_FogColor()

+ +
+
+ + + + + + + + +
void C3D_FogColor (u32 color)
+
+ +

Definition at line 58 of file fog.c.

+ +
+
+ +

◆ C3D_FogGasMode()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_FogGasMode (GPU_FOGMODE fogMode,
GPU_GASMODE gasMode,
bool zFlip 
)
+
+ +

Definition at line 46 of file fog.c.

+ +
+
+ +

◆ C3D_FogLutBind()

+ +
+
+ + + + + + + + +
void C3D_FogLutBind (C3D_FogLut * lut)
+
+ +

Definition at line 69 of file fog.c.

+ +
+
+ +

◆ FogLut_Exp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void FogLut_Exp (C3D_FogLut * lut,
float density,
float gradient,
float near,
float far 
)
+
+ +

Definition at line 30 of file fog.c.

+ +
+
+ +

◆ FogLut_FromArray()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void FogLut_FromArray (C3D_FogLut * lut,
const float data[256] 
)
+
+ +

Definition at line 3 of file fog.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/fog_8c.js b/docs/html/fog_8c.js new file mode 100644 index 0000000..c77b041 --- /dev/null +++ b/docs/html/fog_8c.js @@ -0,0 +1,8 @@ +var fog_8c = +[ + [ "C3D_FogColor", "fog_8c.html#a2e017fb15d6c0f3bf74378a40a2ba50d", null ], + [ "C3D_FogGasMode", "fog_8c.html#a8dc6123d7468e86a322bc3aaa07435b1", null ], + [ "C3D_FogLutBind", "fog_8c.html#a69cb58662660e29af29945c26de20895", null ], + [ "FogLut_Exp", "fog_8c.html#a66632ecd1b44cf397db7682a1590bc4b", null ], + [ "FogLut_FromArray", "fog_8c.html#a149ecb2e595183a88702023998266493", null ] +]; \ No newline at end of file diff --git a/docs/html/fog_8c_source.html b/docs/html/fog_8c_source.html new file mode 100644 index 0000000..11e9816 --- /dev/null +++ b/docs/html/fog_8c_source.html @@ -0,0 +1,202 @@ + + + + + + + +Citro3d: source/fog.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
fog.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void FogLut_FromArray(C3D_FogLut* lut, const float data[256])
+
4{
+
5 int i;
+
6 for (i = 0; i < 128; i ++)
+
7 {
+
8 float in = data[i], diff = data[i+128];
+
9
+
10 u32 val = 0;
+
11 if (in > 0.0f)
+
12 {
+
13 in *= 0x800;
+
14 val = (in < 0x800) ? (u32)in : 0x7FF;
+
15 }
+
16
+
17 u32 val2 = 0;
+
18 if (diff != 0.0f)
+
19 {
+
20 diff *= 0x800;
+
21 if (diff < -0x1000) diff = -0x1000;
+
22 else if (diff > 0xFFF) diff = 0xFFF;
+
23 val2 = (s32)diff & 0x1FFF;
+
24 }
+
25
+
26 lut->data[i] = val2 | (val << 13);
+
27 }
+
28}
+
29
+
30void FogLut_Exp(C3D_FogLut* lut, float density, float gradient, float near, float far)
+
31{
+
32 int i;
+
33 float data[256];
+
34 for (i = 0; i <= 128; i ++)
+
35 {
+
36 float x = FogLut_CalcZ(i/128.0f, near, far);
+
37 float val = expf(-powf(density*x, gradient));
+
38 if (i < 128)
+
39 data[i] = val;
+
40 if (i > 0)
+
41 data[i+127] = val-data[i-1];
+
42 }
+ +
44}
+
45
+
46void C3D_FogGasMode(GPU_FOGMODE fogMode, GPU_GASMODE gasMode, bool zFlip)
+
47{
+
48 C3D_Context* ctx = C3Di_GetContext();
+
49
+
50 if (!(ctx->flags & C3DiF_Active))
+
51 return;
+
52
+
53 ctx->flags |= C3DiF_TexEnvBuf;
+
54 ctx->texEnvBuf &= ~0x100FF;
+
55 ctx->texEnvBuf |= (fogMode&7) | ((gasMode&1)<<3) | (zFlip ? BIT(16) : 0);
+
56}
+
57
+
58void C3D_FogColor(u32 color)
+
59{
+
60 C3D_Context* ctx = C3Di_GetContext();
+
61
+
62 if (!(ctx->flags & C3DiF_Active))
+
63 return;
+
64
+
65 ctx->flags |= C3DiF_TexEnvBuf;
+
66 ctx->fogClr = color;
+
67}
+
68
+
69void C3D_FogLutBind(C3D_FogLut* lut)
+
70{
+
71 C3D_Context* ctx = C3Di_GetContext();
+
72
+
73 if (!(ctx->flags & C3DiF_Active))
+
74 return;
+
75
+
76 if (lut)
+
77 {
+
78 ctx->flags |= C3DiF_FogLut;
+
79 ctx->fogLut = lut;
+
80 } else
+
81 ctx->flags &= ~C3DiF_FogLut;
+
82}
+
void FogLut_FromArray(C3D_FogLut *lut, const float data[256])
Definition: fog.c:3
+
void C3D_FogColor(u32 color)
Definition: fog.c:58
+
void FogLut_Exp(C3D_FogLut *lut, float density, float gradient, float near, float far)
Definition: fog.c:30
+
void C3D_FogLutBind(C3D_FogLut *lut)
Definition: fog.c:69
+
void C3D_FogGasMode(GPU_FOGMODE fogMode, GPU_GASMODE gasMode, bool zFlip)
Definition: fog.c:46
+ +
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_TexEnvBuf
Definition: internal.h:84
+
@ C3DiF_FogLut
Definition: internal.h:91
+ +
u32 flags
Definition: internal.h:38
+
u32 texEnvBuf
Definition: internal.h:51
+
u32 fogClr
Definition: internal.h:52
+
C3D_FogLut * fogLut
Definition: internal.h:53
+
float24Uniform_s * data
Definition: uniforms.c:16
+
+
+ + + + diff --git a/docs/html/folderclosed.png b/docs/html/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/docs/html/folderclosed.png differ diff --git a/docs/html/folderopen.png b/docs/html/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/docs/html/folderopen.png differ diff --git a/docs/html/framebuffer_8c.html b/docs/html/framebuffer_8c.html new file mode 100644 index 0000000..41d1fbc --- /dev/null +++ b/docs/html/framebuffer_8c.html @@ -0,0 +1,389 @@ + + + + + + + +Citro3d: source/framebuffer.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
framebuffer.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

u32 C3D_CalcColorBufSize (u32 width, u32 height, GPU_COLORBUF fmt)
 
u32 C3D_CalcDepthBufSize (u32 width, u32 height, GPU_DEPTHBUF fmt)
 
C3D_FrameBuf * C3D_GetFrameBuf (void)
 
void C3D_SetFrameBuf (C3D_FrameBuf *fb)
 
void C3D_FrameBufTex (C3D_FrameBuf *fb, C3D_Tex *tex, GPU_TEXFACE face, int level)
 
void C3Di_FrameBufBind (C3D_FrameBuf *fb)
 
void C3D_FrameBufClear (C3D_FrameBuf *frameBuf, C3D_ClearBits clearBits, u32 clearColor, u32 clearDepth)
 
void C3D_FrameBufTransfer (C3D_FrameBuf *frameBuf, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
 
+

Function Documentation

+ +

◆ C3D_CalcColorBufSize()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
u32 C3D_CalcColorBufSize (u32 width,
u32 height,
GPU_COLORBUF fmt 
)
+
+ +

Definition at line 6 of file framebuffer.c.

+ +
+
+ +

◆ C3D_CalcDepthBufSize()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
u32 C3D_CalcDepthBufSize (u32 width,
u32 height,
GPU_DEPTHBUF fmt 
)
+
+ +

Definition at line 12 of file framebuffer.c.

+ +
+
+ +

◆ C3D_FrameBufClear()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_FrameBufClear (C3D_FrameBuf * frameBuf,
C3D_ClearBits clearBits,
u32 clearColor,
u32 clearDepth 
)
+
+ +

Definition at line 71 of file framebuffer.c.

+ +
+
+ +

◆ C3D_FrameBufTex()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_FrameBufTex (C3D_FrameBuf * fb,
C3D_Tex * tex,
GPU_TEXFACE face,
int level 
)
+
+ +

Definition at line 41 of file framebuffer.c.

+ +
+
+ +

◆ C3D_FrameBufTransfer()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_FrameBufTransfer (C3D_FrameBuf * frameBuf,
gfxScreen_t screen,
gfx3dSide_t side,
u32 transferFlags 
)
+
+ +

Definition at line 95 of file framebuffer.c.

+ +
+
+ +

◆ C3D_GetFrameBuf()

+ +
+
+ + + + + + + + +
C3D_FrameBuf * C3D_GetFrameBuf (void )
+
+ +

Definition at line 18 of file framebuffer.c.

+ +
+
+ +

◆ C3D_SetFrameBuf()

+ +
+
+ + + + + + + + +
void C3D_SetFrameBuf (C3D_FrameBuf * fb)
+
+ +

Definition at line 29 of file framebuffer.c.

+ +
+
+ +

◆ C3Di_FrameBufBind()

+ +
+
+ + + + + + + + +
void C3Di_FrameBufBind (C3D_FrameBuf * fb)
+
+ +

Definition at line 49 of file framebuffer.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/framebuffer_8c.js b/docs/html/framebuffer_8c.js new file mode 100644 index 0000000..2978e4d --- /dev/null +++ b/docs/html/framebuffer_8c.js @@ -0,0 +1,11 @@ +var framebuffer_8c = +[ + [ "C3D_CalcColorBufSize", "framebuffer_8c.html#a615ec927724adc090747b66c1d6648b5", null ], + [ "C3D_CalcDepthBufSize", "framebuffer_8c.html#a9059233abed3188edc90e95020ac63fe", null ], + [ "C3D_FrameBufClear", "framebuffer_8c.html#a6f28133b23ed22710aa38f7d59203272", null ], + [ "C3D_FrameBufTex", "framebuffer_8c.html#a20b36fa584fbcfde834d011677fea4d6", null ], + [ "C3D_FrameBufTransfer", "framebuffer_8c.html#a5b11d7b5f9708b7ab42d35df5d753345", null ], + [ "C3D_GetFrameBuf", "framebuffer_8c.html#a0c4cd56f5e20277bcdbc56f844b23ea6", null ], + [ "C3D_SetFrameBuf", "framebuffer_8c.html#aa44f954d22329dc45084b3c71593fd30", null ], + [ "C3Di_FrameBufBind", "framebuffer_8c.html#abdac0a0f522dddd85db6e17f03e20121", null ] +]; \ No newline at end of file diff --git a/docs/html/framebuffer_8c_source.html b/docs/html/framebuffer_8c_source.html new file mode 100644 index 0000000..ead3c96 --- /dev/null +++ b/docs/html/framebuffer_8c_source.html @@ -0,0 +1,219 @@ + + + + + + + +Citro3d: source/framebuffer.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
framebuffer.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3static const u8 colorFmtSizes[] = {2,1,0,0,0};
+
4static const u8 depthFmtSizes[] = {0,0,1,2};
+
5
+
6u32 C3D_CalcColorBufSize(u32 width, u32 height, GPU_COLORBUF fmt)
+
7{
+
8 u32 size = width*height;
+
9 return size*(2+colorFmtSizes[fmt]);
+
10}
+
11
+
12u32 C3D_CalcDepthBufSize(u32 width, u32 height, GPU_DEPTHBUF fmt)
+
13{
+
14 u32 size = width*height;
+
15 return size*(2+depthFmtSizes[fmt]);
+
16}
+
17
+
18C3D_FrameBuf* C3D_GetFrameBuf(void)
+
19{
+
20 C3D_Context* ctx = C3Di_GetContext();
+
21
+
22 if (!(ctx->flags & C3DiF_Active))
+
23 return NULL;
+
24
+
25 ctx->flags |= C3DiF_FrameBuf;
+
26 return &ctx->fb;
+
27}
+
28
+
29void C3D_SetFrameBuf(C3D_FrameBuf* fb)
+
30{
+
31 C3D_Context* ctx = C3Di_GetContext();
+
32
+
33 if (!(ctx->flags & C3DiF_Active))
+
34 return;
+
35
+
36 if (fb != &ctx->fb)
+
37 memcpy(&ctx->fb, fb, sizeof(*fb));
+
38 ctx->flags |= C3DiF_FrameBuf;
+
39}
+
40
+
41void C3D_FrameBufTex(C3D_FrameBuf* fb, C3D_Tex* tex, GPU_TEXFACE face, int level)
+
42{
+
43 C3D_FrameBufAttrib(fb, tex->width, tex->height, false);
+
44 C3D_FrameBufColor(fb, C3D_TexGetImagePtr(tex,
+
45 C3Di_TexIs2D(tex) ? tex->data : tex->cube->data[face], level, NULL),
+
46 (GPU_COLORBUF)tex->fmt);
+
47}
+
48
+
49void C3Di_FrameBufBind(C3D_FrameBuf* fb)
+
50{
+
51 u32 param[4] = { 0, 0, 0, 0 };
+
52
+
53 GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 1);
+
54
+
55 param[0] = osConvertVirtToPhys(fb->depthBuf) >> 3;
+
56 param[1] = osConvertVirtToPhys(fb->colorBuf) >> 3;
+
57 param[2] = 0x01000000 | (((u32)(fb->height-1) & 0xFFF) << 12) | (fb->width & 0xFFF);
+
58 GPUCMD_AddIncrementalWrites(GPUREG_DEPTHBUFFER_LOC, param, 3);
+
59
+
60 GPUCMD_AddWrite(GPUREG_RENDERBUF_DIM, param[2]);
+
61 GPUCMD_AddWrite(GPUREG_DEPTHBUFFER_FORMAT, fb->depthFmt);
+
62 GPUCMD_AddWrite(GPUREG_COLORBUFFER_FORMAT, colorFmtSizes[fb->colorFmt] | ((u32)fb->colorFmt << 16));
+
63 GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_BLOCK32, fb->block32 ? 1 : 0);
+
64
+
65 // Enable or disable color/depth buffers
+
66 param[0] = param[1] = fb->colorBuf ? fb->colorMask : 0;
+
67 param[2] = param[3] = fb->depthBuf ? fb->depthMask : 0;
+
68 GPUCMD_AddIncrementalWrites(GPUREG_COLORBUFFER_READ, param, 4);
+
69}
+
70
+
71void C3D_FrameBufClear(C3D_FrameBuf* frameBuf, C3D_ClearBits clearBits, u32 clearColor, u32 clearDepth)
+
72{
+
73 u32 size = (u32)frameBuf->width * frameBuf->height;
+
74 u32 cfs = colorFmtSizes[frameBuf->colorFmt];
+
75 u32 dfs = depthFmtSizes[frameBuf->depthFmt];
+
76 void* colorBufEnd = (u8*)frameBuf->colorBuf + size*(2+cfs);
+
77 void* depthBufEnd = (u8*)frameBuf->depthBuf + size*(2+dfs);
+
78
+
79 if (clearBits & C3D_CLEAR_COLOR)
+
80 {
+
81 if (clearBits & C3D_CLEAR_DEPTH)
+
82 GX_MemoryFill(
+
83 (u32*)frameBuf->colorBuf, clearColor, (u32*)colorBufEnd, BIT(0) | (cfs << 8),
+
84 (u32*)frameBuf->depthBuf, clearDepth, (u32*)depthBufEnd, BIT(0) | (dfs << 8));
+
85 else
+
86 GX_MemoryFill(
+
87 (u32*)frameBuf->colorBuf, clearColor, (u32*)colorBufEnd, BIT(0) | (cfs << 8),
+
88 NULL, 0, NULL, 0);
+
89 } else
+
90 GX_MemoryFill(
+
91 (u32*)frameBuf->depthBuf, clearDepth, (u32*)depthBufEnd, BIT(0) | (dfs << 8),
+
92 NULL, 0, NULL, 0);
+
93}
+
94
+
95void C3D_FrameBufTransfer(C3D_FrameBuf* frameBuf, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
+
96{
+
97 u32* outputFrameBuf = (u32*)gfxGetFramebuffer(screen, side, NULL, NULL);
+
98 u32 dim = GX_BUFFER_DIM((u32)frameBuf->width, (u32)frameBuf->height);
+
99 GX_DisplayTransfer((u32*)frameBuf->colorBuf, dim, outputFrameBuf, dim, transferFlags);
+
100}
+
C3D_FrameBuf * C3D_GetFrameBuf(void)
Definition: framebuffer.c:18
+
void C3D_FrameBufTex(C3D_FrameBuf *fb, C3D_Tex *tex, GPU_TEXFACE face, int level)
Definition: framebuffer.c:41
+
void C3D_FrameBufTransfer(C3D_FrameBuf *frameBuf, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
Definition: framebuffer.c:95
+
u32 C3D_CalcColorBufSize(u32 width, u32 height, GPU_COLORBUF fmt)
Definition: framebuffer.c:6
+
void C3D_FrameBufClear(C3D_FrameBuf *frameBuf, C3D_ClearBits clearBits, u32 clearColor, u32 clearDepth)
Definition: framebuffer.c:71
+
u32 C3D_CalcDepthBufSize(u32 width, u32 height, GPU_DEPTHBUF fmt)
Definition: framebuffer.c:12
+
void C3D_SetFrameBuf(C3D_FrameBuf *fb)
Definition: framebuffer.c:29
+
void C3Di_FrameBufBind(C3D_FrameBuf *fb)
Definition: framebuffer.c:49
+ +
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_FrameBuf
Definition: internal.h:80
+ +
u32 flags
Definition: internal.h:38
+
C3D_FrameBuf fb
Definition: internal.h:65
+
+
+ + + + diff --git a/docs/html/functions.html b/docs/html/functions.html new file mode 100644 index 0000000..4c911ec --- /dev/null +++ b/docs/html/functions.html @@ -0,0 +1,234 @@ + + + + + + + +Citro3d: Class Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+ + +

- w -

+ + +

- z -

+
+
+ + + + diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html new file mode 100644 index 0000000..f3f2f63 --- /dev/null +++ b/docs/html/functions_vars.html @@ -0,0 +1,234 @@ + + + + + + + +Citro3d: Class Members - Variables + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+ + +

- w -

+ + +

- z -

+
+
+ + + + diff --git a/docs/html/gas_8c.html b/docs/html/gas_8c.html new file mode 100644 index 0000000..942f4ba --- /dev/null +++ b/docs/html/gas_8c.html @@ -0,0 +1,399 @@ + + + + + + + +Citro3d: source/gas.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
gas.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void GasLut_FromArray (C3D_GasLut *lut, const u32 data[9])
 
void C3D_GasBeginAcc (void)
 
void C3D_GasDeltaZ (float value)
 
void C3D_GasAccMax (float value)
 
void C3D_GasAttn (float value)
 
void C3D_GasLightPlanar (float min, float max, float attn)
 
void C3D_GasLightView (float min, float max, float attn)
 
void C3D_GasLightDirection (float dotp)
 
void C3D_GasLutInput (GPU_GASLUTINPUT input)
 
void C3D_GasLutBind (C3D_GasLut *lut)
 
void C3Di_GasUpdate (C3D_Context *ctx)
 
+

Function Documentation

+ +

◆ C3D_GasAccMax()

+ +
+
+ + + + + + + + +
void C3D_GasAccMax (float value)
+
+ +

Definition at line 64 of file gas.c.

+ +
+
+ +

◆ C3D_GasAttn()

+ +
+
+ + + + + + + + +
void C3D_GasAttn (float value)
+
+ +

Definition at line 76 of file gas.c.

+ +
+
+ +

◆ C3D_GasBeginAcc()

+ +
+
+ + + + + + + + +
void C3D_GasBeginAcc (void )
+
+ +

Definition at line 42 of file gas.c.

+ +
+
+ +

◆ C3D_GasDeltaZ()

+ +
+
+ + + + + + + + +
void C3D_GasDeltaZ (float value)
+
+ +

Definition at line 52 of file gas.c.

+ +
+
+ +

◆ C3D_GasLightDirection()

+ +
+
+ + + + + + + + +
void C3D_GasLightDirection (float dotp)
+
+ +

Definition at line 112 of file gas.c.

+ +
+
+ +

◆ C3D_GasLightPlanar()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_GasLightPlanar (float min,
float max,
float attn 
)
+
+ +

Definition at line 88 of file gas.c.

+ +
+
+ +

◆ C3D_GasLightView()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_GasLightView (float min,
float max,
float attn 
)
+
+ +

Definition at line 100 of file gas.c.

+ +
+
+ +

◆ C3D_GasLutBind()

+ +
+
+ + + + + + + + +
void C3D_GasLutBind (C3D_GasLut * lut)
+
+ +

Definition at line 138 of file gas.c.

+ +
+
+ +

◆ C3D_GasLutInput()

+ +
+
+ + + + + + + + +
void C3D_GasLutInput (GPU_GASLUTINPUT input)
+
+ +

Definition at line 125 of file gas.c.

+ +
+
+ +

◆ C3Di_GasUpdate()

+ +
+
+ + + + + + + + +
void C3Di_GasUpdate (C3D_Contextctx)
+
+ +

Definition at line 153 of file gas.c.

+ +
+
+ +

◆ GasLut_FromArray()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void GasLut_FromArray (C3D_GasLut * lut,
const u32 data[9] 
)
+
+ +

Definition at line 30 of file gas.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/gas_8c.js b/docs/html/gas_8c.js new file mode 100644 index 0000000..2649314 --- /dev/null +++ b/docs/html/gas_8c.js @@ -0,0 +1,14 @@ +var gas_8c = +[ + [ "C3D_GasAccMax", "gas_8c.html#a66e43fb45a078cda3b69bf34977a6c3f", null ], + [ "C3D_GasAttn", "gas_8c.html#a6ae41647f4fe68ce9b85be7645508385", null ], + [ "C3D_GasBeginAcc", "gas_8c.html#a6efe9090dee9469ff9857561d5067e4c", null ], + [ "C3D_GasDeltaZ", "gas_8c.html#a4081c60804943b4eb960c56add623154", null ], + [ "C3D_GasLightDirection", "gas_8c.html#afa0b22b5c51898fe3a57166eb2c8fbf2", null ], + [ "C3D_GasLightPlanar", "gas_8c.html#a3bb70069dc9d5130060d478691044ce3", null ], + [ "C3D_GasLightView", "gas_8c.html#a651dcc05b26e47c345a997e73369366f", null ], + [ "C3D_GasLutBind", "gas_8c.html#ae97c37523a4b07711c94388c43819f07", null ], + [ "C3D_GasLutInput", "gas_8c.html#a0897bb3e7eb6f5ac4e64a52f25739e0d", null ], + [ "C3Di_GasUpdate", "gas_8c.html#a8caed26d6204363f215976aaa7e05e6c", null ], + [ "GasLut_FromArray", "gas_8c.html#aa4dce96b8bebc6f9c3894cb9a17cbe16", null ] +]; \ No newline at end of file diff --git a/docs/html/gas_8c_source.html b/docs/html/gas_8c_source.html new file mode 100644 index 0000000..54c7326 --- /dev/null +++ b/docs/html/gas_8c_source.html @@ -0,0 +1,319 @@ + + + + + + + +Citro3d: source/gas.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
gas.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3static inline u32 calc_diff(u32 a, u32 b, int pos)
+
4{
+
5 float fa = ((a>>pos)&0xFF)/255.0f;
+
6 float fb = ((b>>pos)&0xFF)/255.0f;
+
7 float x = fb-fa;
+
8 u32 diff = 0;
+
9 if (x < 0)
+
10 {
+
11 diff = 0x80;
+
12 x = -x;
+
13 }
+
14 diff |= (u32)(x*0x7F);
+
15 return diff<<pos;
+
16}
+
17
+
18static inline u32 conv_u8(float x, int pos)
+
19{
+
20 if (x < 0.0f) x = 0.0f;
+
21 else if (x > 1.0f) x = 1.0f;
+
22 return ((u32)x*255)<<pos;
+
23}
+
24
+
25static inline u32 color_diff(u32 a, u32 b)
+
26{
+
27 return calc_diff(a,b,0) | calc_diff(a,b,8) | calc_diff(a,b,16);
+
28}
+
29
+
30void GasLut_FromArray(C3D_GasLut* lut, const u32 data[9])
+
31{
+
32 int i;
+
33 for (i = 0; i <= 8; i ++)
+
34 {
+
35 if (i < 8)
+
36 lut->color[i] = data[i];
+
37 if (i > 0)
+
38 lut->diff[i-1] = color_diff(data[i-1], data[i]);
+
39 }
+
40}
+
41
+ +
43{
+
44 C3D_Context* ctx = C3Di_GetContext();
+
45
+
46 if (!(ctx->flags & C3DiF_Active))
+
47 return;
+
48
+ +
50}
+
51
+
52void C3D_GasDeltaZ(float value)
+
53{
+
54 C3D_Context* ctx = C3Di_GetContext();
+
55
+
56 if (!(ctx->flags & C3DiF_Active))
+
57 return;
+
58
+
59 ctx->flags |= C3DiF_Gas;
+
60 ctx->gasDeltaZ = (u32)(value*0x100);
+ +
62}
+
63
+
64void C3D_GasAccMax(float value)
+
65{
+
66 C3D_Context* ctx = C3Di_GetContext();
+
67
+
68 if (!(ctx->flags & C3DiF_Active))
+
69 return;
+
70
+
71 ctx->flags |= C3DiF_Gas;
+
72 ctx->gasAccMax = f32tof16(1.0f / value);
+ +
74}
+
75
+
76void C3D_GasAttn(float value)
+
77{
+
78 C3D_Context* ctx = C3Di_GetContext();
+
79
+
80 if (!(ctx->flags & C3DiF_Active))
+
81 return;
+
82
+
83 ctx->flags |= C3DiF_Gas;
+
84 ctx->gasAttn = f32tof16(value);
+ +
86}
+
87
+
88void C3D_GasLightPlanar(float min, float max, float attn)
+
89{
+
90 C3D_Context* ctx = C3Di_GetContext();
+
91
+
92 if (!(ctx->flags & C3DiF_Active))
+
93 return;
+
94
+
95 ctx->flags |= C3DiF_Gas;
+
96 ctx->gasLightXY = conv_u8(min,0) | conv_u8(max,8) | conv_u8(attn,16);
+ +
98}
+
99
+
100void C3D_GasLightView(float min, float max, float attn)
+
101{
+
102 C3D_Context* ctx = C3Di_GetContext();
+
103
+
104 if (!(ctx->flags & C3DiF_Active))
+
105 return;
+
106
+
107 ctx->flags |= C3DiF_Gas;
+
108 ctx->gasLightZ = conv_u8(min,0) | conv_u8(max,8) | conv_u8(attn,16);
+ +
110}
+
111
+
112void C3D_GasLightDirection(float dotp)
+
113{
+
114 C3D_Context* ctx = C3Di_GetContext();
+
115
+
116 if (!(ctx->flags & C3DiF_Active))
+
117 return;
+
118
+
119 ctx->flags |= C3DiF_Gas;
+
120 ctx->gasLightZColor &= ~0xFF;
+
121 ctx->gasLightZColor |= conv_u8(dotp,0);
+ +
123}
+
124
+
125void C3D_GasLutInput(GPU_GASLUTINPUT input)
+
126{
+
127 C3D_Context* ctx = C3Di_GetContext();
+
128
+
129 if (!(ctx->flags & C3DiF_Active))
+
130 return;
+
131
+
132 ctx->flags |= C3DiF_Gas;
+
133 ctx->gasLightZColor &= ~0x100;
+
134 ctx->gasLightZColor |= (input&1)<<8;
+ +
136}
+
137
+
138void C3D_GasLutBind(C3D_GasLut* lut)
+
139{
+
140 C3D_Context* ctx = C3Di_GetContext();
+
141
+
142 if (!(ctx->flags & C3DiF_Active))
+
143 return;
+
144
+
145 if (lut)
+
146 {
+
147 ctx->flags |= C3DiF_GasLut;
+
148 ctx->gasLut = lut;
+
149 } else
+
150 ctx->flags &= ~C3DiF_GasLut;
+
151}
+
152
+ +
154{
+
155 if (ctx->flags & C3DiF_Gas)
+
156 {
+
157 ctx->flags &= ~C3DiF_Gas;
+
158 u32 gasFlags = ctx->gasFlags;
+
159 ctx->gasFlags = 0;
+
160
+
161 if (gasFlags & C3DiG_BeginAcc)
+
162 GPUCMD_AddMaskedWrite(GPUREG_GAS_ACCMAX_FEEDBACK, 0x3, 0);
+
163 if (gasFlags & C3DiG_AccStage)
+
164 GPUCMD_AddMaskedWrite(GPUREG_GAS_DELTAZ_DEPTH, 0x7, ctx->gasDeltaZ);
+
165 if (gasFlags & C3DiG_SetAccMax)
+
166 GPUCMD_AddWrite(GPUREG_GAS_ACCMAX, ctx->gasAccMax);
+
167 if (gasFlags & C3DiG_RenderStage)
+
168 {
+
169 GPUCMD_AddWrite(GPUREG_GAS_ATTENUATION, ctx->gasAttn);
+
170 GPUCMD_AddWrite(GPUREG_GAS_LIGHT_XY, ctx->gasLightXY);
+
171 GPUCMD_AddWrite(GPUREG_GAS_LIGHT_Z, ctx->gasLightZ);
+
172 GPUCMD_AddWrite(GPUREG_GAS_LIGHT_Z_COLOR, ctx->gasLightZColor);
+
173 }
+
174 }
+
175 if (ctx->flags & C3DiF_GasLut)
+
176 {
+
177 ctx->flags &= ~C3DiF_GasLut;
+
178 if (ctx->gasLut)
+
179 {
+
180 GPUCMD_AddWrite(GPUREG_GAS_LUT_INDEX, 0);
+
181 GPUCMD_AddWrites(GPUREG_GAS_LUT_DATA, (u32*)ctx->gasLut, 16);
+
182 }
+
183 }
+
184}
+
void C3D_GasLutInput(GPU_GASLUTINPUT input)
Definition: gas.c:125
+
void C3D_GasLightPlanar(float min, float max, float attn)
Definition: gas.c:88
+
void C3D_GasDeltaZ(float value)
Definition: gas.c:52
+
void C3D_GasLightView(float min, float max, float attn)
Definition: gas.c:100
+
void C3D_GasAccMax(float value)
Definition: gas.c:64
+
void C3D_GasAttn(float value)
Definition: gas.c:76
+
void C3D_GasBeginAcc(void)
Definition: gas.c:42
+
void C3Di_GasUpdate(C3D_Context *ctx)
Definition: gas.c:153
+
void GasLut_FromArray(C3D_GasLut *lut, const u32 data[9])
Definition: gas.c:30
+
void C3D_GasLutBind(C3D_GasLut *lut)
Definition: gas.c:138
+
void C3D_GasLightDirection(float dotp)
Definition: gas.c:112
+ +
@ C3DiF_Gas
Definition: internal.h:92
+
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_GasLut
Definition: internal.h:93
+
@ C3DiG_BeginAcc
Definition: internal.h:105
+
@ C3DiG_RenderStage
Definition: internal.h:108
+
@ C3DiG_SetAccMax
Definition: internal.h:107
+
@ C3DiG_AccStage
Definition: internal.h:106
+ +
u32 flags
Definition: internal.h:38
+
u32 gasLightZColor
Definition: internal.h:56
+
u32 gasLightXY
Definition: internal.h:56
+
u16 gasAttn
Definition: internal.h:55
+
u16 gasAccMax
Definition: internal.h:55
+
u32 gasFlags
Definition: internal.h:58
+
u32 gasDeltaZ
Definition: internal.h:57
+
C3D_GasLut * gasLut
Definition: internal.h:59
+
u32 gasLightZ
Definition: internal.h:56
+
float24Uniform_s * data
Definition: uniforms.c:16
+
+
+ + + + diff --git a/docs/html/globals.html b/docs/html/globals.html new file mode 100644 index 0000000..7e08aa4 --- /dev/null +++ b/docs/html/globals.html @@ -0,0 +1,107 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- _ -

+
+
+ + + + diff --git a/docs/html/globals_a.html b/docs/html/globals_a.html new file mode 100644 index 0000000..a21850f --- /dev/null +++ b/docs/html/globals_a.html @@ -0,0 +1,108 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- a -

+
+
+ + + + diff --git a/docs/html/globals_b.html b/docs/html/globals_b.html new file mode 100644 index 0000000..a204696 --- /dev/null +++ b/docs/html/globals_b.html @@ -0,0 +1,108 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- b -

+
+
+ + + + diff --git a/docs/html/globals_c.html b/docs/html/globals_c.html new file mode 100644 index 0000000..54e756b --- /dev/null +++ b/docs/html/globals_c.html @@ -0,0 +1,273 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- c -

+
+
+ + + + diff --git a/docs/html/globals_d.html b/docs/html/globals_d.html new file mode 100644 index 0000000..37d5b49 --- /dev/null +++ b/docs/html/globals_d.html @@ -0,0 +1,107 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- d -

+
+
+ + + + diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html new file mode 100644 index 0000000..da09be8 --- /dev/null +++ b/docs/html/globals_defs.html @@ -0,0 +1,108 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ + + + diff --git a/docs/html/globals_dup.js b/docs/html/globals_dup.js new file mode 100644 index 0000000..7281547 --- /dev/null +++ b/docs/html/globals_dup.js @@ -0,0 +1,14 @@ +var globals_dup = +[ + [ "_", "globals.html", null ], + [ "a", "globals_a.html", null ], + [ "b", "globals_b.html", null ], + [ "c", "globals_c.html", null ], + [ "d", "globals_d.html", null ], + [ "f", "globals_f.html", null ], + [ "g", "globals_g.html", null ], + [ "l", "globals_l.html", null ], + [ "m", "globals_m.html", null ], + [ "p", "globals_p.html", null ], + [ "t", "globals_t.html", null ] +]; \ No newline at end of file diff --git a/docs/html/globals_eval.html b/docs/html/globals_eval.html new file mode 100644 index 0000000..b0aa7b3 --- /dev/null +++ b/docs/html/globals_eval.html @@ -0,0 +1,129 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ + + + diff --git a/docs/html/globals_f.html b/docs/html/globals_f.html new file mode 100644 index 0000000..f0be963 --- /dev/null +++ b/docs/html/globals_f.html @@ -0,0 +1,107 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- f -

    +
  • FogLut_Exp() : fog.c
  • +
  • FogLut_FromArray() : fog.c
  • +
+
+
+ + + + diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html new file mode 100644 index 0000000..7530da9 --- /dev/null +++ b/docs/html/globals_func.html @@ -0,0 +1,298 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- f -

    +
  • FogLut_Exp() : fog.c
  • +
  • FogLut_FromArray() : fog.c
  • +
+ + +

- g -

    +
  • GasLut_FromArray() : gas.c
  • +
+ + +

- l -

+ + +

- m -

+ + +

- p -

+ + +

- t -

+
+
+ + + + diff --git a/docs/html/globals_g.html b/docs/html/globals_g.html new file mode 100644 index 0000000..92243eb --- /dev/null +++ b/docs/html/globals_g.html @@ -0,0 +1,106 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- g -

    +
  • GasLut_FromArray() : gas.c
  • +
+
+
+ + + + diff --git a/docs/html/globals_l.html b/docs/html/globals_l.html new file mode 100644 index 0000000..f5d38bd --- /dev/null +++ b/docs/html/globals_l.html @@ -0,0 +1,108 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- l -

+
+
+ + + + diff --git a/docs/html/globals_m.html b/docs/html/globals_m.html new file mode 100644 index 0000000..1d4bd58 --- /dev/null +++ b/docs/html/globals_m.html @@ -0,0 +1,110 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- m -

+
+
+ + + + diff --git a/docs/html/globals_p.html b/docs/html/globals_p.html new file mode 100644 index 0000000..2a983bf --- /dev/null +++ b/docs/html/globals_p.html @@ -0,0 +1,107 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- p -

+
+
+ + + + diff --git a/docs/html/globals_t.html b/docs/html/globals_t.html new file mode 100644 index 0000000..10945f7 --- /dev/null +++ b/docs/html/globals_t.html @@ -0,0 +1,113 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all file members with links to the files they belong to:
+ +

- t -

+
+
+ + + + diff --git a/docs/html/globals_vars.html b/docs/html/globals_vars.html new file mode 100644 index 0000000..2d7b1ea --- /dev/null +++ b/docs/html/globals_vars.html @@ -0,0 +1,114 @@ + + + + + + + +Citro3d: File Members + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
+
+ + + + diff --git a/docs/html/immediate_8c.html b/docs/html/immediate_8c.html new file mode 100644 index 0000000..fa26652 --- /dev/null +++ b/docs/html/immediate_8c.html @@ -0,0 +1,203 @@ + + + + + + + +Citro3d: source/immediate.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
immediate.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

void C3D_ImmDrawBegin (GPU_Primitive_t primitive)
 
void C3D_ImmSendAttrib (float x, float y, float z, float w)
 
void C3D_ImmDrawEnd (void)
 
+

Function Documentation

+ +

◆ C3D_ImmDrawBegin()

+ +
+
+ + + + + + + + +
void C3D_ImmDrawBegin (GPU_Primitive_t primitive)
+
+ +

Definition at line 3 of file immediate.c.

+ +
+
+ +

◆ C3D_ImmDrawEnd()

+ +
+
+ + + + + + + + +
void C3D_ImmDrawEnd (void )
+
+ +

Definition at line 57 of file immediate.c.

+ +
+
+ +

◆ C3D_ImmSendAttrib()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_ImmSendAttrib (float x,
float y,
float z,
float w 
)
+
+ +

Definition at line 28 of file immediate.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/immediate_8c.js b/docs/html/immediate_8c.js new file mode 100644 index 0000000..0ff1112 --- /dev/null +++ b/docs/html/immediate_8c.js @@ -0,0 +1,6 @@ +var immediate_8c = +[ + [ "C3D_ImmDrawBegin", "immediate_8c.html#a4cd0c7092d4dcc36e4299c409af0df95", null ], + [ "C3D_ImmDrawEnd", "immediate_8c.html#a017fa75cabcc13abb1136b78522e7cda", null ], + [ "C3D_ImmSendAttrib", "immediate_8c.html#a772832b686a6197596c50ae4ef883bf1", null ] +]; \ No newline at end of file diff --git a/docs/html/immediate_8c_source.html b/docs/html/immediate_8c_source.html new file mode 100644 index 0000000..e5532af --- /dev/null +++ b/docs/html/immediate_8c_source.html @@ -0,0 +1,178 @@ + + + + + + + +Citro3d: source/immediate.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
immediate.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void C3D_ImmDrawBegin(GPU_Primitive_t primitive)
+
4{
+ +
6
+
7 // Set primitive type
+
8 GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 2, primitive);
+
9 // Start a new primitive (breaks off a triangle strip/fan)
+
10 GPUCMD_AddWrite(GPUREG_RESTART_PRIMITIVE, 1);
+
11 // Not sure if this command is necessary
+
12 GPUCMD_AddWrite(GPUREG_INDEXBUFFER_CONFIG, 0x80000000);
+
13 // Enable vertex submission mode
+
14 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 1, 1);
+
15 // Enable drawing mode
+
16 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 0);
+
17 // Begin immediate-mode vertex submission
+
18 GPUCMD_AddWrite(GPUREG_FIXEDATTRIB_INDEX, 0xF);
+
19}
+
20
+
21static inline void write24(u8* p, u32 val)
+
22{
+
23 p[0] = val;
+
24 p[1] = val>>8;
+
25 p[2] = val>>16;
+
26}
+
27
+
28void C3D_ImmSendAttrib(float x, float y, float z, float w)
+
29{
+
30 union
+
31 {
+
32 u32 packed[3];
+
33 struct
+
34 {
+
35 u8 x[3];
+
36 u8 y[3];
+
37 u8 z[3];
+
38 u8 w[3];
+
39 };
+
40 } param;
+
41
+
42 // Convert the values to float24
+
43 write24(param.x, f32tof24(x));
+
44 write24(param.y, f32tof24(y));
+
45 write24(param.z, f32tof24(z));
+
46 write24(param.w, f32tof24(w));
+
47
+
48 // Reverse the packed words
+
49 u32 p = param.packed[0];
+
50 param.packed[0] = param.packed[2];
+
51 param.packed[2] = p;
+
52
+
53 // Send the attribute
+
54 GPUCMD_AddIncrementalWrites(GPUREG_FIXEDATTRIB_DATA0, param.packed, 3);
+
55}
+
56
+ +
58{
+
59 // Go back to configuration mode
+
60 GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 1);
+
61 // Disable vertex submission mode
+
62 GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 1, 0);
+
63 // Clear the post-vertex cache
+
64 GPUCMD_AddWrite(GPUREG_VTX_FUNC, 1);
+
65
+
66 C3Di_GetContext()->flags |= C3DiF_DrawUsed;
+
67}
+
void C3Di_UpdateContext(void)
Definition: base.c:158
+
void C3D_ImmDrawEnd(void)
Definition: immediate.c:57
+
void C3D_ImmDrawBegin(GPU_Primitive_t primitive)
Definition: immediate.c:3
+
void C3D_ImmSendAttrib(float x, float y, float z, float w)
Definition: immediate.c:28
+ +
@ C3DiF_DrawUsed
Definition: internal.h:76
+
+
+ + + + diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..e2a8678 --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,104 @@ + + + + + + + +Citro3d: Main Page + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Citro3d Documentation
+
+
+
+
+ + + + diff --git a/docs/html/internal_8h.html b/docs/html/internal_8h.html new file mode 100644 index 0000000..5e30b34 --- /dev/null +++ b/docs/html/internal_8h.html @@ -0,0 +1,748 @@ + + + + + + + +Citro3d: source/internal.h File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
internal.h File Reference
+
+
+
#include <c3d/attribs.h>
+#include <c3d/buffers.h>
+#include <c3d/proctex.h>
+#include <c3d/light.h>
+#include <c3d/framebuffer.h>
+#include <c3d/texenv.h>
+#include <c3d/fog.h>
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

struct  C3D_Effect
 
struct  C3D_Context
 
+ + + + + + + + + +

+Macros

#define C3D_UNUSED   __attribute__((unused))
 
#define C3DiF_ProcTexLut(n)   BIT(20+(n))
 
#define C3DiF_Tex(n)   BIT(23+(n))
 
#define C3DiF_TexEnv(n)   BIT(26+(n))
 
+ + + + + +

+Enumerations

enum  {
+  C3DiF_Active = BIT(0) +, C3DiF_DrawUsed = BIT(1) +, C3DiF_AttrInfo = BIT(2) +, C3DiF_BufInfo = BIT(3) +,
+  C3DiF_Effect = BIT(4) +, C3DiF_FrameBuf = BIT(5) +, C3DiF_Viewport = BIT(6) +, C3DiF_Scissor = BIT(7) +,
+  C3DiF_Program = BIT(8) +, C3DiF_TexEnvBuf = BIT(9) +, C3DiF_LightEnv = BIT(10) +, C3DiF_VshCode = BIT(11) +,
+  C3DiF_GshCode = BIT(12) +, C3DiF_TexStatus = BIT(14) +, C3DiF_ProcTex = BIT(15) +, C3DiF_ProcTexColorLut = BIT(16) +,
+  C3DiF_FogLut = BIT(17) +, C3DiF_Gas = BIT(18) +, C3DiF_GasLut = BIT(19) +, C3DiF_ProcTexLutAll = 7 << 20 +,
+  C3DiF_TexAll = 7 << 23 +, C3DiF_TexEnvAll = 0x3F << 26 +
+ }
 
enum  { C3DiG_BeginAcc = BIT(0) +, C3DiG_AccStage = BIT(1) +, C3DiG_SetAccMax = BIT(2) +, C3DiG_RenderStage = BIT(3) + }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void C3Di_UpdateContext (void)
 
void C3Di_AttrInfoBind (C3D_AttrInfo *info)
 
void C3Di_BufInfoBind (C3D_BufInfo *info)
 
void C3Di_FrameBufBind (C3D_FrameBuf *fb)
 
void C3Di_TexEnvBind (int id, C3D_TexEnv *env)
 
void C3Di_SetTex (int unit, C3D_Tex *tex)
 
void C3Di_EffectBind (C3D_Effect *effect)
 
void C3Di_GasUpdate (C3D_Context *ctx)
 
void C3Di_LightMtlBlend (C3D_Light *light)
 
void C3Di_DirtyUniforms (GPU_SHADER_TYPE type)
 
void C3Di_LoadShaderUniforms (shaderInstance_s *si)
 
void C3Di_ClearShaderUniforms (GPU_SHADER_TYPE type)
 
bool C3Di_SplitFrame (u32 **pBuf, u32 *pSize)
 
void C3Di_RenderQueueInit (void)
 
void C3Di_RenderQueueExit (void)
 
void C3Di_RenderQueueWaitDone (void)
 
void C3Di_RenderQueueEnableVBlank (void)
 
void C3Di_RenderQueueDisableVBlank (void)
 
+

Macro Definition Documentation

+ +

◆ C3D_UNUSED

+ +
+
+ + + + +
#define C3D_UNUSED   __attribute__((unused))
+
+ +

Definition at line 10 of file internal.h.

+ +
+
+ +

◆ C3DiF_ProcTexLut

+ +
+
+ + + + + + + + +
#define C3DiF_ProcTexLut( n)   BIT(20+(n))
+
+ +

Definition at line 95 of file internal.h.

+ +
+
+ +

◆ C3DiF_Tex

+ +
+
+ + + + + + + + +
#define C3DiF_Tex( n)   BIT(23+(n))
+
+ +

Definition at line 97 of file internal.h.

+ +
+
+ +

◆ C3DiF_TexEnv

+ +
+
+ + + + + + + + +
#define C3DiF_TexEnv( n)   BIT(26+(n))
+
+ +

Definition at line 99 of file internal.h.

+ +
+
+

Enumeration Type Documentation

+ +

◆ anonymous enum

+ +
+
+ + + + +
anonymous enum
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Enumerator
C3DiF_Active 
C3DiF_DrawUsed 
C3DiF_AttrInfo 
C3DiF_BufInfo 
C3DiF_Effect 
C3DiF_FrameBuf 
C3DiF_Viewport 
C3DiF_Scissor 
C3DiF_Program 
C3DiF_TexEnvBuf 
C3DiF_LightEnv 
C3DiF_VshCode 
C3DiF_GshCode 
C3DiF_TexStatus 
C3DiF_ProcTex 
C3DiF_ProcTexColorLut 
C3DiF_FogLut 
C3DiF_Gas 
C3DiF_GasLut 
C3DiF_ProcTexLutAll 
C3DiF_TexAll 
C3DiF_TexEnvAll 
+ +

Definition at line 73 of file internal.h.

+ +
+
+ +

◆ anonymous enum

+ +
+
+ + + + +
anonymous enum
+
+ + + + + +
Enumerator
C3DiG_BeginAcc 
C3DiG_AccStage 
C3DiG_SetAccMax 
C3DiG_RenderStage 
+ +

Definition at line 103 of file internal.h.

+ +
+
+

Function Documentation

+ +

◆ C3Di_AttrInfoBind()

+ +
+
+ + + + + + + + +
void C3Di_AttrInfoBind (C3D_AttrInfo * info)
+
+ +

Definition at line 59 of file attribs.c.

+ +
+
+ +

◆ C3Di_BufInfoBind()

+ +
+
+ + + + + + + + +
void C3Di_BufInfoBind (C3D_BufInfo * info)
+
+ +

Definition at line 49 of file buffers.c.

+ +
+
+ +

◆ C3Di_ClearShaderUniforms()

+ +
+
+ + + + + + + + +
void C3Di_ClearShaderUniforms (GPU_SHADER_TYPE type)
+
+ +

Definition at line 129 of file uniforms.c.

+ +
+
+ +

◆ C3Di_DirtyUniforms()

+ +
+
+ + + + + + + + +
void C3Di_DirtyUniforms (GPU_SHADER_TYPE type)
+
+ +

Definition at line 87 of file uniforms.c.

+ +
+
+ +

◆ C3Di_EffectBind()

+ +
+
+ + + + + + + + +
void C3Di_EffectBind (C3D_Effecteffect)
+
+ +

Definition at line 90 of file effect.c.

+ +
+
+ +

◆ C3Di_FrameBufBind()

+ +
+
+ + + + + + + + +
void C3Di_FrameBufBind (C3D_FrameBuf * fb)
+
+ +

Definition at line 49 of file framebuffer.c.

+ +
+
+ +

◆ C3Di_GasUpdate()

+ +
+
+ + + + + + + + +
void C3Di_GasUpdate (C3D_Contextctx)
+
+ +

Definition at line 153 of file gas.c.

+ +
+
+ +

◆ C3Di_LightMtlBlend()

+ +
+
+ + + + + + + + +
void C3Di_LightMtlBlend (C3D_Light * light)
+
+ +

Definition at line 3 of file light.c.

+ +
+
+ +

◆ C3Di_LoadShaderUniforms()

+ +
+
+ + + + + + + + +
void C3Di_LoadShaderUniforms (shaderInstance_s * si)
+
+ +

Definition at line 99 of file uniforms.c.

+ +
+
+ +

◆ C3Di_RenderQueueDisableVBlank()

+ +
+
+ + + + + + + + +
void C3Di_RenderQueueDisableVBlank (void )
+
+ +

Definition at line 108 of file renderqueue.c.

+ +
+
+ +

◆ C3Di_RenderQueueEnableVBlank()

+ +
+
+ + + + + + + + +
void C3Di_RenderQueueEnableVBlank (void )
+
+ +

Definition at line 102 of file renderqueue.c.

+ +
+
+ +

◆ C3Di_RenderQueueExit()

+ +
+
+ + + + + + + + +
void C3Di_RenderQueueExit (void )
+
+ +

Definition at line 125 of file renderqueue.c.

+ +
+
+ +

◆ C3Di_RenderQueueInit()

+ +
+
+ + + + + + + + +
void C3Di_RenderQueueInit (void )
+
+ +

Definition at line 114 of file renderqueue.c.

+ +
+
+ +

◆ C3Di_RenderQueueWaitDone()

+ +
+
+ + + + + + + + +
void C3Di_RenderQueueWaitDone (void )
+
+ +

Definition at line 146 of file renderqueue.c.

+ +
+
+ +

◆ C3Di_SetTex()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3Di_SetTex (int unit,
C3D_Tex * tex 
)
+
+ +

Definition at line 265 of file texture.c.

+ +
+
+ +

◆ C3Di_SplitFrame()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool C3Di_SplitFrame (u32 ** pBuf,
u32 * pSize 
)
+
+ +

Definition at line 309 of file base.c.

+ +
+
+ +

◆ C3Di_TexEnvBind()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3Di_TexEnvBind (int id,
C3D_TexEnv * env 
)
+
+ +

Definition at line 40 of file texenv.c.

+ +
+
+ +

◆ C3Di_UpdateContext()

+ +
+
+ + + + + + + + +
void C3Di_UpdateContext (void )
+
+ +

Definition at line 158 of file base.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/internal_8h.js b/docs/html/internal_8h.js new file mode 100644 index 0000000..2bb4f56 --- /dev/null +++ b/docs/html/internal_8h.js @@ -0,0 +1,27 @@ +var internal_8h = +[ + [ "C3D_Effect", "struct_c3_d___effect.html", "struct_c3_d___effect" ], + [ "C3D_Context", "struct_c3_d___context.html", "struct_c3_d___context" ], + [ "C3D_UNUSED", "internal_8h.html#a951496897ceef07fbde38ba6a247aaac", null ], + [ "C3DiF_ProcTexLut", "internal_8h.html#a6f06d00aa6c07b4e6aefd1d7abd71459", null ], + [ "C3DiF_Tex", "internal_8h.html#a387e2013baca693d8c923f75f2bc0fc9", null ], + [ "C3DiF_TexEnv", "internal_8h.html#a5c1cc19e34f2546befdd67706ed6e70a", null ], + [ "C3Di_AttrInfoBind", "internal_8h.html#ac600ec36cc12c6473e0574f38ce2a6ef", null ], + [ "C3Di_BufInfoBind", "internal_8h.html#a49e592c82e10a02ca46a91745ba53182", null ], + [ "C3Di_ClearShaderUniforms", "internal_8h.html#ae0d0cabc17e43f2ab2368a390e283759", null ], + [ "C3Di_DirtyUniforms", "internal_8h.html#a3122c009e7f6b5e2fb570003212fad73", null ], + [ "C3Di_EffectBind", "internal_8h.html#a4fd792654ea1facdfa6dbda29b7f4914", null ], + [ "C3Di_FrameBufBind", "internal_8h.html#abdac0a0f522dddd85db6e17f03e20121", null ], + [ "C3Di_GasUpdate", "internal_8h.html#a8caed26d6204363f215976aaa7e05e6c", null ], + [ "C3Di_LightMtlBlend", "internal_8h.html#a5e20dd6f18115396537df0713e22a0b4", null ], + [ "C3Di_LoadShaderUniforms", "internal_8h.html#a50e19b086244713ca897d5cb8a1a1e86", null ], + [ "C3Di_RenderQueueDisableVBlank", "internal_8h.html#a73b8cdfbcd16488c7a6a54dade6ae470", null ], + [ "C3Di_RenderQueueEnableVBlank", "internal_8h.html#a765ddd29aa58ce4598429750d3f692a5", null ], + [ "C3Di_RenderQueueExit", "internal_8h.html#aa8202fe4deb317840c5ca9516d7813f2", null ], + [ "C3Di_RenderQueueInit", "internal_8h.html#a15d6ad6f422fcb523ff7ddf6808f959c", null ], + [ "C3Di_RenderQueueWaitDone", "internal_8h.html#a7cde967201bd3128dc49b7cc7d065ff4", null ], + [ "C3Di_SetTex", "internal_8h.html#a9cd92f53a18da481d1ba74f4c9da7dee", null ], + [ "C3Di_SplitFrame", "internal_8h.html#a139aee1e5943be7dfb22a011f6057689", null ], + [ "C3Di_TexEnvBind", "internal_8h.html#acff27a4262a8a3fb39b20f2afd4cccd5", null ], + [ "C3Di_UpdateContext", "internal_8h.html#a4cfecbe235841f7d41495a8dc6b15c32", null ] +]; \ No newline at end of file diff --git a/docs/html/internal_8h_source.html b/docs/html/internal_8h_source.html new file mode 100644 index 0000000..c280a72 --- /dev/null +++ b/docs/html/internal_8h_source.html @@ -0,0 +1,349 @@ + + + + + + + +Citro3d: source/internal.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
internal.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2#include <c3d/attribs.h>
+
3#include <c3d/buffers.h>
+
4#include <c3d/proctex.h>
+
5#include <c3d/light.h>
+
6#include <c3d/framebuffer.h>
+
7#include <c3d/texenv.h>
+
8#include <c3d/fog.h>
+
9
+
10#define C3D_UNUSED __attribute__((unused))
+
11
+
12typedef struct
+
13{
+ + +
16 u32 zScale, zOffset;
+
17 GPU_CULLMODE cullMode;
+
18 bool zBuffer, earlyDepth;
+
19 GPU_EARLYDEPTHFUNC earlyDepthFunc;
+ +
21
+ +
23 u32 stencilMode, stencilOp;
+ +
25
+ + +
28 GPU_LOGICOP clrLogicOp;
+ +
30
+
31typedef struct
+
32{
+
33 gxCmdQueue_s gxQueue;
+
34 u32* cmdBuf;
+
35 size_t cmdBufSize;
+ +
37
+
38 u32 flags;
+
39 shaderProgram_s* program;
+
40
+
41 C3D_AttrInfo attrInfo;
+
42 C3D_BufInfo bufInfo;
+ +
44 C3D_LightEnv* lightEnv;
+
45
+ + +
48 C3D_Tex* tex[3];
+
49 C3D_TexEnv texEnv[6];
+
50
+
51 u32 texEnvBuf, texEnvBufClr;
+
52 u32 fogClr;
+
53 C3D_FogLut* fogLut;
+
54
+
55 u16 gasAttn, gasAccMax;
+
56 u32 gasLightXY, gasLightZ, gasLightZColor;
+
57 u32 gasDeltaZ : 24;
+
58 u32 gasFlags : 8;
+
59 C3D_GasLut* gasLut;
+
60
+
61 C3D_ProcTex* procTex;
+
62 C3D_ProcTexLut* procTexLut[3];
+
63 C3D_ProcTexColorLut* procTexColorLut;
+
64
+
65 C3D_FrameBuf fb;
+
66 u32 viewport[5];
+
67 u32 scissor[3];
+
68
+
69 u16 fixedAttribDirty, fixedAttribEverDirty;
+
70 C3D_FVec fixedAttribs[12];
+ +
72
+
73enum
+
74{
+
75 C3DiF_Active = BIT(0),
+ + +
78 C3DiF_BufInfo = BIT(3),
+
79 C3DiF_Effect = BIT(4),
+ + +
82 C3DiF_Scissor = BIT(7),
+
83 C3DiF_Program = BIT(8),
+ +
85 C3DiF_LightEnv = BIT(10),
+
86 C3DiF_VshCode = BIT(11),
+
87 C3DiF_GshCode = BIT(12),
+
88 C3DiF_TexStatus = BIT(14),
+
89 C3DiF_ProcTex = BIT(15),
+ +
91 C3DiF_FogLut = BIT(17),
+
92 C3DiF_Gas = BIT(18),
+
93 C3DiF_GasLut = BIT(19),
+
94
+
95#define C3DiF_ProcTexLut(n) BIT(20+(n))
+ +
97#define C3DiF_Tex(n) BIT(23+(n))
+
98 C3DiF_TexAll = 7 << 23,
+
99#define C3DiF_TexEnv(n) BIT(26+(n))
+
100 C3DiF_TexEnvAll = 0x3F << 26,
+
101};
+
102
+
103enum
+
104{
+ + + + +
109};
+
110
+
111static inline C3D_Context* C3Di_GetContext(void)
+
112{
+ +
114 return &__C3D_Context;
+
115}
+
116
+
117static inline bool typeIsCube(GPU_TEXTURE_MODE_PARAM type)
+
118{
+
119 return type == GPU_TEX_CUBE_MAP || type == GPU_TEX_SHADOW_CUBE;
+
120}
+
121
+
122static inline bool C3Di_TexIs2D(C3D_Tex* tex)
+
123{
+
124 return !typeIsCube(C3D_TexGetType(tex));
+
125}
+
126
+
127static inline bool addrIsVRAM(const void* addr)
+
128{
+
129 u32 vaddr = (u32)addr;
+
130 return vaddr >= OS_VRAM_VADDR && vaddr < OS_VRAM_VADDR + OS_VRAM_SIZE;
+
131}
+
132
+
133static inline vramAllocPos addrGetVRAMBank(const void* addr)
+
134{
+
135 u32 vaddr = (u32)addr;
+
136 return vaddr < OS_VRAM_VADDR + OS_VRAM_SIZE/2 ? VRAM_ALLOC_A : VRAM_ALLOC_B;
+
137}
+
138
+
139void C3Di_UpdateContext(void);
+
140void C3Di_AttrInfoBind(C3D_AttrInfo* info);
+
141void C3Di_BufInfoBind(C3D_BufInfo* info);
+
142void C3Di_FrameBufBind(C3D_FrameBuf* fb);
+
143void C3Di_TexEnvBind(int id, C3D_TexEnv* env);
+
144void C3Di_SetTex(int unit, C3D_Tex* tex);
+
145void C3Di_EffectBind(C3D_Effect* effect);
+
146void C3Di_GasUpdate(C3D_Context* ctx);
+
147
+
148void C3Di_LightMtlBlend(C3D_Light* light);
+
149
+
150void C3Di_DirtyUniforms(GPU_SHADER_TYPE type);
+
151void C3Di_LoadShaderUniforms(shaderInstance_s* si);
+
152void C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type);
+
153
+
154bool C3Di_SplitFrame(u32** pBuf, u32* pSize);
+
155
+
156void C3Di_RenderQueueInit(void);
+
157void C3Di_RenderQueueExit(void);
+
158void C3Di_RenderQueueWaitDone(void);
+ + +
C3D_Context __C3D_Context
Definition: base.c:7
+
@ C3DiF_Gas
Definition: internal.h:92
+
@ C3DiF_AttrInfo
Definition: internal.h:77
+
@ C3DiF_TexAll
Definition: internal.h:98
+
@ C3DiF_Scissor
Definition: internal.h:82
+
@ C3DiF_VshCode
Definition: internal.h:86
+
@ C3DiF_Effect
Definition: internal.h:79
+
@ C3DiF_Viewport
Definition: internal.h:81
+
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_GshCode
Definition: internal.h:87
+
@ C3DiF_TexEnvBuf
Definition: internal.h:84
+
@ C3DiF_FogLut
Definition: internal.h:91
+
@ C3DiF_ProcTexColorLut
Definition: internal.h:90
+
@ C3DiF_LightEnv
Definition: internal.h:85
+
@ C3DiF_DrawUsed
Definition: internal.h:76
+
@ C3DiF_TexStatus
Definition: internal.h:88
+
@ C3DiF_BufInfo
Definition: internal.h:78
+
@ C3DiF_ProcTex
Definition: internal.h:89
+
@ C3DiF_FrameBuf
Definition: internal.h:80
+
@ C3DiF_GasLut
Definition: internal.h:93
+
@ C3DiF_ProcTexLutAll
Definition: internal.h:96
+
@ C3DiF_Program
Definition: internal.h:83
+
@ C3DiF_TexEnvAll
Definition: internal.h:100
+
bool C3Di_SplitFrame(u32 **pBuf, u32 *pSize)
Definition: base.c:309
+
void C3Di_RenderQueueInit(void)
Definition: renderqueue.c:114
+
void C3Di_DirtyUniforms(GPU_SHADER_TYPE type)
Definition: uniforms.c:87
+
void C3Di_BufInfoBind(C3D_BufInfo *info)
Definition: buffers.c:49
+
void C3Di_UpdateContext(void)
Definition: base.c:158
+
void C3Di_EffectBind(C3D_Effect *effect)
Definition: effect.c:90
+
void C3Di_LoadShaderUniforms(shaderInstance_s *si)
Definition: uniforms.c:99
+
void C3Di_LightMtlBlend(C3D_Light *light)
Definition: light.c:3
+
void C3Di_RenderQueueDisableVBlank(void)
Definition: renderqueue.c:108
+
void C3Di_RenderQueueEnableVBlank(void)
Definition: renderqueue.c:102
+
void C3Di_RenderQueueWaitDone(void)
Definition: renderqueue.c:146
+
void C3Di_GasUpdate(C3D_Context *ctx)
Definition: gas.c:153
+
void C3Di_SetTex(int unit, C3D_Tex *tex)
Definition: texture.c:265
+
void C3Di_RenderQueueExit(void)
Definition: renderqueue.c:125
+
void C3Di_FrameBufBind(C3D_FrameBuf *fb)
Definition: framebuffer.c:49
+
void C3Di_AttrInfoBind(C3D_AttrInfo *info)
Definition: attribs.c:59
+
void C3Di_TexEnvBind(int id, C3D_TexEnv *env)
Definition: texenv.c:40
+
@ C3DiG_BeginAcc
Definition: internal.h:105
+
@ C3DiG_RenderStage
Definition: internal.h:108
+
@ C3DiG_SetAccMax
Definition: internal.h:107
+
@ C3DiG_AccStage
Definition: internal.h:106
+
void C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type)
Definition: uniforms.c:129
+ +
u32 flags
Definition: internal.h:38
+
C3D_BufInfo bufInfo
Definition: internal.h:42
+
u32 gasLightXY
Definition: internal.h:56
+
u16 fixedAttribDirty
Definition: internal.h:69
+
u32 * cmdBuf
Definition: internal.h:34
+
u32 texConfig
Definition: internal.h:46
+
u16 gasAccMax
Definition: internal.h:55
+
u32 gasFlags
Definition: internal.h:58
+
gxCmdQueue_s gxQueue
Definition: internal.h:33
+
u32 texEnvBuf
Definition: internal.h:51
+
u32 gasDeltaZ
Definition: internal.h:57
+
C3D_AttrInfo attrInfo
Definition: internal.h:41
+
C3D_ProcTexColorLut * procTexColorLut
Definition: internal.h:63
+
C3D_GasLut * gasLut
Definition: internal.h:59
+
shaderProgram_s * program
Definition: internal.h:39
+
u32 fogClr
Definition: internal.h:52
+
C3D_FogLut * fogLut
Definition: internal.h:53
+
float cmdBufUsage
Definition: internal.h:36
+
C3D_Effect effect
Definition: internal.h:43
+
u32 texShadow
Definition: internal.h:47
+
C3D_LightEnv * lightEnv
Definition: internal.h:44
+
size_t cmdBufSize
Definition: internal.h:35
+
C3D_FrameBuf fb
Definition: internal.h:65
+
C3D_ProcTex * procTex
Definition: internal.h:61
+ +
u32 stencilMode
Definition: internal.h:23
+
u32 blendClr
Definition: internal.h:26
+
u32 alphaTest
Definition: internal.h:22
+
bool earlyDepth
Definition: internal.h:18
+
GPU_CULLMODE cullMode
Definition: internal.h:17
+
u32 zOffset
Definition: internal.h:16
+
u32 depthTest
Definition: internal.h:24
+
u32 fragOpMode
Definition: internal.h:14
+
u32 earlyDepthRef
Definition: internal.h:20
+
GPU_LOGICOP clrLogicOp
Definition: internal.h:28
+
GPU_EARLYDEPTHFUNC earlyDepthFunc
Definition: internal.h:19
+
u32 alphaBlend
Definition: internal.h:27
+
u32 fragOpShadow
Definition: internal.h:15
+
+
+ + + + diff --git a/docs/html/jquery.js b/docs/html/jquery.js new file mode 100644 index 0000000..1dffb65 --- /dev/null +++ b/docs/html/jquery.js @@ -0,0 +1,34 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/docs/html/light_8c.html b/docs/html/light_8c.html new file mode 100644 index 0000000..6f68add --- /dev/null +++ b/docs/html/light_8c.html @@ -0,0 +1,683 @@ + + + + + + + +Citro3d: source/light.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
light.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void C3Di_LightMtlBlend (C3D_Light *light)
 
int C3D_LightInit (C3D_Light *light, C3D_LightEnv *env)
 
void C3D_LightEnable (C3D_Light *light, bool enable)
 
void C3D_LightTwoSideDiffuse (C3D_Light *light, bool enable)
 
void C3D_LightGeoFactor (C3D_Light *light, int id, bool enable)
 
void C3D_LightAmbient (C3D_Light *light, float r, float g, float b)
 
void C3D_LightDiffuse (C3D_Light *light, float r, float g, float b)
 
void C3D_LightSpecular0 (C3D_Light *light, float r, float g, float b)
 
void C3D_LightSpecular1 (C3D_Light *light, float r, float g, float b)
 
void C3D_LightPosition (C3D_Light *light, C3D_FVec *pos)
 
void C3D_LightShadowEnable (C3D_Light *light, bool enable)
 
void C3D_LightSpotEnable (C3D_Light *light, bool enable)
 
void C3D_LightSpotDir (C3D_Light *light, float x, float y, float z)
 
void C3D_LightSpotLut (C3D_Light *light, C3D_LightLut *lut)
 
void C3D_LightDistAttnEnable (C3D_Light *light, bool enable)
 
void C3D_LightDistAttn (C3D_Light *light, C3D_LightLutDA *lut)
 
+

Function Documentation

+ +

◆ C3D_LightAmbient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightAmbient (C3D_Light * light,
float r,
float g,
float b 
)
+
+ +

Definition at line 73 of file light.c.

+ +
+
+ +

◆ C3D_LightDiffuse()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightDiffuse (C3D_Light * light,
float r,
float g,
float b 
)
+
+ +

Definition at line 81 of file light.c.

+ +
+
+ +

◆ C3D_LightDistAttn()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightDistAttn (C3D_Light * light,
C3D_LightLutDA * lut 
)
+
+ +

Definition at line 172 of file light.c.

+ +
+
+ +

◆ C3D_LightDistAttnEnable()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightDistAttnEnable (C3D_Light * light,
bool enable 
)
+
+ +

Definition at line 167 of file light.c.

+ +
+
+ +

◆ C3D_LightEnable()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnable (C3D_Light * light,
bool enable 
)
+
+ +

Definition at line 41 of file light.c.

+ +
+
+ +

◆ C3D_LightGeoFactor()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightGeoFactor (C3D_Light * light,
int id,
bool enable 
)
+
+ +

Definition at line 63 of file light.c.

+ +
+
+ +

◆ C3D_LightInit()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int C3D_LightInit (C3D_Light * light,
C3D_LightEnv * env 
)
+
+ +

Definition at line 19 of file light.c.

+ +
+
+ +

◆ C3D_LightPosition()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightPosition (C3D_Light * light,
C3D_FVec * pos 
)
+
+ +

Definition at line 105 of file light.c.

+ +
+
+ +

◆ C3D_LightShadowEnable()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightShadowEnable (C3D_Light * light,
bool enable 
)
+
+ +

Definition at line 132 of file light.c.

+ +
+
+ +

◆ C3D_LightSpecular0()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightSpecular0 (C3D_Light * light,
float r,
float g,
float b 
)
+
+ +

Definition at line 89 of file light.c.

+ +
+
+ +

◆ C3D_LightSpecular1()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightSpecular1 (C3D_Light * light,
float r,
float g,
float b 
)
+
+ +

Definition at line 97 of file light.c.

+ +
+
+ +

◆ C3D_LightSpotDir()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightSpotDir (C3D_Light * light,
float x,
float y,
float z 
)
+
+ +

Definition at line 147 of file light.c.

+ +
+
+ +

◆ C3D_LightSpotEnable()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightSpotEnable (C3D_Light * light,
bool enable 
)
+
+ +

Definition at line 137 of file light.c.

+ +
+
+ +

◆ C3D_LightSpotLut()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightSpotLut (C3D_Light * light,
C3D_LightLut * lut 
)
+
+ +

Definition at line 158 of file light.c.

+ +
+
+ +

◆ C3D_LightTwoSideDiffuse()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightTwoSideDiffuse (C3D_Light * light,
bool enable 
)
+
+ +

Definition at line 54 of file light.c.

+ +
+
+ +

◆ C3Di_LightMtlBlend()

+ +
+
+ + + + + + + + +
void C3Di_LightMtlBlend (C3D_Light * light)
+
+ +

Definition at line 3 of file light.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/light_8c.js b/docs/html/light_8c.js new file mode 100644 index 0000000..ff184df --- /dev/null +++ b/docs/html/light_8c.js @@ -0,0 +1,19 @@ +var light_8c = +[ + [ "C3D_LightAmbient", "light_8c.html#a14bc9b81f135e92df83541105e5a6022", null ], + [ "C3D_LightDiffuse", "light_8c.html#a973c826bbc2c98d22a857001a351652b", null ], + [ "C3D_LightDistAttn", "light_8c.html#a8df68289dcb6944e567aa59dbefcf4c8", null ], + [ "C3D_LightDistAttnEnable", "light_8c.html#a7edc7e97d411bba61175f977970cab98", null ], + [ "C3D_LightEnable", "light_8c.html#a22464b5d85058b7129361a37d3c07032", null ], + [ "C3D_LightGeoFactor", "light_8c.html#a8614e08e3affa1e2afcb45a31dc541fa", null ], + [ "C3D_LightInit", "light_8c.html#ab8ab92b7fbfb27125ed98fffcf44f016", null ], + [ "C3D_LightPosition", "light_8c.html#a6592df5c2f8f93092533f2af802a083c", null ], + [ "C3D_LightShadowEnable", "light_8c.html#a44ea377d23ca980e136b913fda50696e", null ], + [ "C3D_LightSpecular0", "light_8c.html#a12b8b1d7f29b72215b648ae72b4f2bad", null ], + [ "C3D_LightSpecular1", "light_8c.html#a489b566167b28a1d64fd82ec457bacdc", null ], + [ "C3D_LightSpotDir", "light_8c.html#a9b177218b5ce2215413ec9675ed682f1", null ], + [ "C3D_LightSpotEnable", "light_8c.html#a817887a9074a3c168cb5e8c8b010cc72", null ], + [ "C3D_LightSpotLut", "light_8c.html#a8dbd12f98685b3dbfdab1e564519f2c0", null ], + [ "C3D_LightTwoSideDiffuse", "light_8c.html#a7484b348db434dde3a2f3fb4921195ef", null ], + [ "C3Di_LightMtlBlend", "light_8c.html#a5e20dd6f18115396537df0713e22a0b4", null ] +]; \ No newline at end of file diff --git a/docs/html/light_8c_source.html b/docs/html/light_8c_source.html new file mode 100644 index 0000000..bb6cc54 --- /dev/null +++ b/docs/html/light_8c_source.html @@ -0,0 +1,304 @@ + + + + + + + +Citro3d: source/light.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
light.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void C3Di_LightMtlBlend(C3D_Light* light)
+
4{
+
5 int i;
+
6 C3D_Material* mtl = &light->parent->material;
+
7 C3D_LightMatConf* conf = &light->conf.material;
+
8 memset(conf, 0, sizeof(*conf));
+
9
+
10 for (i = 0; i < 3; i ++)
+
11 {
+
12 conf->specular0 |= ((u32)(255*(mtl->specular0[i]*light->specular0[i]))) << (i*10);
+
13 conf->specular1 |= ((u32)(255*(mtl->specular1[i]*light->specular1[i]))) << (i*10);
+
14 conf->diffuse |= ((u32)(255*(mtl->diffuse[i] *light->diffuse[i]))) << (i*10);
+
15 conf->ambient |= ((u32)(255*(mtl->ambient[i] *light->ambient[i]))) << (i*10);
+
16 }
+
17}
+
18
+
19int C3D_LightInit(C3D_Light* light, C3D_LightEnv* env)
+
20{
+
21 int i;
+
22 memset(light, 0, sizeof(*light));
+
23
+
24 for (i = 0; i < 8; i ++)
+
25 if (!env->lights[i])
+
26 break;
+
27 if (i == 8) return -1;
+
28
+
29 env->lights[i] = light;
+
30 light->flags = C3DF_Light_Enabled | C3DF_Light_Dirty | C3DF_Light_MatDirty;
+
31 light->id = i;
+
32 light->parent = env;
+
33 light->diffuse[0] = light->diffuse[1] = light->diffuse[2] = 1.0f;
+
34 light->specular0[0] = light->specular0[1] = light->specular0[2] = 1.0f;
+
35 light->specular1[0] = light->specular1[1] = light->specular1[2] = 1.0f;
+
36
+
37 env->flags |= C3DF_LightEnv_LCDirty;
+
38 return i;
+
39}
+
40
+
41void C3D_LightEnable(C3D_Light* light, bool enable)
+
42{
+
43 if ((light->flags & C3DF_Light_Enabled) == (enable?C3DF_Light_Enabled:0))
+
44 return;
+
45
+
46 if (enable)
+
47 light->flags |= C3DF_Light_Enabled;
+
48 else
+
49 light->flags &= ~C3DF_Light_Enabled;
+
50
+
51 light->parent->flags |= C3DF_LightEnv_LCDirty;
+
52}
+
53
+
54void C3D_LightTwoSideDiffuse(C3D_Light* light, bool enable)
+
55{
+
56 if (enable)
+
57 light->conf.config |= BIT(1);
+
58 else
+
59 light->conf.config &= ~BIT(1);
+
60 light->flags |= C3DF_Light_Dirty;
+
61}
+
62
+
63void C3D_LightGeoFactor(C3D_Light* light, int id, bool enable)
+
64{
+
65 id = 2 + (id&1);
+
66 if (enable)
+
67 light->conf.config |= BIT(id);
+
68 else
+
69 light->conf.config &= ~BIT(id);
+
70 light->flags |= C3DF_Light_Dirty;
+
71}
+
72
+
73void C3D_LightAmbient(C3D_Light* light, float r, float g, float b)
+
74{
+
75 light->ambient[0] = b;
+
76 light->ambient[1] = g;
+
77 light->ambient[2] = r;
+
78 light->flags |= C3DF_Light_MatDirty;
+
79}
+
80
+
81void C3D_LightDiffuse(C3D_Light* light, float r, float g, float b)
+
82{
+
83 light->diffuse[0] = b;
+
84 light->diffuse[1] = g;
+
85 light->diffuse[2] = r;
+
86 light->flags |= C3DF_Light_MatDirty;
+
87}
+
88
+
89void C3D_LightSpecular0(C3D_Light* light, float r, float g, float b)
+
90{
+
91 light->specular0[0] = b;
+
92 light->specular0[1] = g;
+
93 light->specular0[2] = r;
+
94 light->flags |= C3DF_Light_MatDirty;
+
95}
+
96
+
97void C3D_LightSpecular1(C3D_Light* light, float r, float g, float b)
+
98{
+
99 light->specular1[0] = b;
+
100 light->specular1[1] = g;
+
101 light->specular1[2] = r;
+
102 light->flags |= C3DF_Light_MatDirty;
+
103}
+
104
+
105void C3D_LightPosition(C3D_Light* light, C3D_FVec* pos)
+
106{
+
107 // Enable/disable positional light depending on W coordinate
+
108 light->conf.config &= ~BIT(0);
+
109 light->conf.config |= (pos->w == 0.0f);
+
110 light->conf.position[0] = f32tof16(pos->x);
+
111 light->conf.position[1] = f32tof16(pos->y);
+
112 light->conf.position[2] = f32tof16(pos->z);
+
113 light->flags |= C3DF_Light_Dirty;
+
114}
+
115
+
116static void C3Di_EnableCommon(C3D_Light* light, bool enable, u32 bit)
+
117{
+
118 C3D_LightEnv* env = light->parent;
+
119 u32* var = &env->conf.config[1];
+
120
+
121 if (enable == !(*var & bit))
+
122 return;
+
123
+
124 if (!enable)
+
125 *var |= bit;
+
126 else
+
127 *var &= ~bit;
+
128
+
129 env->flags |= C3DF_LightEnv_Dirty;
+
130}
+
131
+
132void C3D_LightShadowEnable(C3D_Light* light, bool enable)
+
133{
+
134 C3Di_EnableCommon(light, enable, GPU_LC1_SHADOWBIT(light->id));
+
135}
+
136
+
137void C3D_LightSpotEnable(C3D_Light* light, bool enable)
+
138{
+
139 C3Di_EnableCommon(light, enable, GPU_LC1_SPOTBIT(light->id));
+
140}
+
141
+
142static inline u16 floattofix2_11(float x)
+
143{
+
144 return (u16)((s32)(x * (1U<<11)) & 0x1FFF);
+
145}
+
146
+
147void C3D_LightSpotDir(C3D_Light* light, float x, float y, float z)
+
148{
+
149 C3Di_EnableCommon(light, true, GPU_LC1_SPOTBIT(light->id));
+
150 C3D_FVec vec = FVec3_New(-x, -y, -z);
+
151 vec = FVec3_Normalize(vec);
+
152 light->conf.spotDir[0] = floattofix2_11(vec.x);
+
153 light->conf.spotDir[1] = floattofix2_11(vec.y);
+
154 light->conf.spotDir[2] = floattofix2_11(vec.z);
+
155 light->flags |= C3DF_Light_Dirty;
+
156}
+
157
+
158void C3D_LightSpotLut(C3D_Light* light, C3D_LightLut* lut)
+
159{
+
160 bool hasLut = lut != NULL;
+
161 C3Di_EnableCommon(light, hasLut, GPU_LC1_SPOTBIT(light->id));
+
162 light->lut_SP = lut;
+
163 if (hasLut)
+
164 light->flags |= C3DF_Light_SPDirty;
+
165}
+
166
+
167void C3D_LightDistAttnEnable(C3D_Light* light, bool enable)
+
168{
+
169 C3Di_EnableCommon(light, enable, GPU_LC1_ATTNBIT(light->id));
+
170}
+
171
+
172void C3D_LightDistAttn(C3D_Light* light, C3D_LightLutDA* lut)
+
173{
+
174 bool hasLut = lut != NULL;
+
175 C3Di_EnableCommon(light, hasLut, GPU_LC1_ATTNBIT(light->id));
+
176 if (!hasLut) return;
+
177
+
178 light->conf.distAttnBias = f32tof20(lut->bias);
+
179 light->conf.distAttnScale = f32tof20(lut->scale);
+
180 light->lut_DA = &lut->lut;
+
181 light->flags |= C3DF_Light_Dirty | C3DF_Light_DADirty;
+
182}
+ +
void C3D_LightSpecular0(C3D_Light *light, float r, float g, float b)
Definition: light.c:89
+
void C3D_LightAmbient(C3D_Light *light, float r, float g, float b)
Definition: light.c:73
+
void C3D_LightEnable(C3D_Light *light, bool enable)
Definition: light.c:41
+
void C3D_LightShadowEnable(C3D_Light *light, bool enable)
Definition: light.c:132
+
void C3D_LightSpecular1(C3D_Light *light, float r, float g, float b)
Definition: light.c:97
+
void C3Di_LightMtlBlend(C3D_Light *light)
Definition: light.c:3
+
void C3D_LightPosition(C3D_Light *light, C3D_FVec *pos)
Definition: light.c:105
+
void C3D_LightTwoSideDiffuse(C3D_Light *light, bool enable)
Definition: light.c:54
+
void C3D_LightDistAttnEnable(C3D_Light *light, bool enable)
Definition: light.c:167
+
void C3D_LightSpotEnable(C3D_Light *light, bool enable)
Definition: light.c:137
+
void C3D_LightGeoFactor(C3D_Light *light, int id, bool enable)
Definition: light.c:63
+
void C3D_LightSpotLut(C3D_Light *light, C3D_LightLut *lut)
Definition: light.c:158
+
void C3D_LightDistAttn(C3D_Light *light, C3D_LightLutDA *lut)
Definition: light.c:172
+
void C3D_LightDiffuse(C3D_Light *light, float r, float g, float b)
Definition: light.c:81
+
void C3D_LightSpotDir(C3D_Light *light, float x, float y, float z)
Definition: light.c:147
+
int C3D_LightInit(C3D_Light *light, C3D_LightEnv *env)
Definition: light.c:19
+
+
+ + + + diff --git a/docs/html/lightenv_8c.html b/docs/html/lightenv_8c.html new file mode 100644 index 0000000..329d554 --- /dev/null +++ b/docs/html/lightenv_8c.html @@ -0,0 +1,521 @@ + + + + + + + +Citro3d: source/lightenv.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
lightenv.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void C3Di_LightEnvUpdate (C3D_LightEnv *env)
 
void C3Di_LightEnvDirty (C3D_LightEnv *env)
 
void C3D_LightEnvInit (C3D_LightEnv *env)
 
void C3D_LightEnvBind (C3D_LightEnv *env)
 
void C3D_LightEnvMaterial (C3D_LightEnv *env, const C3D_Material *mtl)
 
void C3D_LightEnvAmbient (C3D_LightEnv *env, float r, float g, float b)
 
void C3D_LightEnvLut (C3D_LightEnv *env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut *lut)
 
void C3D_LightEnvFresnel (C3D_LightEnv *env, GPU_FRESNELSEL selector)
 
void C3D_LightEnvBumpMode (C3D_LightEnv *env, GPU_BUMPMODE mode)
 
void C3D_LightEnvBumpSel (C3D_LightEnv *env, int texUnit)
 
void C3D_LightEnvShadowMode (C3D_LightEnv *env, u32 mode)
 
void C3D_LightEnvShadowSel (C3D_LightEnv *env, int texUnit)
 
void C3D_LightEnvClampHighlights (C3D_LightEnv *env, bool clamp)
 
+

Function Documentation

+ +

◆ C3D_LightEnvAmbient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightEnvAmbient (C3D_LightEnv * env,
float r,
float g,
float b 
)
+
+ +

Definition at line 191 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvBind()

+ +
+
+ + + + + + + + +
void C3D_LightEnvBind (C3D_LightEnv * env)
+
+ +

Definition at line 165 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvBumpMode()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvBumpMode (C3D_LightEnv * env,
GPU_BUMPMODE mode 
)
+
+ +

Definition at line 239 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvBumpSel()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvBumpSel (C3D_LightEnv * env,
int texUnit 
)
+
+ +

Definition at line 246 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvClampHighlights()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvClampHighlights (C3D_LightEnv * env,
bool clamp 
)
+
+ +

Definition at line 270 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvFresnel()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvFresnel (C3D_LightEnv * env,
GPU_FRESNELSEL selector 
)
+
+ +

Definition at line 232 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvInit()

+ +
+
+ + + + + + + + +
void C3D_LightEnvInit (C3D_LightEnv * env)
+
+ +

Definition at line 154 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvLut()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void C3D_LightEnvLut (C3D_LightEnv * env,
GPU_LIGHTLUTID lutId,
GPU_LIGHTLUTINPUT input,
bool negative,
C3D_LightLut * lut 
)
+
+ +

Definition at line 199 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvMaterial()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvMaterial (C3D_LightEnv * env,
const C3D_Material * mtl 
)
+
+ +

Definition at line 179 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvShadowMode()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvShadowMode (C3D_LightEnv * env,
u32 mode 
)
+
+ +

Definition at line 253 of file lightenv.c.

+ +
+
+ +

◆ C3D_LightEnvShadowSel()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void C3D_LightEnvShadowSel (C3D_LightEnv * env,
int texUnit 
)
+
+ +

Definition at line 263 of file lightenv.c.

+ +
+
+ +

◆ C3Di_LightEnvDirty()

+ +
+
+ + + + + + + + +
void C3Di_LightEnvDirty (C3D_LightEnv * env)
+
+ +

Definition at line 134 of file lightenv.c.

+ +
+
+ +

◆ C3Di_LightEnvUpdate()

+ +
+
+ + + + + + + + +
void C3Di_LightEnvUpdate (C3D_LightEnv * env)
+
+ +

Definition at line 52 of file lightenv.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/lightenv_8c.js b/docs/html/lightenv_8c.js new file mode 100644 index 0000000..f2f0ce0 --- /dev/null +++ b/docs/html/lightenv_8c.js @@ -0,0 +1,16 @@ +var lightenv_8c = +[ + [ "C3D_LightEnvAmbient", "lightenv_8c.html#a40c904da1d7382b1184351d389c50819", null ], + [ "C3D_LightEnvBind", "lightenv_8c.html#a44cb318d8b5b651e26a14c5be1840735", null ], + [ "C3D_LightEnvBumpMode", "lightenv_8c.html#a3faa896a0a592846e364eefeb08cec30", null ], + [ "C3D_LightEnvBumpSel", "lightenv_8c.html#a32fe1de44d5e2b131f582edce96953b5", null ], + [ "C3D_LightEnvClampHighlights", "lightenv_8c.html#ae22e5854b3a4cc59529928b0d3c07d66", null ], + [ "C3D_LightEnvFresnel", "lightenv_8c.html#a5fbad59caab6411e54d5f594fb34368d", null ], + [ "C3D_LightEnvInit", "lightenv_8c.html#ac3677edb222d956e07724ebb1d012ae0", null ], + [ "C3D_LightEnvLut", "lightenv_8c.html#a2b328f2b54b9f0a0baa50684e7826982", null ], + [ "C3D_LightEnvMaterial", "lightenv_8c.html#a0a43b71cc4d3aac3aef86ebe4458bf2b", null ], + [ "C3D_LightEnvShadowMode", "lightenv_8c.html#a620aaa0aecdb77ee9e1c4488acf747b4", null ], + [ "C3D_LightEnvShadowSel", "lightenv_8c.html#ab581d4efd60b1458e8525f90e02d3592", null ], + [ "C3Di_LightEnvDirty", "lightenv_8c.html#a2ce7e3f5086a67f3465a3486715e0d71", null ], + [ "C3Di_LightEnvUpdate", "lightenv_8c.html#a50cc612d98a9fd5823ed865fd15a5713", null ] +]; \ No newline at end of file diff --git a/docs/html/lightenv_8c_source.html b/docs/html/lightenv_8c_source.html new file mode 100644 index 0000000..77f58d2 --- /dev/null +++ b/docs/html/lightenv_8c_source.html @@ -0,0 +1,402 @@ + + + + + + + +Citro3d: source/lightenv.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
lightenv.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3static void C3Di_LightEnvMtlBlend(C3D_LightEnv* env)
+
4{
+
5 int i;
+
6 C3D_Material* mtl = &env->material;
+
7 u32 color = 0;
+
8 for (i = 0; i < 3; i ++)
+
9 {
+
10 int v = 255*(mtl->emission[i] + mtl->ambient[i]*env->ambient[i]);
+
11 if (v < 0) v = 0;
+
12 else if (v > 255) v = 255;
+
13 color |= v << (i*10);
+
14 }
+
15 env->conf.ambient = color;
+
16}
+
17
+
18static void C3Di_LightLutUpload(u32 config, C3D_LightLut* lut)
+
19{
+
20 int i;
+
21 GPUCMD_AddWrite(GPUREG_LIGHTING_LUT_INDEX, config);
+
22 for (i = 0; i < 256; i += 8)
+
23 GPUCMD_AddWrites(GPUREG_LIGHTING_LUT_DATA0, &lut->data[i], 8);
+
24}
+
25
+
26static void C3Di_LightEnvSelectLayer(C3D_LightEnv* env)
+
27{
+
28 static const u8 layer_enabled[] =
+
29 {
+
30 BIT(GPU_LUT_D0) | BIT(GPU_LUT_RR) | BIT(GPU_LUT_SP) | BIT(GPU_LUT_DA),
+
31 BIT(GPU_LUT_FR) | BIT(GPU_LUT_RR) | BIT(GPU_LUT_SP) | BIT(GPU_LUT_DA),
+
32 BIT(GPU_LUT_D0) | BIT(GPU_LUT_D1) | BIT(GPU_LUT_RR) | BIT(GPU_LUT_DA),
+
33 BIT(GPU_LUT_D0) | BIT(GPU_LUT_D1) | BIT(GPU_LUT_FR) | BIT(GPU_LUT_DA),
+
34 0xFF &~ BIT(GPU_LUT_FR),
+
35 0xFF &~ BIT(GPU_LUT_D1),
+
36 0xFF &~ (BIT(GPU_LUT_RB) | BIT(GPU_LUT_RG)),
+
37 };
+
38
+
39 u32 reg = ~env->conf.config[1];
+
40 if (reg & (0xFF<< 8)) reg |= GPU_LC1_LUTBIT(GPU_LUT_SP);
+
41 if (reg & (0xFF<<24)) reg |= GPU_LC1_LUTBIT(GPU_LUT_DA);
+
42 reg = (reg >> 16) & 0xFF;
+
43
+
44 int i = 7;
+
45 if (!(env->flags & C3DF_LightEnv_IsCP_Any))
+
46 for (i = 0; i < 7; i ++)
+
47 if ((layer_enabled[i] & reg) == reg) // Check if the layer supports all LUTs we need
+
48 break;
+
49 env->conf.config[0] = (env->conf.config[0] &~ (0xF<<4)) | (GPU_LIGHT_ENV_LAYER_CONFIG(i)<<4);
+
50}
+
51
+
52void C3Di_LightEnvUpdate(C3D_LightEnv* env)
+
53{
+
54 int i;
+
55 C3D_LightEnvConf* conf = &env->conf;
+
56
+
57 if (env->flags & C3DF_LightEnv_LCDirty)
+
58 {
+
59 conf->numLights = 0;
+
60 conf->permutation = 0;
+
61 for (i = 0; i < 8; i ++)
+
62 {
+
63 C3D_Light* light = env->lights[i];
+
64 if (!light) continue;
+
65 if (!(light->flags & C3DF_Light_Enabled)) continue;
+
66 conf->permutation |= GPU_LIGHTPERM(conf->numLights++, i);
+
67 }
+
68 if (conf->numLights > 0) conf->numLights --;
+
69 env->flags &= ~C3DF_LightEnv_LCDirty;
+
70 env->flags |= C3DF_LightEnv_Dirty;
+
71 }
+
72
+
73 if (env->flags & C3DF_LightEnv_MtlDirty)
+
74 {
+
75 C3Di_LightEnvMtlBlend(env);
+
76 env->flags &= ~C3DF_LightEnv_MtlDirty;
+
77 env->flags |= C3DF_LightEnv_Dirty;
+
78 }
+
79
+
80 if (env->flags & C3DF_LightEnv_Dirty)
+
81 {
+
82 C3Di_LightEnvSelectLayer(env);
+
83 GPUCMD_AddWrite(GPUREG_LIGHTING_AMBIENT, conf->ambient);
+
84 GPUCMD_AddIncrementalWrites(GPUREG_LIGHTING_NUM_LIGHTS, (u32*)&conf->numLights, 3);
+
85 GPUCMD_AddIncrementalWrites(GPUREG_LIGHTING_LUTINPUT_ABS, (u32*)&conf->lutInput, 3);
+
86 GPUCMD_AddWrite(GPUREG_LIGHTING_LIGHT_PERMUTATION, conf->permutation);
+
87 env->flags &= ~C3DF_LightEnv_Dirty;
+
88 }
+
89
+
90 if (env->flags & C3DF_LightEnv_LutDirtyAll)
+
91 {
+
92 for (i = 0; i < 6; i ++)
+
93 {
+
94 static const u8 lutIds[] = { 0, 1, 3, 4, 5, 6 };
+
95 if (!(env->flags & C3DF_LightEnv_LutDirty(i))) continue;
+
96 C3Di_LightLutUpload(GPU_LIGHTLUTIDX(GPU_LUTSELECT_COMMON, (u32)lutIds[i], 0), env->luts[i]);
+
97 }
+
98
+
99 env->flags &= ~C3DF_LightEnv_LutDirtyAll;
+
100 }
+
101
+
102 for (i = 0; i < 8; i ++)
+
103 {
+
104 C3D_Light* light = env->lights[i];
+
105 if (!light) continue;
+
106
+
107 if (light->flags & C3DF_Light_MatDirty)
+
108 {
+
109 C3Di_LightMtlBlend(light);
+
110 light->flags &= ~C3DF_Light_MatDirty;
+
111 light->flags |= C3DF_Light_Dirty;
+
112 }
+
113
+
114 if (light->flags & C3DF_Light_Dirty)
+
115 {
+
116 GPUCMD_AddIncrementalWrites(GPUREG_LIGHT0_SPECULAR0 + i*0x10, (u32*)&light->conf, 12);
+
117 light->flags &= ~C3DF_Light_Dirty;
+
118 }
+
119
+
120 if (light->flags & C3DF_Light_SPDirty)
+
121 {
+
122 C3Di_LightLutUpload(GPU_LIGHTLUTIDX(GPU_LUTSELECT_SP, i, 0), light->lut_SP);
+
123 light->flags &= ~C3DF_Light_SPDirty;
+
124 }
+
125
+
126 if (light->flags & C3DF_Light_DADirty)
+
127 {
+
128 C3Di_LightLutUpload(GPU_LIGHTLUTIDX(GPU_LUTSELECT_DA, i, 0), light->lut_DA);
+
129 light->flags &= ~C3DF_Light_DADirty;
+
130 }
+
131 }
+
132}
+
133
+
134void C3Di_LightEnvDirty(C3D_LightEnv* env)
+
135{
+
136 env->flags |= C3DF_LightEnv_Dirty;
+
137 int i;
+
138 for (i = 0; i < 6; i ++)
+
139 if (env->luts[i])
+
140 env->flags |= C3DF_LightEnv_LutDirty(i);
+
141 for (i = 0; i < 8; i ++)
+
142 {
+
143 C3D_Light* light = env->lights[i];
+
144 if (!light) continue;
+
145
+
146 light->flags |= C3DF_Light_Dirty;
+
147 if (light->lut_SP)
+
148 light->flags |= C3DF_Light_SPDirty;
+
149 if (light->lut_DA)
+
150 light->flags |= C3DF_Light_DADirty;
+
151 }
+
152}
+
153
+
154void C3D_LightEnvInit(C3D_LightEnv* env)
+
155{
+
156 memset(env, 0, sizeof(*env));
+
157 env->flags = C3DF_LightEnv_Dirty;
+
158 env->ambient[0] = env->ambient[1] = env->ambient[2] = 1.0f;
+
159 env->conf.config[0] = (4<<8) | BIT(27) | BIT(31);
+
160 env->conf.config[1] = ~0;
+
161 env->conf.lutInput.select = GPU_LIGHTLUTINPUT(GPU_LUT_SP, GPU_LUTINPUT_SP);
+
162 env->conf.lutInput.abs = 0x2222222;
+
163}
+
164
+
165void C3D_LightEnvBind(C3D_LightEnv* env)
+
166{
+
167 C3D_Context* ctx = C3Di_GetContext();
+
168
+
169 if (!(ctx->flags & C3DiF_Active))
+
170 return;
+
171
+
172 if (ctx->lightEnv == env)
+
173 return;
+
174
+
175 ctx->flags |= C3DiF_LightEnv;
+
176 ctx->lightEnv = env;
+
177}
+
178
+
179void C3D_LightEnvMaterial(C3D_LightEnv* env, const C3D_Material* mtl)
+
180{
+
181 int i;
+
182 memcpy(&env->material, mtl, sizeof(*mtl));
+
183 env->flags |= C3DF_LightEnv_MtlDirty;
+
184 for (i = 0; i < 8; i ++)
+
185 {
+
186 C3D_Light* light = env->lights[i];
+
187 if (light) light->flags |= C3DF_Light_MatDirty;
+
188 }
+
189}
+
190
+
191void C3D_LightEnvAmbient(C3D_LightEnv* env, float r, float g, float b)
+
192{
+
193 env->ambient[0] = b;
+
194 env->ambient[1] = g;
+
195 env->ambient[2] = r;
+
196 env->flags |= C3DF_LightEnv_MtlDirty;
+
197}
+
198
+
199void C3D_LightEnvLut(C3D_LightEnv* env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut* lut)
+
200{
+
201 static const s8 ids[] = { 0, 1, -1, 2, 3, 4, 5, -1 };
+
202 int id = ids[lutId];
+
203 if (id >= 0)
+
204 {
+
205 env->luts[id] = lut;
+
206 if (lut)
+
207 {
+
208 env->conf.config[1] &= ~GPU_LC1_LUTBIT(lutId);
+
209 env->flags |= C3DF_LightEnv_LutDirty(id);
+
210 } else
+
211 {
+
212 env->conf.config[1] |= GPU_LC1_LUTBIT(lutId);
+
213 env->luts[id] = NULL;
+
214 }
+
215 }
+
216
+
217 env->conf.lutInput.select &= ~GPU_LIGHTLUTINPUT(lutId, 0xF);
+
218 env->conf.lutInput.select |= GPU_LIGHTLUTINPUT(lutId, input);
+
219
+
220 u32 absbit = 1 << (lutId*4 + 1);
+
221 env->conf.lutInput.abs &= ~absbit;
+
222 if (negative)
+
223 env->conf.lutInput.abs |= absbit;
+
224
+
225 env->flags |= C3DF_LightEnv_Dirty;
+
226 if (input == GPU_LUTINPUT_CP)
+
227 env->flags |= C3DF_LightEnv_IsCP(lutId);
+
228 else
+
229 env->flags &= ~C3DF_LightEnv_IsCP(lutId);
+
230}
+
231
+
232void C3D_LightEnvFresnel(C3D_LightEnv* env, GPU_FRESNELSEL selector)
+
233{
+
234 env->conf.config[0] &= ~(3<<2);
+
235 env->conf.config[0] |= (selector&3)<<2;
+
236 env->flags |= C3DF_LightEnv_Dirty;
+
237}
+
238
+
239void C3D_LightEnvBumpMode(C3D_LightEnv* env, GPU_BUMPMODE mode)
+
240{
+
241 env->conf.config[0] &= ~(3<<28);
+
242 env->conf.config[0] |= (mode&3)<<28;
+
243 env->flags |= C3DF_LightEnv_Dirty;
+
244}
+
245
+
246void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit)
+
247{
+
248 env->conf.config[0] &= ~(3<<22);
+
249 env->conf.config[0] |= (texUnit&3)<<22;
+
250 env->flags |= C3DF_LightEnv_Dirty;
+
251}
+
252
+
253void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode)
+
254{
+
255 mode &= 0xF<<16;
+
256 if (mode & (GPU_SHADOW_PRIMARY | GPU_SHADOW_SECONDARY | GPU_SHADOW_ALPHA))
+
257 mode |= BIT(0);
+
258 env->conf.config[0] &= ~((0xF<<16) | BIT(0));
+
259 env->conf.config[0] |= mode;
+
260 env->flags |= C3DF_LightEnv_Dirty;
+
261}
+
262
+
263void C3D_LightEnvShadowSel(C3D_LightEnv* env, int texUnit)
+
264{
+
265 env->conf.config[0] &= ~(3<<24);
+
266 env->conf.config[0] |= (texUnit&3)<<24;
+
267 env->flags |= C3DF_LightEnv_Dirty;
+
268}
+
269
+
270void C3D_LightEnvClampHighlights(C3D_LightEnv* env, bool clamp)
+
271{
+
272 if (clamp)
+
273 env->conf.config[0] |= BIT(27);
+
274 else
+
275 env->conf.config[0] &= ~BIT(27);
+
276 env->flags |= C3DF_LightEnv_Dirty;
+
277}
+ +
@ C3DiF_Active
Definition: internal.h:75
+
@ C3DiF_LightEnv
Definition: internal.h:85
+
void C3Di_LightMtlBlend(C3D_Light *light)
Definition: light.c:3
+
void C3D_LightEnvMaterial(C3D_LightEnv *env, const C3D_Material *mtl)
Definition: lightenv.c:179
+
void C3D_LightEnvLut(C3D_LightEnv *env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut *lut)
Definition: lightenv.c:199
+
void C3Di_LightEnvDirty(C3D_LightEnv *env)
Definition: lightenv.c:134
+
void C3D_LightEnvBumpSel(C3D_LightEnv *env, int texUnit)
Definition: lightenv.c:246
+
void C3D_LightEnvBumpMode(C3D_LightEnv *env, GPU_BUMPMODE mode)
Definition: lightenv.c:239
+
void C3D_LightEnvAmbient(C3D_LightEnv *env, float r, float g, float b)
Definition: lightenv.c:191
+
void C3D_LightEnvBind(C3D_LightEnv *env)
Definition: lightenv.c:165
+
void C3Di_LightEnvUpdate(C3D_LightEnv *env)
Definition: lightenv.c:52
+
void C3D_LightEnvFresnel(C3D_LightEnv *env, GPU_FRESNELSEL selector)
Definition: lightenv.c:232
+
void C3D_LightEnvShadowMode(C3D_LightEnv *env, u32 mode)
Definition: lightenv.c:253
+
void C3D_LightEnvShadowSel(C3D_LightEnv *env, int texUnit)
Definition: lightenv.c:263
+
void C3D_LightEnvInit(C3D_LightEnv *env)
Definition: lightenv.c:154
+
void C3D_LightEnvClampHighlights(C3D_LightEnv *env, bool clamp)
Definition: lightenv.c:270
+ +
u32 flags
Definition: internal.h:38
+
C3D_LightEnv * lightEnv
Definition: internal.h:44
+
+
+ + + + diff --git a/docs/html/lightlut_8c.html b/docs/html/lightlut_8c.html new file mode 100644 index 0000000..d1590b5 --- /dev/null +++ b/docs/html/lightlut_8c.html @@ -0,0 +1,247 @@ + + + + + + + +Citro3d: source/lightlut.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
lightlut.c File Reference
+
+
+
#include "internal.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

void LightLut_FromArray (C3D_LightLut *lut, float *data)
 
void LightLut_FromFunc (C3D_LightLut *lut, C3D_LightLutFunc func, float param, bool negative)
 
void LightLutDA_Create (C3D_LightLutDA *lut, C3D_LightLutFuncDA func, float from, float to, float arg0, float arg1)
 
+

Function Documentation

+ +

◆ LightLut_FromArray()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void LightLut_FromArray (C3D_LightLut * lut,
float * data 
)
+
+ +

Definition at line 3 of file lightlut.c.

+ +
+
+ +

◆ LightLut_FromFunc()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void LightLut_FromFunc (C3D_LightLut * lut,
C3D_LightLutFunc func,
float param,
bool negative 
)
+
+ +

Definition at line 33 of file lightlut.c.

+ +
+
+ +

◆ LightLutDA_Create()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void LightLutDA_Create (C3D_LightLutDA * lut,
C3D_LightLutFuncDA func,
float from,
float to,
float arg0,
float arg1 
)
+
+ +

Definition at line 53 of file lightlut.c.

+ +
+
+
+
+ + + + diff --git a/docs/html/lightlut_8c.js b/docs/html/lightlut_8c.js new file mode 100644 index 0000000..5f62826 --- /dev/null +++ b/docs/html/lightlut_8c.js @@ -0,0 +1,6 @@ +var lightlut_8c = +[ + [ "LightLut_FromArray", "lightlut_8c.html#a9b8b3517fe8b867689551801a69b011a", null ], + [ "LightLut_FromFunc", "lightlut_8c.html#a5fc17b58965a82427775599c4ba5525a", null ], + [ "LightLutDA_Create", "lightlut_8c.html#aae86ce8989d5bdc85c62d0fc1aa85105", null ] +]; \ No newline at end of file diff --git a/docs/html/lightlut_8c_source.html b/docs/html/lightlut_8c_source.html new file mode 100644 index 0000000..6d87ccd --- /dev/null +++ b/docs/html/lightlut_8c_source.html @@ -0,0 +1,183 @@ + + + + + + + +Citro3d: source/lightlut.c Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Citro3d +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
lightlut.c
+
+
+Go to the documentation of this file.
1#include "internal.h"
+
2
+
3void LightLut_FromArray(C3D_LightLut* lut, float* data)
+
4{
+
5 int i;
+
6 for (i = 0; i < 256; i ++)
+
7 {
+
8 float in = data[i], diff = data[i+256];
+
9
+
10 u32 val = 0;
+
11 if (in > 0.0f)
+
12 {
+
13 in *= 0x1000;
+
14 val = (in < 0x1000) ? (u32)in : 0xFFF;
+
15 }
+
16
+
17 u32 val2 = 0;
+
18 if (diff != 0.0f)
+
19 {
+
20 if (diff < 0)
+
21 {
+
22 diff = -diff;
+
23 val2 = 0x800;
+
24 }
+
25 diff *= 0x800;
+
26 val2 |= (diff < 0x800) ? (u32)diff : 0x7FF;
+
27 }
+
28
+
29 lut->data[i] = val | (val2 << 12);
+
30 }
+
31}
+
32
+
33void LightLut_FromFunc(C3D_LightLut* lut, C3D_LightLutFunc func, float param, bool negative)
+
34{
+
35 int i;
+
36 float data[512];
+
37 memset(data, 0, sizeof(data));
+
38 int min = negative ? (-128) : 0;
+
39 int max = negative ? 128 : 256;
+
40 for (i = min; i <= max; i ++)
+
41 {
+
42 float x = (float)i/max;
+
43 float val = func(x, param);
+
44 int idx = negative ? (i & 0xFF) : i;
+
45 if (i < max)
+
46 data[idx] = val;
+
47 if (i > min)
+
48 data[idx+255] = val-data[idx-1];
+
49 }
+ +
51}
+
52
+
53void LightLutDA_Create(C3D_LightLutDA* lut, C3D_LightLutFuncDA func, float from, float to, float arg0, float arg1)
+
54{
+
55 int i;
+
56 float data[512];
+
57
+
58 float range = to-from;
+
59 lut->scale = 1.0f / range;
+
60 lut->bias = -from*lut->scale;
+
61
+
62 for (i = 0; i <= 256; i ++)
+
63 {
+
64 float x = from + range*i/256.0f;
+
65 float val = func(x, arg0, arg1);
+
66 if (i < 256)
+
67 data[i] = val;
+
68 if (i > 0)
+
69 data[i+255] = val-data[i-1];
+
70 }
+
71
+
72 LightLut_FromArray(&lut->lut, data);
+
73}
+ +
void LightLut_FromFunc(C3D_LightLut *lut, C3D_LightLutFunc func, float param, bool negative)
Definition: lightlut.c:33
+
void LightLut_FromArray(C3D_LightLut *lut, float *data)
Definition: lightlut.c:3
+
void LightLutDA_Create(C3D_LightLutDA *lut, C3D_LightLutFuncDA func, float from, float to, float arg0, float arg1)
Definition: lightlut.c:53
+
float24Uniform_s * data
Definition: uniforms.c:16
+
+
+ + + + diff --git a/docs/html/menu.js b/docs/html/menu.js new file mode 100644 index 0000000..b0b2693 --- /dev/null +++ b/docs/html/menu.js @@ -0,0 +1,136 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+='
    '; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + var searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/docs/html/menudata.js b/docs/html/menudata.js new file mode 100644 index 0000000..0e1726a --- /dev/null +++ b/docs/html/menudata.js @@ -0,0 +1,97 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions.html#index_b"}, +{text:"c",url:"functions.html#index_c"}, +{text:"d",url:"functions.html#index_d"}, +{text:"e",url:"functions.html#index_e"}, +{text:"f",url:"functions.html#index_f"}, +{text:"g",url:"functions.html#index_g"}, +{text:"h",url:"functions.html#index_h"}, +{text:"l",url:"functions.html#index_l"}, +{text:"m",url:"functions.html#index_m"}, +{text:"n",url:"functions.html#index_n"}, +{text:"p",url:"functions.html#index_p"}, +{text:"r",url:"functions.html#index_r"}, +{text:"s",url:"functions.html#index_s"}, +{text:"t",url:"functions.html#index_t"}, +{text:"v",url:"functions.html#index_v"}, +{text:"w",url:"functions.html#index_w"}, +{text:"z",url:"functions.html#index_z"}]}, +{text:"Variables",url:"functions_vars.html",children:[ +{text:"a",url:"functions_vars.html#index_a"}, +{text:"b",url:"functions_vars.html#index_b"}, +{text:"c",url:"functions_vars.html#index_c"}, +{text:"d",url:"functions_vars.html#index_d"}, +{text:"e",url:"functions_vars.html#index_e"}, +{text:"f",url:"functions_vars.html#index_f"}, +{text:"g",url:"functions_vars.html#index_g"}, +{text:"h",url:"functions_vars.html#index_h"}, +{text:"l",url:"functions_vars.html#index_l"}, +{text:"m",url:"functions_vars.html#index_m"}, +{text:"n",url:"functions_vars.html#index_n"}, +{text:"p",url:"functions_vars.html#index_p"}, +{text:"r",url:"functions_vars.html#index_r"}, +{text:"s",url:"functions_vars.html#index_s"}, +{text:"t",url:"functions_vars.html#index_t"}, +{text:"v",url:"functions_vars.html#index_v"}, +{text:"w",url:"functions_vars.html#index_w"}, +{text:"z",url:"functions_vars.html#index_z"}]}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"File Members",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"_",url:"globals.html#index__5F"}, +{text:"a",url:"globals_a.html#index_a"}, +{text:"b",url:"globals_b.html#index_b"}, +{text:"c",url:"globals_c.html#index_c"}, +{text:"d",url:"globals_d.html#index_d"}, +{text:"f",url:"globals_f.html#index_f"}, +{text:"g",url:"globals_g.html#index_g"}, +{text:"l",url:"globals_l.html#index_l"}, +{text:"m",url:"globals_m.html#index_m"}, +{text:"p",url:"globals_p.html#index_p"}, +{text:"t",url:"globals_t.html#index_t"}]}, +{text:"Functions",url:"globals_func.html",children:[ +{text:"_",url:"globals_func.html#index__5F"}, +{text:"a",url:"globals_func.html#index_a"}, +{text:"b",url:"globals_func.html#index_b"}, +{text:"c",url:"globals_func.html#index_c"}, +{text:"f",url:"globals_func.html#index_f"}, +{text:"g",url:"globals_func.html#index_g"}, +{text:"l",url:"globals_func.html#index_l"}, +{text:"m",url:"globals_func.html#index_m"}, +{text:"p",url:"globals_func.html#index_p"}, +{text:"t",url:"globals_func.html#index_t"}]}, +{text:"Variables",url:"globals_vars.html"}, +{text:"Enumerator",url:"globals_eval.html"}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/docs/html/mtxstack_8c.html b/docs/html/mtxstack_8c.html new file mode 100644 index 0000000..14c111f --- /dev/null +++ b/docs/html/mtxstack_8c.html @@ -0,0 +1,248 @@ + + + + + + + +Citro3d: source/mtxstack.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mtxstack.c File Reference
    +
    +
    +
    #include <c3d/mtxstack.h>
    +#include <c3d/uniforms.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + +

    +Functions

    void MtxStack_Init (C3D_MtxStack *stk)
     
    void MtxStack_Bind (C3D_MtxStack *stk, GPU_SHADER_TYPE unifType, int unifPos, int unifLen)
     
    C3D_Mtx * MtxStack_Push (C3D_MtxStack *stk)
     
    C3D_Mtx * MtxStack_Pop (C3D_MtxStack *stk)
     
    void MtxStack_Update (C3D_MtxStack *stk)
     
    +

    Function Documentation

    + +

    ◆ MtxStack_Bind()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void MtxStack_Bind (C3D_MtxStack * stk,
    GPU_SHADER_TYPE unifType,
    int unifPos,
    int unifLen 
    )
    +
    + +

    Definition at line 12 of file mtxstack.c.

    + +
    +
    + +

    ◆ MtxStack_Init()

    + +
    +
    + + + + + + + + +
    void MtxStack_Init (C3D_MtxStack * stk)
    +
    + +

    Definition at line 4 of file mtxstack.c.

    + +
    +
    + +

    ◆ MtxStack_Pop()

    + +
    +
    + + + + + + + + +
    C3D_Mtx * MtxStack_Pop (C3D_MtxStack * stk)
    +
    + +

    Definition at line 28 of file mtxstack.c.

    + +
    +
    + +

    ◆ MtxStack_Push()

    + +
    +
    + + + + + + + + +
    C3D_Mtx * MtxStack_Push (C3D_MtxStack * stk)
    +
    + +

    Definition at line 20 of file mtxstack.c.

    + +
    +
    + +

    ◆ MtxStack_Update()

    + +
    +
    + + + + + + + + +
    void MtxStack_Update (C3D_MtxStack * stk)
    +
    + +

    Definition at line 35 of file mtxstack.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/mtxstack_8c.js b/docs/html/mtxstack_8c.js new file mode 100644 index 0000000..b8c2c3e --- /dev/null +++ b/docs/html/mtxstack_8c.js @@ -0,0 +1,8 @@ +var mtxstack_8c = +[ + [ "MtxStack_Bind", "mtxstack_8c.html#a83bb47cbc090a31bdd271b77e54d15cc", null ], + [ "MtxStack_Init", "mtxstack_8c.html#a270acb036c65e035aa2f4929ad68caf2", null ], + [ "MtxStack_Pop", "mtxstack_8c.html#aa760fcf279b61fb9cd1eadb208b8b735", null ], + [ "MtxStack_Push", "mtxstack_8c.html#a1d3768971c12d482f6a6e0c3a5c1f1b8", null ], + [ "MtxStack_Update", "mtxstack_8c.html#a058130e9530aa772bf3d1a912d4f3c13", null ] +]; \ No newline at end of file diff --git a/docs/html/mtxstack_8c_source.html b/docs/html/mtxstack_8c_source.html new file mode 100644 index 0000000..bed7e1f --- /dev/null +++ b/docs/html/mtxstack_8c_source.html @@ -0,0 +1,153 @@ + + + + + + + +Citro3d: source/mtxstack.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mtxstack.c
    +
    +
    +Go to the documentation of this file.
    1#include <c3d/mtxstack.h>
    +
    2#include <c3d/uniforms.h>
    +
    3
    +
    4void MtxStack_Init(C3D_MtxStack* stk)
    +
    5{
    +
    6 stk->pos = 0;
    +
    7 stk->unifPos = 0xFF;
    +
    8 stk->isDirty = true;
    +
    9 Mtx_Identity(&stk->m[0]);
    +
    10}
    +
    11
    +
    12void MtxStack_Bind(C3D_MtxStack* stk, GPU_SHADER_TYPE unifType, int unifPos, int unifLen)
    +
    13{
    +
    14 stk->unifType = unifType;
    +
    15 stk->unifPos = unifPos;
    +
    16 stk->unifLen = unifLen;
    +
    17 stk->isDirty = true;
    +
    18}
    +
    19
    +
    20C3D_Mtx* MtxStack_Push(C3D_MtxStack* stk)
    +
    21{
    +
    22 if (stk->pos == (C3D_MTXSTACK_SIZE-1)) return NULL;
    +
    23 stk->pos ++;
    +
    24 Mtx_Copy(&stk->m[stk->pos], &stk->m[stk->pos-1]);
    +
    25 return MtxStack_Cur(stk);
    +
    26}
    +
    27
    +
    28C3D_Mtx* MtxStack_Pop(C3D_MtxStack* stk)
    +
    29{
    +
    30 if (stk->pos == 0) return NULL;
    +
    31 stk->pos --;
    +
    32 return MtxStack_Cur(stk);
    +
    33}
    +
    34
    +
    35void MtxStack_Update(C3D_MtxStack* stk)
    +
    36{
    +
    37 if (!stk->isDirty) return;
    +
    38
    +
    39 if (stk->unifPos != 0xFF)
    +
    40 C3D_FVUnifMtxNx4(stk->unifType, stk->unifPos, &stk->m[stk->pos], stk->unifLen);
    +
    41
    +
    42 stk->isDirty = false;
    +
    43}
    +
    void MtxStack_Update(C3D_MtxStack *stk)
    Definition: mtxstack.c:35
    +
    C3D_Mtx * MtxStack_Push(C3D_MtxStack *stk)
    Definition: mtxstack.c:20
    +
    void MtxStack_Init(C3D_MtxStack *stk)
    Definition: mtxstack.c:4
    +
    void MtxStack_Bind(C3D_MtxStack *stk, GPU_SHADER_TYPE unifType, int unifPos, int unifLen)
    Definition: mtxstack.c:12
    +
    C3D_Mtx * MtxStack_Pop(C3D_MtxStack *stk)
    Definition: mtxstack.c:28
    +
    +
    + + + + diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/docs/html/nav_f.png differ diff --git a/docs/html/nav_fd.png b/docs/html/nav_fd.png new file mode 100644 index 0000000..032fbdd Binary files /dev/null and b/docs/html/nav_fd.png differ diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/docs/html/nav_g.png differ diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/docs/html/nav_h.png differ diff --git a/docs/html/nav_hd.png b/docs/html/nav_hd.png new file mode 100644 index 0000000..de80f18 Binary files /dev/null and b/docs/html/nav_hd.png differ diff --git a/docs/html/navtree.css b/docs/html/navtree.css new file mode 100644 index 0000000..c8a7766 --- /dev/null +++ b/docs/html/navtree.css @@ -0,0 +1,150 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: var(--nav-text-active-color); + text-shadow: var(--nav-text-active-shadow); +} + +#nav-tree .selected .arrow { + color: var(--nav-arrow-selected-color); + text-shadow: none; +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px var(--font-family-nav); +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:var(--nav-text-active-color); +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: $width; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:var(--nav-splitbar-image); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-repeat:repeat-x; + background-color: var(--nav-background-color); + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/docs/html/navtree.js b/docs/html/navtree.js new file mode 100644 index 0000000..2798368 --- /dev/null +++ b/docs/html/navtree.js @@ -0,0 +1,549 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + var topOffset=5; + if (typeof page_layout!=='undefined' && page_layout==1) { + topOffset+=$('#top').outerHeight(); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +var loadTriggered = false; +var readyTriggered = false; +var loadObject,loadToRoot,loadUrl,loadRelPath; + +$(window).on('load',function(){ + if (readyTriggered) { // ready first + navTo(loadObject,loadToRoot,loadUrl,loadRelPath); + showRoot(); + } + loadTriggered=true; +}); + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + if (loadTriggered) { // load before ready + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + } else { // ready before load + loadObject = o; + loadToRoot = toroot; + loadUrl = hashUrl(); + loadRelPath = relpath; + readyTriggered=true; + } + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + +Citro3d: source/proctex.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    proctex.c File Reference
    +
    +
    +
    #include "internal.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void C3D_ProcTexInit (C3D_ProcTex *pt, int offset, int width)
     
    void C3D_ProcTexNoiseCoefs (C3D_ProcTex *pt, int mode, float amplitude, float frequency, float phase)
     
    void C3D_ProcTexLodBias (C3D_ProcTex *pt, float bias)
     
    void C3D_ProcTexBind (int texCoordId, C3D_ProcTex *pt)
     
    void C3D_ProcTexLutBind (GPU_PROCTEX_LUTID id, C3D_ProcTexLut *lut)
     
    void ProcTexLut_FromArray (C3D_ProcTexLut *lut, const float in[129])
     
    void C3D_ProcTexColorLutBind (C3D_ProcTexColorLut *lut)
     
    void ProcTexColorLut_Write (C3D_ProcTexColorLut *out, const u32 *in, int offset, int width)
     
    void C3Di_ProcTexUpdate (C3D_Context *ctx)
     
    void C3Di_ProcTexDirty (C3D_Context *ctx)
     
    +

    Function Documentation

    + +

    ◆ C3D_ProcTexBind()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_ProcTexBind (int texCoordId,
    C3D_ProcTex * pt 
    )
    +
    + +

    Definition at line 39 of file proctex.c.

    + +
    +
    + +

    ◆ C3D_ProcTexColorLutBind()

    + +
    +
    + + + + + + + + +
    void C3D_ProcTexColorLutBind (C3D_ProcTexColorLut * lut)
    +
    + +

    Definition at line 105 of file proctex.c.

    + +
    +
    + +

    ◆ C3D_ProcTexInit()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_ProcTexInit (C3D_ProcTex * pt,
    int offset,
    int width 
    )
    +
    + +

    Definition at line 3 of file proctex.c.

    + +
    +
    + +

    ◆ C3D_ProcTexLodBias()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_ProcTexLodBias (C3D_ProcTex * pt,
    float bias 
    )
    +
    + +

    Definition at line 32 of file proctex.c.

    + +
    +
    + +

    ◆ C3D_ProcTexLutBind()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_ProcTexLutBind (GPU_PROCTEX_LUTID id,
    C3D_ProcTexLut * lut 
    )
    +
    + +

    Definition at line 68 of file proctex.c.

    + +
    +
    + +

    ◆ C3D_ProcTexNoiseCoefs()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_ProcTexNoiseCoefs (C3D_ProcTex * pt,
    int mode,
    float amplitude,
    float frequency,
    float phase 
    )
    +
    + +

    Definition at line 12 of file proctex.c.

    + +
    +
    + +

    ◆ C3Di_ProcTexDirty()

    + +
    +
    + + + + + + + + +
    void C3Di_ProcTexDirty (C3D_Contextctx)
    +
    + +

    Definition at line 182 of file proctex.c.

    + +
    +
    + +

    ◆ C3Di_ProcTexUpdate()

    + +
    +
    + + + + + + + + +
    void C3Di_ProcTexUpdate (C3D_Contextctx)
    +
    + +

    Definition at line 144 of file proctex.c.

    + +
    +
    + +

    ◆ ProcTexColorLut_Write()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void ProcTexColorLut_Write (C3D_ProcTexColorLut * out,
    const u32 * in,
    int offset,
    int width 
    )
    +
    + +

    Definition at line 127 of file proctex.c.

    + +
    +
    + +

    ◆ ProcTexLut_FromArray()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void ProcTexLut_FromArray (C3D_ProcTexLut * lut,
    const float in[129] 
    )
    +
    + +

    Definition at line 93 of file proctex.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/proctex_8c.js b/docs/html/proctex_8c.js new file mode 100644 index 0000000..76a528b --- /dev/null +++ b/docs/html/proctex_8c.js @@ -0,0 +1,13 @@ +var proctex_8c = +[ + [ "C3D_ProcTexBind", "proctex_8c.html#ab8829dfaf5b3218c25d34fb6a346f923", null ], + [ "C3D_ProcTexColorLutBind", "proctex_8c.html#a5778f964dda8176a626295c481475740", null ], + [ "C3D_ProcTexInit", "proctex_8c.html#a345b54954ff53d69da26e67004f27566", null ], + [ "C3D_ProcTexLodBias", "proctex_8c.html#ab7b57156fec968f6fa9b3c23d8f35021", null ], + [ "C3D_ProcTexLutBind", "proctex_8c.html#a5955241da90248b5b970fccdad7e35fc", null ], + [ "C3D_ProcTexNoiseCoefs", "proctex_8c.html#ae07d23679dbadf4b0d8beaf6502e22eb", null ], + [ "C3Di_ProcTexDirty", "proctex_8c.html#a858a4ba4e2f0ea53219743ad022ba883", null ], + [ "C3Di_ProcTexUpdate", "proctex_8c.html#a6f727aa06168f2d1e94d93e5538b9ac7", null ], + [ "ProcTexColorLut_Write", "proctex_8c.html#a2b28950b8e00508b8d241cc57f7ea433", null ], + [ "ProcTexLut_FromArray", "proctex_8c.html#a9e3d456ec182285298d8e844c852a207", null ] +]; \ No newline at end of file diff --git a/docs/html/proctex_8c_source.html b/docs/html/proctex_8c_source.html new file mode 100644 index 0000000..b45af50 --- /dev/null +++ b/docs/html/proctex_8c_source.html @@ -0,0 +1,322 @@ + + + + + + + +Citro3d: source/proctex.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    proctex.c
    +
    +
    +Go to the documentation of this file.
    1#include "internal.h"
    +
    2
    +
    3void C3D_ProcTexInit(C3D_ProcTex* pt, int offset, int width)
    +
    4{
    +
    5 memset(pt, 0, sizeof(*pt));
    +
    6 pt->offset = offset;
    +
    7 pt->width = width;
    +
    8 pt->unknown1 = 0x60;
    +
    9 pt->unknown2 = 0xE0C080;
    +
    10}
    +
    11
    +
    12void C3D_ProcTexNoiseCoefs(C3D_ProcTex* pt, int mode, float amplitude, float frequency, float phase)
    +
    13{
    +
    14 u16 f16_ampl = (s32)(amplitude*0x1000);
    +
    15 u16 f16_freq = f32tof16(frequency);
    +
    16 u16 f16_phase = f32tof16(phase);
    +
    17 pt->enableNoise = true;
    +
    18 if (mode & C3D_ProcTex_U)
    +
    19 {
    +
    20 pt->uNoiseAmpl = f16_ampl;
    +
    21 pt->uNoiseFreq = f16_freq;
    +
    22 pt->uNoisePhase = f16_phase;
    +
    23 }
    +
    24 if (mode & C3D_ProcTex_V)
    +
    25 {
    +
    26 pt->vNoiseAmpl = f16_ampl;
    +
    27 pt->vNoiseFreq = f16_freq;
    +
    28 pt->vNoisePhase = f16_phase;
    +
    29 }
    +
    30}
    +
    31
    +
    32void C3D_ProcTexLodBias(C3D_ProcTex* pt, float bias)
    +
    33{
    +
    34 u32 f16_bias = f32tof16(bias);
    +
    35 pt->lodBiasLow = f16_bias;
    +
    36 pt->lodBiasHigh = f16_bias>>8;
    +
    37}
    +
    38
    +
    39void C3D_ProcTexBind(int texCoordId, C3D_ProcTex* pt)
    +
    40{
    +
    41 C3D_Context* ctx = C3Di_GetContext();
    +
    42
    +
    43 if (!(ctx->flags & C3DiF_Active))
    +
    44 return;
    +
    45
    +
    46 ctx->flags |= C3DiF_TexStatus;
    +
    47 ctx->texConfig &= ~(7<<8);
    +
    48 ctx->procTex = pt;
    +
    49 if (pt)
    +
    50 {
    +
    51 ctx->flags |= C3DiF_ProcTex;
    +
    52 ctx->texConfig |= BIT(10) | ((texCoordId&3)<<8);
    +
    53 } else
    +
    54 ctx->flags &= ~C3DiF_ProcTex;
    +
    55}
    +
    56
    +
    57static inline int lutid2idx(GPU_PROCTEX_LUTID id)
    +
    58{
    +
    59 switch (id)
    +
    60 {
    +
    61 case GPU_LUT_NOISE: return 0;
    +
    62 case GPU_LUT_RGBMAP: return 1;
    +
    63 case GPU_LUT_ALPHAMAP: return 2;
    +
    64 default: return -1;
    +
    65 }
    +
    66}
    +
    67
    +
    68void C3D_ProcTexLutBind(GPU_PROCTEX_LUTID id, C3D_ProcTexLut* lut)
    +
    69{
    +
    70 C3D_Context* ctx = C3Di_GetContext();
    +
    71
    +
    72 if (!(ctx->flags & C3DiF_Active))
    +
    73 return;
    +
    74
    +
    75 int idx = lutid2idx(id);
    +
    76 if (idx < 0)
    +
    77 return;
    +
    78
    +
    79 ctx->procTexLut[idx] = lut;
    +
    80 if (lut)
    +
    81 ctx->flags |= C3DiF_ProcTexLut(idx);
    +
    82 else
    +
    83 ctx->flags &= ~C3DiF_ProcTexLut(idx);
    +
    84}
    +
    85
    +
    86static inline float clampLut(float val)
    +
    87{
    +
    88 if (val < 0.0f) return 0.0f;
    +
    89 if (val > 1.0f) return 1.0f;
    +
    90 return val;
    +
    91}
    +
    92
    +
    93void ProcTexLut_FromArray(C3D_ProcTexLut* lut, const float in[129])
    +
    94{
    +
    95 int i;
    +
    96 for (i = 0; i < 128; i ++)
    +
    97 {
    +
    98 u32 cur = 0xFFF*clampLut(in[i]);
    +
    99 u32 next = 0xFFF*clampLut(in[i+1]);
    +
    100 u32 diff = (next-cur)&0xFFF;
    +
    101 (*lut)[i] = cur | (diff<<12);
    +
    102 }
    +
    103}
    +
    104
    +
    105void C3D_ProcTexColorLutBind(C3D_ProcTexColorLut* lut)
    +
    106{
    +
    107 C3D_Context* ctx = C3Di_GetContext();
    +
    108
    +
    109 if (!(ctx->flags & C3DiF_Active))
    +
    110 return;
    +
    111
    +
    112 ctx->procTexColorLut = lut;
    +
    113 if (lut)
    + +
    115 else
    +
    116 ctx->flags &= ~C3DiF_ProcTexColorLut;
    +
    117}
    +
    118
    +
    119static inline u32 calc_diff(u32 cur, u32 next, int pos)
    +
    120{
    +
    121 cur = (cur>>pos)&0xFF;
    +
    122 next = (next>>pos)&0xFF;
    +
    123 u32 diff = (((s32)next-(s32)cur)>>1)&0xFF;
    +
    124 return diff<<pos;
    +
    125}
    +
    126
    +
    127void ProcTexColorLut_Write(C3D_ProcTexColorLut* out, const u32* in, int offset, int width)
    +
    128{
    +
    129 int i;
    +
    130 memcpy(&out->color[offset], in, 4*width);
    +
    131 for (i = 0; i < (width-1); i ++)
    +
    132 {
    +
    133 u32 cur = in[i];
    +
    134 u32 next = in[i+1];
    +
    135 out->diff[offset+i] =
    +
    136 calc_diff(cur,next,0) |
    +
    137 calc_diff(cur,next,8) |
    +
    138 calc_diff(cur,next,16) |
    +
    139 calc_diff(cur,next,24);
    +
    140 }
    +
    141 out->diff[offset+width-1] = 0;
    +
    142}
    +
    143
    + +
    145{
    +
    146 if (!(ctx->texConfig & BIT(10)))
    +
    147 return;
    +
    148
    +
    149 if (ctx->flags & C3DiF_ProcTex)
    +
    150 {
    +
    151 ctx->flags &= ~C3DiF_ProcTex;
    +
    152 if (ctx->procTex)
    +
    153 GPUCMD_AddIncrementalWrites(GPUREG_TEXUNIT3_PROCTEX0, (u32*)ctx->procTex, 6);
    +
    154 }
    +
    155 if (ctx->flags & C3DiF_ProcTexLutAll)
    +
    156 {
    +
    157 int i;
    +
    158 for (i = 0; i < 3; i ++)
    +
    159 {
    +
    160 int j = i ? (i+1) : 0;
    +
    161 if (!(ctx->flags & C3DiF_ProcTexLut(i)) || !ctx->procTexLut[i])
    +
    162 continue;
    +
    163
    +
    164 GPUCMD_AddWrite(GPUREG_PROCTEX_LUT, j<<8);
    +
    165 GPUCMD_AddWrites(GPUREG_PROCTEX_LUT_DATA0, *ctx->procTexLut[i], 128);
    +
    166 }
    +
    167 ctx->flags &= ~C3DiF_ProcTexLutAll;
    +
    168 }
    +
    169 if (ctx->flags & C3DiF_ProcTexColorLut)
    +
    170 {
    +
    171 ctx->flags &= ~C3DiF_ProcTexColorLut;
    +
    172 if (ctx->procTexColorLut)
    +
    173 {
    +
    174 GPUCMD_AddWrite(GPUREG_PROCTEX_LUT, GPU_LUT_COLOR<<8);
    +
    175 GPUCMD_AddWrites(GPUREG_PROCTEX_LUT_DATA0, ctx->procTexColorLut->color, 256);
    +
    176 GPUCMD_AddWrite(GPUREG_PROCTEX_LUT, GPU_LUT_COLORDIF<<8);
    +
    177 GPUCMD_AddWrites(GPUREG_PROCTEX_LUT_DATA0, ctx->procTexColorLut->diff, 256);
    +
    178 }
    +
    179 }
    +
    180}
    +
    181
    + +
    183{
    +
    184 int i;
    +
    185 if (!ctx->procTex)
    +
    186 return;
    +
    187
    +
    188 ctx->flags |= C3DiF_ProcTex;
    +
    189 if (ctx->procTexColorLut)
    + +
    191 for (i = 0; i < 3; i ++)
    +
    192 if (ctx->procTexLut[i])
    +
    193 ctx->flags |= C3DiF_ProcTexLut(i);
    +
    194}
    + +
    @ C3DiF_Active
    Definition: internal.h:75
    +
    @ C3DiF_ProcTexColorLut
    Definition: internal.h:90
    +
    @ C3DiF_TexStatus
    Definition: internal.h:88
    +
    @ C3DiF_ProcTex
    Definition: internal.h:89
    +
    @ C3DiF_ProcTexLutAll
    Definition: internal.h:96
    +
    #define C3DiF_ProcTexLut(n)
    Definition: internal.h:95
    +
    void ProcTexColorLut_Write(C3D_ProcTexColorLut *out, const u32 *in, int offset, int width)
    Definition: proctex.c:127
    +
    void C3D_ProcTexInit(C3D_ProcTex *pt, int offset, int width)
    Definition: proctex.c:3
    +
    void C3D_ProcTexColorLutBind(C3D_ProcTexColorLut *lut)
    Definition: proctex.c:105
    +
    void C3D_ProcTexLutBind(GPU_PROCTEX_LUTID id, C3D_ProcTexLut *lut)
    Definition: proctex.c:68
    +
    void C3Di_ProcTexUpdate(C3D_Context *ctx)
    Definition: proctex.c:144
    +
    void C3Di_ProcTexDirty(C3D_Context *ctx)
    Definition: proctex.c:182
    +
    void ProcTexLut_FromArray(C3D_ProcTexLut *lut, const float in[129])
    Definition: proctex.c:93
    +
    void C3D_ProcTexLodBias(C3D_ProcTex *pt, float bias)
    Definition: proctex.c:32
    +
    void C3D_ProcTexBind(int texCoordId, C3D_ProcTex *pt)
    Definition: proctex.c:39
    +
    void C3D_ProcTexNoiseCoefs(C3D_ProcTex *pt, int mode, float amplitude, float frequency, float phase)
    Definition: proctex.c:12
    + +
    u32 flags
    Definition: internal.h:38
    +
    u32 texConfig
    Definition: internal.h:46
    +
    C3D_ProcTexColorLut * procTexColorLut
    Definition: internal.h:63
    +
    C3D_ProcTexLut * procTexLut[3]
    Definition: internal.h:62
    +
    C3D_ProcTex * procTex
    Definition: internal.h:61
    +
    +
    + + + + diff --git a/docs/html/renderqueue_8c.html b/docs/html/renderqueue_8c.html new file mode 100644 index 0000000..d71437a --- /dev/null +++ b/docs/html/renderqueue_8c.html @@ -0,0 +1,786 @@ + + + + + + + +Citro3d: source/renderqueue.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    renderqueue.c File Reference
    +
    +
    +
    #include "internal.h"
    +#include <c3d/base.h>
    +#include <c3d/renderqueue.h>
    +#include <stdlib.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    void C3D_FrameSync (void)
     
    u32 C3D_FrameCounter (int id)
     
    void C3Di_RenderQueueEnableVBlank (void)
     
    void C3Di_RenderQueueDisableVBlank (void)
     
    void C3Di_RenderQueueInit (void)
     
    void C3Di_RenderQueueExit (void)
     
    void C3Di_RenderQueueWaitDone (void)
     
    float C3D_FrameRate (float fps)
     
    bool C3D_FrameBegin (u8 flags)
     
    bool C3D_FrameDrawOn (C3D_RenderTarget *target)
     
    void C3D_FrameSplit (u8 flags)
     
    void C3D_FrameEnd (u8 flags)
     
    void C3D_FrameEndHook (void(*hook)(void *), void *param)
     
    float C3D_GetDrawingTime (void)
     
    float C3D_GetProcessingTime (void)
     
    C3D_RenderTarget * C3D_RenderTargetCreate (int width, int height, GPU_COLORBUF colorFmt, C3D_DEPTHTYPE depthFmt)
     
    C3D_RenderTarget * C3D_RenderTargetCreateFromTex (C3D_Tex *tex, GPU_TEXFACE face, int level, C3D_DEPTHTYPE depthFmt)
     
    void C3D_RenderTargetDelete (C3D_RenderTarget *target)
     
    void C3D_RenderTargetSetOutput (C3D_RenderTarget *target, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
     
    void C3D_SyncDisplayTransfer (u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 flags)
     
    void C3D_SyncTextureCopy (u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 size, u32 flags)
     
    void C3D_SyncMemoryFill (u32 *buf0a, u32 buf0v, u32 *buf0e, u16 control0, u32 *buf1a, u32 buf1v, u32 *buf1e, u16 control1)
     
    +

    Function Documentation

    + +

    ◆ C3D_FrameBegin()

    + +
    +
    + + + + + + + + +
    bool C3D_FrameBegin (u8 flags)
    +
    + +

    Definition at line 163 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameCounter()

    + +
    +
    + + + + + + + + +
    u32 C3D_FrameCounter (int id)
    +
    + +

    Definition at line 87 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameDrawOn()

    + +
    +
    + + + + + + + + +
    bool C3D_FrameDrawOn (C3D_RenderTarget * target)
    +
    + +

    Definition at line 179 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameEnd()

    + +
    +
    + + + + + + + + +
    void C3D_FrameEnd (u8 flags)
    +
    + +

    Definition at line 197 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameEndHook()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_FrameEndHook (void(*)(void *) hook,
    void * param 
    )
    +
    + +

    Definition at line 243 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameRate()

    + +
    +
    + + + + + + + + +
    float C3D_FrameRate (float fps)
    +
    + +

    Definition at line 151 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameSplit()

    + +
    +
    + + + + + + + + +
    void C3D_FrameSplit (u8 flags)
    +
    + +

    Definition at line 189 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_FrameSync()

    + +
    +
    + + + + + + + + +
    void C3D_FrameSync (void )
    +
    + +

    Definition at line 75 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_GetDrawingTime()

    + +
    +
    + + + + + + + + +
    float C3D_GetDrawingTime (void )
    +
    + +

    Definition at line 249 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_GetProcessingTime()

    + +
    +
    + + + + + + + + +
    float C3D_GetProcessingTime (void )
    +
    + +

    Definition at line 254 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_RenderTargetCreate()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    C3D_RenderTarget * C3D_RenderTargetCreate (int width,
    int height,
    GPU_COLORBUF colorFmt,
    C3D_DEPTHTYPE depthFmt 
    )
    +
    + +

    Definition at line 278 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_RenderTargetCreateFromTex()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    C3D_RenderTarget * C3D_RenderTargetCreateFromTex (C3D_Tex * tex,
    GPU_TEXFACE face,
    int level,
    C3D_DEPTHTYPE depthFmt 
    )
    +
    + +

    Definition at line 317 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_RenderTargetDelete()

    + +
    +
    + + + + + + + + +
    void C3D_RenderTargetDelete (C3D_RenderTarget * target)
    +
    + +

    Definition at line 361 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_RenderTargetSetOutput()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_RenderTargetSetOutput (C3D_RenderTarget * target,
    gfxScreen_t screen,
    gfx3dSide_t side,
    u32 transferFlags 
    )
    +
    + +

    Definition at line 372 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_SyncDisplayTransfer()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_SyncDisplayTransfer (u32 * inadr,
    u32 indim,
    u32 * outadr,
    u32 outdim,
    u32 flags 
    )
    +
    + +

    Definition at line 417 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_SyncMemoryFill()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_SyncMemoryFill (u32 * buf0a,
    u32 buf0v,
    u32 * buf0e,
    u16 control0,
    u32 * buf1a,
    u32 buf1v,
    u32 * buf1e,
    u16 control1 
    )
    +
    + +

    Definition at line 443 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3D_SyncTextureCopy()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_SyncTextureCopy (u32 * inadr,
    u32 indim,
    u32 * outadr,
    u32 outdim,
    u32 size,
    u32 flags 
    )
    +
    + +

    Definition at line 430 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3Di_RenderQueueDisableVBlank()

    + +
    +
    + + + + + + + + +
    void C3Di_RenderQueueDisableVBlank (void )
    +
    + +

    Definition at line 108 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3Di_RenderQueueEnableVBlank()

    + +
    +
    + + + + + + + + +
    void C3Di_RenderQueueEnableVBlank (void )
    +
    + +

    Definition at line 102 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3Di_RenderQueueExit()

    + +
    +
    + + + + + + + + +
    void C3Di_RenderQueueExit (void )
    +
    + +

    Definition at line 125 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3Di_RenderQueueInit()

    + +
    +
    + + + + + + + + +
    void C3Di_RenderQueueInit (void )
    +
    + +

    Definition at line 114 of file renderqueue.c.

    + +
    +
    + +

    ◆ C3Di_RenderQueueWaitDone()

    + +
    +
    + + + + + + + + +
    void C3Di_RenderQueueWaitDone (void )
    +
    + +

    Definition at line 146 of file renderqueue.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/renderqueue_8c.js b/docs/html/renderqueue_8c.js new file mode 100644 index 0000000..a954a7d --- /dev/null +++ b/docs/html/renderqueue_8c.js @@ -0,0 +1,25 @@ +var renderqueue_8c = +[ + [ "C3D_FrameBegin", "renderqueue_8c.html#a7675742b59d3b6718f68179bbe31e78b", null ], + [ "C3D_FrameCounter", "renderqueue_8c.html#a5ef85bebbc2a8a98a409a4c24a05fee6", null ], + [ "C3D_FrameDrawOn", "renderqueue_8c.html#a1cf7de15e6026508e2502dd8a938a554", null ], + [ "C3D_FrameEnd", "renderqueue_8c.html#afff1197369155052b5ad89eca13fbb34", null ], + [ "C3D_FrameEndHook", "renderqueue_8c.html#a0fbf711434a86cf52247197bdd18d03d", null ], + [ "C3D_FrameRate", "renderqueue_8c.html#a9ce9a686ea3cd4f8703b8d3cb815af06", null ], + [ "C3D_FrameSplit", "renderqueue_8c.html#a30d22d0f997fa9d49f58a9e0cd51d433", null ], + [ "C3D_FrameSync", "renderqueue_8c.html#a41442453dd910a4c79dec8f6a5cc6acc", null ], + [ "C3D_GetDrawingTime", "renderqueue_8c.html#a4d5d9a58ee65c08aac17d819e072d8d1", null ], + [ "C3D_GetProcessingTime", "renderqueue_8c.html#a42255e0c2c469fc7ef4ce52115390fa4", null ], + [ "C3D_RenderTargetCreate", "renderqueue_8c.html#a716ffff33be46fe13a0b66b13de4e5f8", null ], + [ "C3D_RenderTargetCreateFromTex", "renderqueue_8c.html#a31e0a8da75cf659a9ff59f8e51a42f34", null ], + [ "C3D_RenderTargetDelete", "renderqueue_8c.html#afa76b60e45b1a19fa44136a880c311ef", null ], + [ "C3D_RenderTargetSetOutput", "renderqueue_8c.html#aa44d9c7acd33a35026292cb0481b4ebf", null ], + [ "C3D_SyncDisplayTransfer", "renderqueue_8c.html#ae463bfd7d3676c3bcc56869f2e17ecf1", null ], + [ "C3D_SyncMemoryFill", "renderqueue_8c.html#a87d66e53af7a8267f4be0e7283c4ce9c", null ], + [ "C3D_SyncTextureCopy", "renderqueue_8c.html#a40706d596256234e2655707ebdcacb32", null ], + [ "C3Di_RenderQueueDisableVBlank", "renderqueue_8c.html#a73b8cdfbcd16488c7a6a54dade6ae470", null ], + [ "C3Di_RenderQueueEnableVBlank", "renderqueue_8c.html#a765ddd29aa58ce4598429750d3f692a5", null ], + [ "C3Di_RenderQueueExit", "renderqueue_8c.html#aa8202fe4deb317840c5ca9516d7813f2", null ], + [ "C3Di_RenderQueueInit", "renderqueue_8c.html#a15d6ad6f422fcb523ff7ddf6808f959c", null ], + [ "C3Di_RenderQueueWaitDone", "renderqueue_8c.html#a7cde967201bd3128dc49b7cc7d065ff4", null ] +]; \ No newline at end of file diff --git a/docs/html/renderqueue_8c_source.html b/docs/html/renderqueue_8c_source.html new file mode 100644 index 0000000..11b5179 --- /dev/null +++ b/docs/html/renderqueue_8c_source.html @@ -0,0 +1,594 @@ + + + + + + + +Citro3d: source/renderqueue.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    renderqueue.c
    +
    +
    +Go to the documentation of this file.
    1#include "internal.h"
    +
    2#include <c3d/base.h>
    +
    3#include <c3d/renderqueue.h>
    +
    4#include <stdlib.h>
    +
    5
    +
    6static C3D_RenderTarget *firstTarget, *lastTarget;
    +
    7static C3D_RenderTarget *linkedTarget[3];
    +
    8
    +
    9static TickCounter gpuTime, cpuTime;
    +
    10
    +
    11static bool inFrame, inSafeTransfer, measureGpuTime;
    +
    12static bool needSwapTop, needSwapBot, isTopStereo;
    +
    13static float framerate = 60.0f;
    +
    14static float framerateCounter[2] = { 60.0f, 60.0f };
    +
    15static u32 frameCounter[2];
    +
    16static void (* frameEndCb)(void*);
    +
    17static void* frameEndCbData;
    +
    18
    +
    19static void C3Di_RenderTargetDestroy(C3D_RenderTarget* target);
    +
    20
    +
    21static bool framerateLimit(int id)
    +
    22{
    +
    23 framerateCounter[id] -= framerate;
    +
    24 if (framerateCounter[id] <= 0.0f)
    +
    25 {
    +
    26 framerateCounter[id] += 60.0f;
    +
    27 return true;
    +
    28 }
    +
    29 return false;
    +
    30}
    +
    31
    +
    32static void onVBlank0(C3D_UNUSED void* unused)
    +
    33{
    +
    34 if (framerateLimit(0))
    +
    35 frameCounter[0]++;
    +
    36}
    +
    37
    +
    38static void onVBlank1(C3D_UNUSED void* unused)
    +
    39{
    +
    40 if (framerateLimit(1))
    +
    41 frameCounter[1]++;
    +
    42}
    +
    43
    +
    44static void onQueueFinish(gxCmdQueue_s* queue)
    +
    45{
    +
    46 if (measureGpuTime)
    +
    47 {
    +
    48 osTickCounterUpdate(&gpuTime);
    +
    49 measureGpuTime = false;
    +
    50 }
    +
    51 if (inSafeTransfer)
    +
    52 {
    +
    53 inSafeTransfer = false;
    +
    54 if (inFrame)
    +
    55 {
    +
    56 gxCmdQueueStop(queue);
    +
    57 gxCmdQueueClear(queue);
    +
    58 }
    +
    59 }
    +
    60 else
    +
    61 {
    +
    62 if (needSwapTop)
    +
    63 {
    +
    64 gfxScreenSwapBuffers(GFX_TOP, isTopStereo);
    +
    65 needSwapTop = false;
    +
    66 }
    +
    67 if (needSwapBot)
    +
    68 {
    +
    69 gfxScreenSwapBuffers(GFX_BOTTOM, false);
    +
    70 needSwapBot = false;
    +
    71 }
    +
    72 }
    +
    73}
    +
    74
    +
    75void C3D_FrameSync(void)
    +
    76{
    +
    77 u32 cur[2];
    +
    78 u32 start[2] = { frameCounter[0], frameCounter[1] };
    +
    79 do
    +
    80 {
    +
    81 gspWaitForAnyEvent();
    +
    82 cur[0] = frameCounter[0];
    +
    83 cur[1] = frameCounter[1];
    +
    84 } while (cur[0]==start[0] || cur[1]==start[1]);
    +
    85}
    +
    86
    + +
    88{
    +
    89 return frameCounter[id];
    +
    90}
    +
    91
    +
    92static bool C3Di_WaitAndClearQueue(s64 timeout)
    +
    93{
    +
    94 gxCmdQueue_s* queue = &C3Di_GetContext()->gxQueue;
    +
    95 if (!gxCmdQueueWait(queue, timeout))
    +
    96 return false;
    +
    97 gxCmdQueueStop(queue);
    +
    98 gxCmdQueueClear(queue);
    +
    99 return true;
    +
    100}
    +
    101
    + +
    103{
    +
    104 gspSetEventCallback(GSPGPU_EVENT_VBlank0, onVBlank0, NULL, false);
    +
    105 gspSetEventCallback(GSPGPU_EVENT_VBlank1, onVBlank1, NULL, false);
    +
    106}
    +
    107
    + +
    109{
    +
    110 gspSetEventCallback(GSPGPU_EVENT_VBlank0, NULL, NULL, false);
    +
    111 gspSetEventCallback(GSPGPU_EVENT_VBlank1, NULL, NULL, false);
    +
    112}
    +
    113
    + +
    115{
    +
    116 C3D_Context* ctx = C3Di_GetContext();
    +
    117
    + +
    119
    +
    120 GX_BindQueue(&ctx->gxQueue);
    +
    121 gxCmdQueueSetCallback(&ctx->gxQueue, onQueueFinish, NULL);
    +
    122 gxCmdQueueRun(&ctx->gxQueue);
    +
    123}
    +
    124
    + +
    126{
    +
    127 int i;
    +
    128 C3D_RenderTarget *a, *next;
    +
    129
    +
    130 C3Di_WaitAndClearQueue(-1);
    +
    131 gxCmdQueueSetCallback(&C3Di_GetContext()->gxQueue, NULL, NULL);
    +
    132 GX_BindQueue(NULL);
    +
    133
    + +
    135
    +
    136 for (i = 0; i < 3; i ++)
    +
    137 linkedTarget[i] = NULL;
    +
    138
    +
    139 for (a = firstTarget; a; a = next)
    +
    140 {
    +
    141 next = a->next;
    +
    142 C3Di_RenderTargetDestroy(a);
    +
    143 }
    +
    144}
    +
    145
    + +
    147{
    +
    148 C3Di_WaitAndClearQueue(-1);
    +
    149}
    +
    150
    +
    151float C3D_FrameRate(float fps)
    +
    152{
    +
    153 float old = framerate;
    +
    154 if (fps > 0.0f && fps <= 60.0f)
    +
    155 {
    +
    156 framerate = fps;
    +
    157 framerateCounter[0] = fps;
    +
    158 framerateCounter[1] = fps;
    +
    159 }
    +
    160 return old;
    +
    161}
    +
    162
    +
    163bool C3D_FrameBegin(u8 flags)
    +
    164{
    +
    165 C3D_Context* ctx = C3Di_GetContext();
    +
    166 if (inFrame) return false;
    +
    167
    +
    168 if (flags & C3D_FRAME_SYNCDRAW)
    + +
    170 if (!C3Di_WaitAndClearQueue((flags & C3D_FRAME_NONBLOCK) ? 0 : -1))
    +
    171 return false;
    +
    172
    +
    173 inFrame = true;
    +
    174 osTickCounterStart(&cpuTime);
    +
    175 GPUCMD_SetBuffer(ctx->cmdBuf, ctx->cmdBufSize, 0);
    +
    176 return true;
    +
    177}
    +
    178
    +
    179bool C3D_FrameDrawOn(C3D_RenderTarget* target)
    +
    180{
    +
    181 if (!inFrame) return false;
    +
    182
    +
    183 target->used = true;
    +
    184 C3D_SetFrameBuf(&target->frameBuf);
    +
    185 C3D_SetViewport(0, 0, target->frameBuf.width, target->frameBuf.height);
    +
    186 return true;
    +
    187}
    +
    188
    +
    189void C3D_FrameSplit(u8 flags)
    +
    190{
    +
    191 u32 *cmdBuf, cmdBufSize;
    +
    192 if (!inFrame) return;
    +
    193 if (C3Di_SplitFrame(&cmdBuf, &cmdBufSize))
    +
    194 GX_ProcessCommandList(cmdBuf, cmdBufSize*4, flags);
    +
    195}
    +
    196
    +
    197void C3D_FrameEnd(u8 flags)
    +
    198{
    +
    199 C3D_Context* ctx = C3Di_GetContext();
    +
    200 if (!inFrame) return;
    +
    201
    +
    202 if (frameEndCb)
    +
    203 frameEndCb(frameEndCbData);
    +
    204
    +
    205 C3D_FrameSplit(flags);
    +
    206 GPUCMD_SetBuffer(NULL, 0, 0);
    +
    207 osTickCounterUpdate(&cpuTime);
    +
    208 inFrame = false;
    +
    209
    +
    210 // Flush the entire linear memory if the user did not explicitly mandate to flush the command list
    +
    211 if (!(flags & GX_CMDLIST_FLUSH))
    +
    212 {
    +
    213 extern u32 __ctru_linear_heap;
    +
    214 extern u32 __ctru_linear_heap_size;
    +
    215 GSPGPU_FlushDataCache((void*)__ctru_linear_heap, __ctru_linear_heap_size);
    +
    216 }
    +
    217
    +
    218 int i;
    +
    219 C3D_RenderTarget* target;
    +
    220 isTopStereo = false;
    +
    221 for (i = 2; i >= 0; i --)
    +
    222 {
    +
    223 target = linkedTarget[i];
    +
    224 if (!target || !target->used)
    +
    225 continue;
    +
    226 target->used = false;
    +
    227 C3D_FrameBufTransfer(&target->frameBuf, target->screen, target->side, target->transferFlags);
    +
    228 if (target->screen == GFX_TOP)
    +
    229 {
    +
    230 needSwapTop = true;
    +
    231 if (target->side == GFX_RIGHT)
    +
    232 isTopStereo = true;
    +
    233 }
    +
    234 else if (target->screen == GFX_BOTTOM)
    +
    235 needSwapBot = true;
    +
    236 }
    +
    237
    +
    238 measureGpuTime = true;
    +
    239 osTickCounterStart(&gpuTime);
    +
    240 gxCmdQueueRun(&ctx->gxQueue);
    +
    241}
    +
    242
    +
    243void C3D_FrameEndHook(void (* hook)(void*), void* param)
    +
    244{
    +
    245 frameEndCb = hook;
    +
    246 frameEndCbData = param;
    +
    247}
    +
    248
    + +
    250{
    +
    251 return osTickCounterRead(&gpuTime);
    +
    252}
    +
    253
    + +
    255{
    +
    256 return osTickCounterRead(&cpuTime);
    +
    257}
    +
    258
    +
    259static C3D_RenderTarget* C3Di_RenderTargetNew(void)
    +
    260{
    +
    261 C3D_RenderTarget* target = (C3D_RenderTarget*)malloc(sizeof(C3D_RenderTarget));
    +
    262 if (!target) return NULL;
    +
    263 memset(target, 0, sizeof(C3D_RenderTarget));
    +
    264 return target;
    +
    265}
    +
    266
    +
    267static void C3Di_RenderTargetFinishInit(C3D_RenderTarget* target)
    +
    268{
    +
    269 target->prev = lastTarget;
    +
    270 target->next = NULL;
    +
    271 if (lastTarget)
    +
    272 lastTarget->next = target;
    +
    273 if (!firstTarget)
    +
    274 firstTarget = target;
    +
    275 lastTarget = target;
    +
    276}
    +
    277
    +
    278C3D_RenderTarget* C3D_RenderTargetCreate(int width, int height, GPU_COLORBUF colorFmt, C3D_DEPTHTYPE depthFmt)
    +
    279{
    +
    280 GPU_DEPTHBUF depthFmtReal = GPU_RB_DEPTH16;
    +
    281 void* depthBuf = NULL;
    +
    282 void* colorBuf = vramAlloc(C3D_CalcColorBufSize(width,height,colorFmt));
    +
    283 if (!colorBuf) goto _fail0;
    +
    284 if (C3D_DEPTHTYPE_OK(depthFmt))
    +
    285 {
    +
    286 depthFmtReal = C3D_DEPTHTYPE_VAL(depthFmt);
    +
    287 size_t depthSize = C3D_CalcDepthBufSize(width,height,depthFmtReal);
    +
    288 vramAllocPos vramBank = addrGetVRAMBank(colorBuf);
    +
    289 depthBuf = vramAllocAt(depthSize, vramBank ^ VRAM_ALLOC_ANY); // Attempt opposite bank first...
    +
    290 if (!depthBuf) depthBuf = vramAllocAt(depthSize, vramBank); // ... if that fails, attempt same bank
    +
    291 if (!depthBuf) goto _fail1;
    +
    292 }
    +
    293
    +
    294 C3D_RenderTarget* target = C3Di_RenderTargetNew();
    +
    295 if (!target) goto _fail2;
    +
    296
    +
    297 C3D_FrameBuf* fb = &target->frameBuf;
    +
    298 C3D_FrameBufAttrib(fb, width, height, false);
    +
    299 C3D_FrameBufColor(fb, colorBuf, colorFmt);
    +
    300 target->ownsColor = true;
    +
    301 if (depthBuf)
    +
    302 {
    +
    303 C3D_FrameBufDepth(fb, depthBuf, depthFmtReal);
    +
    304 target->ownsDepth = true;
    +
    305 }
    +
    306 C3Di_RenderTargetFinishInit(target);
    +
    307 return target;
    +
    308
    +
    309_fail2:
    +
    310 if (depthBuf) vramFree(depthBuf);
    +
    311_fail1:
    +
    312 vramFree(colorBuf);
    +
    313_fail0:
    +
    314 return NULL;
    +
    315}
    +
    316
    +
    317C3D_RenderTarget* C3D_RenderTargetCreateFromTex(C3D_Tex* tex, GPU_TEXFACE face, int level, C3D_DEPTHTYPE depthFmt)
    +
    318{
    +
    319 if (!addrIsVRAM(tex->data)) return NULL; // Render targets must be in VRAM
    +
    320 C3D_RenderTarget* target = C3Di_RenderTargetNew();
    +
    321 if (!target) return NULL;
    +
    322
    +
    323 C3D_FrameBuf* fb = &target->frameBuf;
    +
    324 C3D_FrameBufTex(fb, tex, face, level);
    +
    325
    +
    326 if (C3D_DEPTHTYPE_OK(depthFmt))
    +
    327 {
    +
    328 GPU_DEPTHBUF depthFmtReal = C3D_DEPTHTYPE_VAL(depthFmt);
    +
    329 size_t depthSize = C3D_CalcDepthBufSize(fb->width,fb->height,depthFmtReal);
    +
    330 vramAllocPos vramBank = addrGetVRAMBank(tex->data);
    +
    331 void* depthBuf = vramAllocAt(depthSize, vramBank ^ VRAM_ALLOC_ANY); // Attempt opposite bank first...
    +
    332 if (!depthBuf) depthBuf = vramAllocAt(depthSize, vramBank); // ... if that fails, attempt same bank
    +
    333 if (!depthBuf)
    +
    334 {
    +
    335 free(target);
    +
    336 return NULL;
    +
    337 }
    +
    338
    +
    339 C3D_FrameBufDepth(fb, depthBuf, depthFmtReal);
    +
    340 target->ownsDepth = true;
    +
    341 }
    +
    342
    +
    343 C3Di_RenderTargetFinishInit(target);
    +
    344 return target;
    +
    345}
    +
    346
    +
    347void C3Di_RenderTargetDestroy(C3D_RenderTarget* target)
    +
    348{
    +
    349 if (target->ownsColor)
    +
    350 vramFree(target->frameBuf.colorBuf);
    +
    351 if (target->ownsDepth)
    +
    352 vramFree(target->frameBuf.depthBuf);
    +
    353
    +
    354 C3D_RenderTarget** prevNext = target->prev ? &target->prev->next : &firstTarget;
    +
    355 C3D_RenderTarget** nextPrev = target->next ? &target->next->prev : &lastTarget;
    +
    356 *prevNext = target->next;
    +
    357 *nextPrev = target->prev;
    +
    358 free(target);
    +
    359}
    +
    360
    +
    361void C3D_RenderTargetDelete(C3D_RenderTarget* target)
    +
    362{
    +
    363 if (inFrame)
    +
    364 svcBreak(USERBREAK_PANIC); // Shouldn't happen.
    +
    365 if (target->linked)
    +
    366 C3D_RenderTargetDetachOutput(target);
    +
    367 else
    +
    368 C3Di_WaitAndClearQueue(-1);
    +
    369 C3Di_RenderTargetDestroy(target);
    +
    370}
    +
    371
    +
    372void C3D_RenderTargetSetOutput(C3D_RenderTarget* target, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
    +
    373{
    +
    374 int id = 0;
    +
    375 if (screen==GFX_BOTTOM) id = 2;
    +
    376 else if (side==GFX_RIGHT) id = 1;
    +
    377 if (linkedTarget[id])
    +
    378 {
    +
    379 linkedTarget[id]->linked = false;
    +
    380 if (!inFrame)
    +
    381 C3Di_WaitAndClearQueue(-1);
    +
    382 }
    +
    383 linkedTarget[id] = target;
    +
    384 if (target)
    +
    385 {
    +
    386 target->linked = true;
    +
    387 target->transferFlags = transferFlags;
    +
    388 target->screen = screen;
    +
    389 target->side = side;
    +
    390 }
    +
    391}
    +
    392
    +
    393static void C3Di_SafeDisplayTransfer(u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 flags)
    +
    394{
    +
    395 C3Di_WaitAndClearQueue(-1);
    +
    396 inSafeTransfer = true;
    +
    397 GX_DisplayTransfer(inadr, indim, outadr, outdim, flags);
    +
    398 gxCmdQueueRun(&C3Di_GetContext()->gxQueue);
    +
    399}
    +
    400
    +
    401static void C3Di_SafeTextureCopy(u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 size, u32 flags)
    +
    402{
    +
    403 C3Di_WaitAndClearQueue(-1);
    +
    404 inSafeTransfer = true;
    +
    405 GX_TextureCopy(inadr, indim, outadr, outdim, size, flags);
    +
    406 gxCmdQueueRun(&C3Di_GetContext()->gxQueue);
    +
    407}
    +
    408
    +
    409static void C3Di_SafeMemoryFill(u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1)
    +
    410{
    +
    411 C3Di_WaitAndClearQueue(-1);
    +
    412 inSafeTransfer = true;
    +
    413 GX_MemoryFill(buf0a, buf0v, buf0e, control0, buf1a, buf1v, buf1e, control1);
    +
    414 gxCmdQueueRun(&C3Di_GetContext()->gxQueue);
    +
    415}
    +
    416
    +
    417void C3D_SyncDisplayTransfer(u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 flags)
    +
    418{
    +
    419 if (inFrame)
    +
    420 {
    + +
    422 GX_DisplayTransfer(inadr, indim, outadr, outdim, flags);
    +
    423 } else
    +
    424 {
    +
    425 C3Di_SafeDisplayTransfer(inadr, indim, outadr, outdim, flags);
    +
    426 gspWaitForPPF();
    +
    427 }
    +
    428}
    +
    429
    +
    430void C3D_SyncTextureCopy(u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 size, u32 flags)
    +
    431{
    +
    432 if (inFrame)
    +
    433 {
    + +
    435 GX_TextureCopy(inadr, indim, outadr, outdim, size, flags);
    +
    436 } else
    +
    437 {
    +
    438 C3Di_SafeTextureCopy(inadr, indim, outadr, outdim, size, flags);
    +
    439 gspWaitForPPF();
    +
    440 }
    +
    441}
    +
    442
    +
    443void C3D_SyncMemoryFill(u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1)
    +
    444{
    +
    445 if (inFrame)
    +
    446 {
    + +
    448 GX_MemoryFill(buf0a, buf0v, buf0e, control0, buf1a, buf1v, buf1e, control1);
    +
    449 } else
    +
    450 {
    +
    451 C3Di_SafeMemoryFill(buf0a, buf0v, buf0e, control0, buf1a, buf1v, buf1e, control1);
    +
    452 gspWaitForPSC0();
    +
    453 }
    +
    454}
    +
    bool C3Di_SplitFrame(u32 **pBuf, u32 *pSize)
    Definition: base.c:309
    +
    void C3D_SetViewport(u32 x, u32 y, u32 w, u32 h)
    Definition: base.c:136
    +
    void C3D_FrameBufTex(C3D_FrameBuf *fb, C3D_Tex *tex, GPU_TEXFACE face, int level)
    Definition: framebuffer.c:41
    +
    void C3D_FrameBufTransfer(C3D_FrameBuf *frameBuf, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
    Definition: framebuffer.c:95
    +
    u32 C3D_CalcColorBufSize(u32 width, u32 height, GPU_COLORBUF fmt)
    Definition: framebuffer.c:6
    +
    u32 C3D_CalcDepthBufSize(u32 width, u32 height, GPU_DEPTHBUF fmt)
    Definition: framebuffer.c:12
    +
    void C3D_SetFrameBuf(C3D_FrameBuf *fb)
    Definition: framebuffer.c:29
    + +
    #define C3D_UNUSED
    Definition: internal.h:10
    +
    void C3D_FrameEndHook(void(*hook)(void *), void *param)
    Definition: renderqueue.c:243
    +
    void C3Di_RenderQueueInit(void)
    Definition: renderqueue.c:114
    +
    bool C3D_FrameDrawOn(C3D_RenderTarget *target)
    Definition: renderqueue.c:179
    +
    void C3D_FrameSplit(u8 flags)
    Definition: renderqueue.c:189
    +
    C3D_RenderTarget * C3D_RenderTargetCreateFromTex(C3D_Tex *tex, GPU_TEXFACE face, int level, C3D_DEPTHTYPE depthFmt)
    Definition: renderqueue.c:317
    +
    void C3D_SyncTextureCopy(u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 size, u32 flags)
    Definition: renderqueue.c:430
    +
    void C3D_FrameSync(void)
    Definition: renderqueue.c:75
    +
    float C3D_GetProcessingTime(void)
    Definition: renderqueue.c:254
    +
    float C3D_GetDrawingTime(void)
    Definition: renderqueue.c:249
    +
    u32 C3D_FrameCounter(int id)
    Definition: renderqueue.c:87
    +
    C3D_RenderTarget * C3D_RenderTargetCreate(int width, int height, GPU_COLORBUF colorFmt, C3D_DEPTHTYPE depthFmt)
    Definition: renderqueue.c:278
    +
    void C3Di_RenderQueueDisableVBlank(void)
    Definition: renderqueue.c:108
    +
    void C3Di_RenderQueueEnableVBlank(void)
    Definition: renderqueue.c:102
    +
    bool C3D_FrameBegin(u8 flags)
    Definition: renderqueue.c:163
    +
    void C3Di_RenderQueueWaitDone(void)
    Definition: renderqueue.c:146
    +
    void C3D_SyncMemoryFill(u32 *buf0a, u32 buf0v, u32 *buf0e, u16 control0, u32 *buf1a, u32 buf1v, u32 *buf1e, u16 control1)
    Definition: renderqueue.c:443
    +
    float C3D_FrameRate(float fps)
    Definition: renderqueue.c:151
    +
    void C3D_RenderTargetSetOutput(C3D_RenderTarget *target, gfxScreen_t screen, gfx3dSide_t side, u32 transferFlags)
    Definition: renderqueue.c:372
    +
    void C3Di_RenderQueueExit(void)
    Definition: renderqueue.c:125
    +
    void C3D_SyncDisplayTransfer(u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 flags)
    Definition: renderqueue.c:417
    +
    void C3D_RenderTargetDelete(C3D_RenderTarget *target)
    Definition: renderqueue.c:361
    +
    void C3D_FrameEnd(u8 flags)
    Definition: renderqueue.c:197
    + +
    u32 * cmdBuf
    Definition: internal.h:34
    +
    gxCmdQueue_s gxQueue
    Definition: internal.h:33
    +
    size_t cmdBufSize
    Definition: internal.h:35
    +
    +
    + + + + diff --git a/docs/html/resize.js b/docs/html/resize.js new file mode 100644 index 0000000..aaeb6fc --- /dev/null +++ b/docs/html/resize.js @@ -0,0 +1,155 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var once=1; +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,barWidth=6,desktop_vp=768,titleHeight; + + function readSetting(cookie) + { + if (window.chrome) { + var val = localStorage.getItem(cookie_namespace+'_width'); + if (val) return val; + } else { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + } + return 250; + } + + function writeSetting(cookie, val) + { + if (window.chrome) { + localStorage.setItem(cookie_namespace+"_width",val); + } else { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/"; + } + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); + } + writeSetting('width',sidenavWidth-barWidth); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + } + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height(); + var contentHeight,navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + content.css({height:contentHeight + "px"}); + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + if (location.hash.slice(1)) { + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); + } + } + + function collapseExpand() + { + var newWidth; + if (sidenav.width()>0) { + newWidth=0; + } + else { + var width = readSetting('width'); + newWidth = (width>250 && width<$(window).width()) ? width : 250; + } + restoreWidth(newWidth); + var sidenavWidth = $(sidenav).outerWidth(); + writeSetting('width',sidenavWidth-barWidth); + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readSetting('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + if (once) { + $(".ui-resizable-handle").dblclick(collapseExpand); + once=0 + } + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js new file mode 100644 index 0000000..0ada6c4 --- /dev/null +++ b/docs/html/search/all_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['_5f_5fattribute_5f_5f_0',['__attribute__',['../base_8c.html#af9aace1b44b73111e15aa39f06f43456',1,'__attribute__((weak)): base.c'],['../tex3ds_8c.html#ab898071398b359603a35c202e9c65f3b',1,'__attribute__((packed)): tex3ds.c']]], + ['_5f_5fc3d_5fcontext_1',['__C3D_Context',['../base_8c.html#a9a995e066df9295b40179eb0d2b8fe01',1,'base.c']]] +]; diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js new file mode 100644 index 0000000..7547104 --- /dev/null +++ b/docs/html/search/all_1.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['alphablend_0',['alphaBlend',['../struct_c3_d___effect.html#abc74d60c7601eae49380e2f7737c90b4',1,'C3D_Effect']]], + ['alphatest_1',['alphaTest',['../struct_c3_d___effect.html#a226b4271d5998e54cd6453c1e668463d',1,'C3D_Effect']]], + ['attribs_2ec_2',['attribs.c',['../attribs_8c.html',1,'']]], + ['attrinfo_3',['attrInfo',['../struct_c3_d___context.html#a81d94fb558d133ebfcd8e88300c4a69f',1,'C3D_Context']]], + ['attrinfo_5faddfixed_4',['AttrInfo_AddFixed',['../attribs_8c.html#a7ef5c674515715bc56c3d585ba3e729d',1,'attribs.c']]], + ['attrinfo_5faddloader_5',['AttrInfo_AddLoader',['../attribs_8c.html#a4e2e4bdce8a218aa36b168e61a081c21',1,'attribs.c']]], + ['attrinfo_5finit_6',['AttrInfo_Init',['../attribs_8c.html#aa0f970274110d97b21d52d89bd7d0ba5',1,'attribs.c']]] +]; diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js new file mode 100644 index 0000000..5f165ea --- /dev/null +++ b/docs/html/search/all_10.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['tex_0',['tex',['../struct_c3_d___context.html#a65d2e5b1e6265073c80fb759316343ba',1,'C3D_Context']]], + ['tex3ds_2ec_1',['tex3ds.c',['../tex3ds_8c.html',1,'']]], + ['tex3ds_5fgetnumsubtextures_2',['Tex3DS_GetNumSubTextures',['../tex3ds_8c.html#ab2a4089637e155481da431da62646042',1,'tex3ds.c']]], + ['tex3ds_5fgetsubtexture_3',['Tex3DS_GetSubTexture',['../tex3ds_8c.html#ad3e1b65a79e9a989b8e440570816561d',1,'tex3ds.c']]], + ['tex3ds_5ftexture_5fs_4',['Tex3DS_Texture_s',['../struct_tex3_d_s___texture__s.html',1,'']]], + ['tex3ds_5ftexturefree_5',['Tex3DS_TextureFree',['../tex3ds_8c.html#a644ebdcb177b99196c3799b6f6e7b1de',1,'tex3ds.c']]], + ['tex3ds_5ftextureimport_6',['Tex3DS_TextureImport',['../tex3ds_8c.html#aeb2c3487491ef866ff16f6cecde9448d',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportcallback_7',['Tex3DS_TextureImportCallback',['../tex3ds_8c.html#a76fb1ed8388513928ca6e06ada4e7552',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportfd_8',['Tex3DS_TextureImportFD',['../tex3ds_8c.html#a20dfee0fe7c2ac8b93e95065b64cb76f',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportstdio_9',['Tex3DS_TextureImportStdio',['../tex3ds_8c.html#a2840b76f4ce3a0f86e2d86b37dcb923e',1,'tex3ds.c']]], + ['tex3dsi_5fheader_10',['Tex3DSi_Header',['../tex3ds_8c.html#a99529fc03f922130a8bb9d9cd3667b77',1,'tex3ds.c']]], + ['tex3dsi_5fsubtexture_11',['Tex3DSi_SubTexture',['../struct_tex3_d_si___sub_texture.html',1,'']]], + ['texconfig_12',['texConfig',['../struct_c3_d___context.html#a3df51343ca0c1829f23fcdcfe69d9d04',1,'C3D_Context']]], + ['texenv_13',['texEnv',['../struct_c3_d___context.html#a8486fedaae5bf7f482025dae985ba2a3',1,'C3D_Context']]], + ['texenv_2ec_14',['texenv.c',['../texenv_8c.html',1,'']]], + ['texenvbuf_15',['texEnvBuf',['../struct_c3_d___context.html#a6f4d132b6ca1fc9f34950906503001cb',1,'C3D_Context']]], + ['texenvbufclr_16',['texEnvBufClr',['../struct_c3_d___context.html#afaed4c017fd633865ba04d253b27d934',1,'C3D_Context']]], + ['texshadow_17',['texShadow',['../struct_c3_d___context.html#ad90188948cd28d5680fc62a4b699d195',1,'C3D_Context']]], + ['texture_2ec_18',['texture.c',['../texture_8c.html',1,'']]], + ['top_19',['top',['../struct_tex3_d_si___sub_texture.html#a6cc2b79637333bff9742879bf7bf01d9',1,'Tex3DSi_SubTexture']]] +]; diff --git a/docs/html/search/all_11.js b/docs/html/search/all_11.js new file mode 100644 index 0000000..37b198a --- /dev/null +++ b/docs/html/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['uniforms_2ec_0',['uniforms.c',['../uniforms_8c.html',1,'']]] +]; diff --git a/docs/html/search/all_12.js b/docs/html/search/all_12.js new file mode 100644 index 0000000..87da213 --- /dev/null +++ b/docs/html/search/all_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['viewport_0',['viewport',['../struct_c3_d___context.html#ac4290cf3539004a3923f3ed3aa6f24a3',1,'C3D_Context']]] +]; diff --git a/docs/html/search/all_13.js b/docs/html/search/all_13.js new file mode 100644 index 0000000..78346b2 --- /dev/null +++ b/docs/html/search/all_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['width_0',['width',['../struct_tex3_d_s___texture__s.html#a25d12872880bcf93b513c53779f5aee0',1,'Tex3DS_Texture_s::width()'],['../struct_tex3_d_si___sub_texture.html#ac8ad50d7399df3cdfe17ce981c1e9e96',1,'Tex3DSi_SubTexture::width()']]] +]; diff --git a/docs/html/search/all_14.js b/docs/html/search/all_14.js new file mode 100644 index 0000000..b62d62f --- /dev/null +++ b/docs/html/search/all_14.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['zbuffer_0',['zBuffer',['../struct_c3_d___effect.html#a7976f4fbacae4747727aec4ba72d1902',1,'C3D_Effect']]], + ['zoffset_1',['zOffset',['../struct_c3_d___effect.html#a84db888680ec1c1cee776dcef2d76c09',1,'C3D_Effect']]], + ['zscale_2',['zScale',['../struct_c3_d___effect.html#aee2719c6d058933e124dd95bcd298dae',1,'C3D_Effect']]] +]; diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js new file mode 100644 index 0000000..8708541 --- /dev/null +++ b/docs/html/search/all_2.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['base_2ec_0',['base.c',['../base_8c.html',1,'']]], + ['blendclr_1',['blendClr',['../struct_c3_d___effect.html#a2135f19276122f785035c6914fe693e6',1,'C3D_Effect']]], + ['bottom_2',['bottom',['../struct_tex3_d_si___sub_texture.html#aa721db515076dc28b60f4f6201525a11',1,'Tex3DSi_SubTexture']]], + ['buffer_5fbase_5fpaddr_3',['BUFFER_BASE_PADDR',['../buffers_8c.html#abbe2effeef5ab2b53c5002dfd7dacfd2',1,'buffers.c']]], + ['buffers_2ec_4',['buffers.c',['../buffers_8c.html',1,'']]], + ['bufinfo_5',['bufInfo',['../struct_c3_d___context.html#a0d993d8a5035bd8f950f6e2f5bb6dad2',1,'C3D_Context']]], + ['bufinfo_5fadd_6',['BufInfo_Add',['../buffers_8c.html#ace3c32831df0d7cbe2890990a5d06749',1,'buffers.c']]], + ['bufinfo_5finit_7',['BufInfo_Init',['../buffers_8c.html#a6bd7a8fb0f9a2922c4d3f27bbe14dc4a',1,'buffers.c']]] +]; diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js new file mode 100644 index 0000000..3a657ec --- /dev/null +++ b/docs/html/search/all_3.js @@ -0,0 +1,178 @@ +var searchData= +[ + ['c3d_5falphablend_0',['C3D_AlphaBlend',['../effect_8c.html#aef14b560979a4fabc7ae5057a18c5445',1,'effect.c']]], + ['c3d_5falphatest_1',['C3D_AlphaTest',['../effect_8c.html#a555cd40790b14750276cd36f47041c2a',1,'effect.c']]], + ['c3d_5fbindprogram_2',['C3D_BindProgram',['../base_8c.html#a46a4b1c8578240f5f303e18e99d97af1',1,'base.c']]], + ['c3d_5fblendingcolor_3',['C3D_BlendingColor',['../effect_8c.html#af07e35a0f7f647f995c7f6f337d4b2eb',1,'effect.c']]], + ['c3d_5fboolunifs_4',['C3D_BoolUnifs',['../uniforms_8c.html#a24fb0ec4c46efdecc2e6995574a2710a',1,'uniforms.c']]], + ['c3d_5fboolunifsdirty_5',['C3D_BoolUnifsDirty',['../uniforms_8c.html#a807e62b94ee1ecc4e6493dc9f42535fb',1,'uniforms.c']]], + ['c3d_5fcalccolorbufsize_6',['C3D_CalcColorBufSize',['../framebuffer_8c.html#a615ec927724adc090747b66c1d6648b5',1,'framebuffer.c']]], + ['c3d_5fcalcdepthbufsize_7',['C3D_CalcDepthBufSize',['../framebuffer_8c.html#a9059233abed3188edc90e95020ac63fe',1,'framebuffer.c']]], + ['c3d_5fcolorlogicop_8',['C3D_ColorLogicOp',['../effect_8c.html#aeea658d49c9a03e5432ef797dd1bd630',1,'effect.c']]], + ['c3d_5fcontext_9',['C3D_Context',['../struct_c3_d___context.html',1,'']]], + ['c3d_5fcullface_10',['C3D_CullFace',['../effect_8c.html#a711302406d9e93d5ed71bd782c83918e',1,'effect.c']]], + ['c3d_5fdepthmap_11',['C3D_DepthMap',['../effect_8c.html#a089d29970416d0e2afd28de2d88b25d5',1,'effect.c']]], + ['c3d_5fdepthtest_12',['C3D_DepthTest',['../effect_8c.html#af38339706d598b6e5e3a88766e95a99f',1,'effect.c']]], + ['c3d_5fdirtytexenv_13',['C3D_DirtyTexEnv',['../texenv_8c.html#abc47d36029155ab4065b679bf1bbd978',1,'texenv.c']]], + ['c3d_5fdrawarrays_14',['C3D_DrawArrays',['../draw_arrays_8c.html#a3622d8b83a5912c50432f330085564c6',1,'drawArrays.c']]], + ['c3d_5fdrawelements_15',['C3D_DrawElements',['../draw_elements_8c.html#a9fa75694d9963a1800141b2452badd5c',1,'drawElements.c']]], + ['c3d_5fearlydepthtest_16',['C3D_EarlyDepthTest',['../effect_8c.html#af6d28032f679a91d505185eb8e59d019',1,'effect.c']]], + ['c3d_5feffect_17',['C3D_Effect',['../struct_c3_d___effect.html',1,'']]], + ['c3d_5ffini_18',['C3D_Fini',['../base_8c.html#af09c99c8398f086e77bbdbf618e32df6',1,'base.c']]], + ['c3d_5ffixedattribgetwriteptr_19',['C3D_FixedAttribGetWritePtr',['../base_8c.html#aa7d62486a2373a05fb5e66859589f800',1,'base.c']]], + ['c3d_5ffogcolor_20',['C3D_FogColor',['../fog_8c.html#a2e017fb15d6c0f3bf74378a40a2ba50d',1,'fog.c']]], + ['c3d_5ffoggasmode_21',['C3D_FogGasMode',['../fog_8c.html#a8dc6123d7468e86a322bc3aaa07435b1',1,'fog.c']]], + ['c3d_5ffoglutbind_22',['C3D_FogLutBind',['../fog_8c.html#a69cb58662660e29af29945c26de20895',1,'fog.c']]], + ['c3d_5ffragopmode_23',['C3D_FragOpMode',['../effect_8c.html#a72bafc7ade3093d1c90feb244fcc7e1d',1,'effect.c']]], + ['c3d_5ffragopshadow_24',['C3D_FragOpShadow',['../effect_8c.html#ac76152822ff9433cacc9c1cbc8e0c4cf',1,'effect.c']]], + ['c3d_5fframebegin_25',['C3D_FrameBegin',['../renderqueue_8c.html#a7675742b59d3b6718f68179bbe31e78b',1,'renderqueue.c']]], + ['c3d_5fframebufclear_26',['C3D_FrameBufClear',['../framebuffer_8c.html#a6f28133b23ed22710aa38f7d59203272',1,'framebuffer.c']]], + ['c3d_5fframebuftex_27',['C3D_FrameBufTex',['../framebuffer_8c.html#a20b36fa584fbcfde834d011677fea4d6',1,'framebuffer.c']]], + ['c3d_5fframebuftransfer_28',['C3D_FrameBufTransfer',['../framebuffer_8c.html#a5b11d7b5f9708b7ab42d35df5d753345',1,'framebuffer.c']]], + ['c3d_5fframecounter_29',['C3D_FrameCounter',['../renderqueue_8c.html#a5ef85bebbc2a8a98a409a4c24a05fee6',1,'renderqueue.c']]], + ['c3d_5fframedrawon_30',['C3D_FrameDrawOn',['../renderqueue_8c.html#a1cf7de15e6026508e2502dd8a938a554',1,'renderqueue.c']]], + ['c3d_5fframeend_31',['C3D_FrameEnd',['../renderqueue_8c.html#afff1197369155052b5ad89eca13fbb34',1,'renderqueue.c']]], + ['c3d_5fframeendhook_32',['C3D_FrameEndHook',['../renderqueue_8c.html#a0fbf711434a86cf52247197bdd18d03d',1,'renderqueue.c']]], + ['c3d_5fframerate_33',['C3D_FrameRate',['../renderqueue_8c.html#a9ce9a686ea3cd4f8703b8d3cb815af06',1,'renderqueue.c']]], + ['c3d_5fframesplit_34',['C3D_FrameSplit',['../renderqueue_8c.html#a30d22d0f997fa9d49f58a9e0cd51d433',1,'renderqueue.c']]], + ['c3d_5fframesync_35',['C3D_FrameSync',['../renderqueue_8c.html#a41442453dd910a4c79dec8f6a5cc6acc',1,'renderqueue.c']]], + ['c3d_5ffvunif_36',['C3D_FVUnif',['../uniforms_8c.html#a4629f104f9d87e8028b8d5ea3d0ed694',1,'uniforms.c']]], + ['c3d_5ffvunifdirty_37',['C3D_FVUnifDirty',['../uniforms_8c.html#a23928fd10014f4e6ef1e444c3c6caf07',1,'uniforms.c']]], + ['c3d_5fgasaccmax_38',['C3D_GasAccMax',['../gas_8c.html#a66e43fb45a078cda3b69bf34977a6c3f',1,'gas.c']]], + ['c3d_5fgasattn_39',['C3D_GasAttn',['../gas_8c.html#a6ae41647f4fe68ce9b85be7645508385',1,'gas.c']]], + ['c3d_5fgasbeginacc_40',['C3D_GasBeginAcc',['../gas_8c.html#a6efe9090dee9469ff9857561d5067e4c',1,'gas.c']]], + ['c3d_5fgasdeltaz_41',['C3D_GasDeltaZ',['../gas_8c.html#a4081c60804943b4eb960c56add623154',1,'gas.c']]], + ['c3d_5fgaslightdirection_42',['C3D_GasLightDirection',['../gas_8c.html#afa0b22b5c51898fe3a57166eb2c8fbf2',1,'gas.c']]], + ['c3d_5fgaslightplanar_43',['C3D_GasLightPlanar',['../gas_8c.html#a3bb70069dc9d5130060d478691044ce3',1,'gas.c']]], + ['c3d_5fgaslightview_44',['C3D_GasLightView',['../gas_8c.html#a651dcc05b26e47c345a997e73369366f',1,'gas.c']]], + ['c3d_5fgaslutbind_45',['C3D_GasLutBind',['../gas_8c.html#ae97c37523a4b07711c94388c43819f07',1,'gas.c']]], + ['c3d_5fgaslutinput_46',['C3D_GasLutInput',['../gas_8c.html#a0897bb3e7eb6f5ac4e64a52f25739e0d',1,'gas.c']]], + ['c3d_5fgetattrinfo_47',['C3D_GetAttrInfo',['../attribs_8c.html#ad0410a84631efa152a0e122c9b7deb1b',1,'attribs.c']]], + ['c3d_5fgetbufinfo_48',['C3D_GetBufInfo',['../buffers_8c.html#af67da4e259a0b0fc0e54f8e32249d817',1,'buffers.c']]], + ['c3d_5fgetcmdbufusage_49',['C3D_GetCmdBufUsage',['../base_8c.html#aedb07e1e24a9a95654bef448a8067a3b',1,'base.c']]], + ['c3d_5fgetdrawingtime_50',['C3D_GetDrawingTime',['../renderqueue_8c.html#a4d5d9a58ee65c08aac17d819e072d8d1',1,'renderqueue.c']]], + ['c3d_5fgetframebuf_51',['C3D_GetFrameBuf',['../framebuffer_8c.html#a0c4cd56f5e20277bcdbc56f844b23ea6',1,'framebuffer.c']]], + ['c3d_5fgetprocessingtime_52',['C3D_GetProcessingTime',['../renderqueue_8c.html#a42255e0c2c469fc7ef4ce52115390fa4',1,'renderqueue.c']]], + ['c3d_5fgettexenv_53',['C3D_GetTexEnv',['../texenv_8c.html#a1b2b631232bfeb820d01e8d5e71d6792',1,'texenv.c']]], + ['c3d_5fimmdrawbegin_54',['C3D_ImmDrawBegin',['../immediate_8c.html#a4cd0c7092d4dcc36e4299c409af0df95',1,'immediate.c']]], + ['c3d_5fimmdrawend_55',['C3D_ImmDrawEnd',['../immediate_8c.html#a017fa75cabcc13abb1136b78522e7cda',1,'immediate.c']]], + ['c3d_5fimmsendattrib_56',['C3D_ImmSendAttrib',['../immediate_8c.html#a772832b686a6197596c50ae4ef883bf1',1,'immediate.c']]], + ['c3d_5finit_57',['C3D_Init',['../base_8c.html#adec4fb78c37b9f9b5a23e95d0c6ed48e',1,'base.c']]], + ['c3d_5fivunif_58',['C3D_IVUnif',['../uniforms_8c.html#a9d280c31d411cf7cbad513ab162d86c7',1,'uniforms.c']]], + ['c3d_5fivunifdirty_59',['C3D_IVUnifDirty',['../uniforms_8c.html#a7d95c86cef9538ab1622d607fc4e6ee2',1,'uniforms.c']]], + ['c3d_5flightambient_60',['C3D_LightAmbient',['../light_8c.html#a14bc9b81f135e92df83541105e5a6022',1,'light.c']]], + ['c3d_5flightdiffuse_61',['C3D_LightDiffuse',['../light_8c.html#a973c826bbc2c98d22a857001a351652b',1,'light.c']]], + ['c3d_5flightdistattn_62',['C3D_LightDistAttn',['../light_8c.html#a8df68289dcb6944e567aa59dbefcf4c8',1,'light.c']]], + ['c3d_5flightdistattnenable_63',['C3D_LightDistAttnEnable',['../light_8c.html#a7edc7e97d411bba61175f977970cab98',1,'light.c']]], + ['c3d_5flightenable_64',['C3D_LightEnable',['../light_8c.html#a22464b5d85058b7129361a37d3c07032',1,'light.c']]], + ['c3d_5flightenvambient_65',['C3D_LightEnvAmbient',['../lightenv_8c.html#a40c904da1d7382b1184351d389c50819',1,'lightenv.c']]], + ['c3d_5flightenvbind_66',['C3D_LightEnvBind',['../lightenv_8c.html#a44cb318d8b5b651e26a14c5be1840735',1,'lightenv.c']]], + ['c3d_5flightenvbumpmode_67',['C3D_LightEnvBumpMode',['../lightenv_8c.html#a3faa896a0a592846e364eefeb08cec30',1,'lightenv.c']]], + ['c3d_5flightenvbumpsel_68',['C3D_LightEnvBumpSel',['../lightenv_8c.html#a32fe1de44d5e2b131f582edce96953b5',1,'lightenv.c']]], + ['c3d_5flightenvclamphighlights_69',['C3D_LightEnvClampHighlights',['../lightenv_8c.html#ae22e5854b3a4cc59529928b0d3c07d66',1,'lightenv.c']]], + ['c3d_5flightenvfresnel_70',['C3D_LightEnvFresnel',['../lightenv_8c.html#a5fbad59caab6411e54d5f594fb34368d',1,'lightenv.c']]], + ['c3d_5flightenvinit_71',['C3D_LightEnvInit',['../lightenv_8c.html#ac3677edb222d956e07724ebb1d012ae0',1,'lightenv.c']]], + ['c3d_5flightenvlut_72',['C3D_LightEnvLut',['../lightenv_8c.html#a2b328f2b54b9f0a0baa50684e7826982',1,'lightenv.c']]], + ['c3d_5flightenvmaterial_73',['C3D_LightEnvMaterial',['../lightenv_8c.html#a0a43b71cc4d3aac3aef86ebe4458bf2b',1,'lightenv.c']]], + ['c3d_5flightenvshadowmode_74',['C3D_LightEnvShadowMode',['../lightenv_8c.html#a620aaa0aecdb77ee9e1c4488acf747b4',1,'lightenv.c']]], + ['c3d_5flightenvshadowsel_75',['C3D_LightEnvShadowSel',['../lightenv_8c.html#ab581d4efd60b1458e8525f90e02d3592',1,'lightenv.c']]], + ['c3d_5flightgeofactor_76',['C3D_LightGeoFactor',['../light_8c.html#a8614e08e3affa1e2afcb45a31dc541fa',1,'light.c']]], + ['c3d_5flightinit_77',['C3D_LightInit',['../light_8c.html#ab8ab92b7fbfb27125ed98fffcf44f016',1,'light.c']]], + ['c3d_5flightposition_78',['C3D_LightPosition',['../light_8c.html#a6592df5c2f8f93092533f2af802a083c',1,'light.c']]], + ['c3d_5flightshadowenable_79',['C3D_LightShadowEnable',['../light_8c.html#a44ea377d23ca980e136b913fda50696e',1,'light.c']]], + ['c3d_5flightspecular0_80',['C3D_LightSpecular0',['../light_8c.html#a12b8b1d7f29b72215b648ae72b4f2bad',1,'light.c']]], + ['c3d_5flightspecular1_81',['C3D_LightSpecular1',['../light_8c.html#a489b566167b28a1d64fd82ec457bacdc',1,'light.c']]], + ['c3d_5flightspotdir_82',['C3D_LightSpotDir',['../light_8c.html#a9b177218b5ce2215413ec9675ed682f1',1,'light.c']]], + ['c3d_5flightspotenable_83',['C3D_LightSpotEnable',['../light_8c.html#a817887a9074a3c168cb5e8c8b010cc72',1,'light.c']]], + ['c3d_5flightspotlut_84',['C3D_LightSpotLut',['../light_8c.html#a8dbd12f98685b3dbfdab1e564519f2c0',1,'light.c']]], + ['c3d_5flighttwosidediffuse_85',['C3D_LightTwoSideDiffuse',['../light_8c.html#a7484b348db434dde3a2f3fb4921195ef',1,'light.c']]], + ['c3d_5fproctexbind_86',['C3D_ProcTexBind',['../proctex_8c.html#ab8829dfaf5b3218c25d34fb6a346f923',1,'proctex.c']]], + ['c3d_5fproctexcolorlutbind_87',['C3D_ProcTexColorLutBind',['../proctex_8c.html#a5778f964dda8176a626295c481475740',1,'proctex.c']]], + ['c3d_5fproctexinit_88',['C3D_ProcTexInit',['../proctex_8c.html#a345b54954ff53d69da26e67004f27566',1,'proctex.c']]], + ['c3d_5fproctexlodbias_89',['C3D_ProcTexLodBias',['../proctex_8c.html#ab7b57156fec968f6fa9b3c23d8f35021',1,'proctex.c']]], + ['c3d_5fproctexlutbind_90',['C3D_ProcTexLutBind',['../proctex_8c.html#a5955241da90248b5b970fccdad7e35fc',1,'proctex.c']]], + ['c3d_5fproctexnoisecoefs_91',['C3D_ProcTexNoiseCoefs',['../proctex_8c.html#ae07d23679dbadf4b0d8beaf6502e22eb',1,'proctex.c']]], + ['c3d_5frendertargetcreate_92',['C3D_RenderTargetCreate',['../renderqueue_8c.html#a716ffff33be46fe13a0b66b13de4e5f8',1,'renderqueue.c']]], + ['c3d_5frendertargetcreatefromtex_93',['C3D_RenderTargetCreateFromTex',['../renderqueue_8c.html#a31e0a8da75cf659a9ff59f8e51a42f34',1,'renderqueue.c']]], + ['c3d_5frendertargetdelete_94',['C3D_RenderTargetDelete',['../renderqueue_8c.html#afa76b60e45b1a19fa44136a880c311ef',1,'renderqueue.c']]], + ['c3d_5frendertargetsetoutput_95',['C3D_RenderTargetSetOutput',['../renderqueue_8c.html#aa44d9c7acd33a35026292cb0481b4ebf',1,'renderqueue.c']]], + ['c3d_5fsetattrinfo_96',['C3D_SetAttrInfo',['../attribs_8c.html#a6b5dbb56e3874447d62ca53182cf7795',1,'attribs.c']]], + ['c3d_5fsetbufinfo_97',['C3D_SetBufInfo',['../buffers_8c.html#a171a9cd987caaa33b5556e60b1a716e6',1,'buffers.c']]], + ['c3d_5fsetframebuf_98',['C3D_SetFrameBuf',['../framebuffer_8c.html#aa44f954d22329dc45084b3c71593fd30',1,'framebuffer.c']]], + ['c3d_5fsetscissor_99',['C3D_SetScissor',['../base_8c.html#ad1dc1878d090a2a8946e40265b56fecc',1,'base.c']]], + ['c3d_5fsettexenv_100',['C3D_SetTexEnv',['../texenv_8c.html#a3a2ba49764ebf3e4467d554fe40769e1',1,'texenv.c']]], + ['c3d_5fsetviewport_101',['C3D_SetViewport',['../base_8c.html#af0c625289847e014e5045cd61218a559',1,'base.c']]], + ['c3d_5fstencilop_102',['C3D_StencilOp',['../effect_8c.html#ad8a3f3ce3342c2fc2cbee737d5eeaf5d',1,'effect.c']]], + ['c3d_5fstenciltest_103',['C3D_StencilTest',['../effect_8c.html#a97039180afd2adbc0659fb37790008cb',1,'effect.c']]], + ['c3d_5fsyncdisplaytransfer_104',['C3D_SyncDisplayTransfer',['../renderqueue_8c.html#ae463bfd7d3676c3bcc56869f2e17ecf1',1,'renderqueue.c']]], + ['c3d_5fsyncmemoryfill_105',['C3D_SyncMemoryFill',['../renderqueue_8c.html#a87d66e53af7a8267f4be0e7283c4ce9c',1,'renderqueue.c']]], + ['c3d_5fsynctexturecopy_106',['C3D_SyncTextureCopy',['../renderqueue_8c.html#a40706d596256234e2655707ebdcacb32',1,'renderqueue.c']]], + ['c3d_5ftexbind_107',['C3D_TexBind',['../texture_8c.html#a360d2c5598e94a10dbd1667b02676105',1,'texture.c']]], + ['c3d_5ftexdelete_108',['C3D_TexDelete',['../texture_8c.html#accf86ec4d1ab6318cb64dc596cb9961e',1,'texture.c']]], + ['c3d_5ftexenvbufcolor_109',['C3D_TexEnvBufColor',['../texenv_8c.html#a81588f3622353d3da05dd2ff96e43020',1,'texenv.c']]], + ['c3d_5ftexenvbufupdate_110',['C3D_TexEnvBufUpdate',['../texenv_8c.html#afd650b68579ca331052abb1ee60f8013',1,'texenv.c']]], + ['c3d_5ftexflush_111',['C3D_TexFlush',['../texture_8c.html#a2f3af100fa9f63065b10be89b4c75a75',1,'texture.c']]], + ['c3d_5ftexgeneratemipmap_112',['C3D_TexGenerateMipmap',['../texture_8c.html#abc333445dfee8a3418b51249cee58b66',1,'texture.c']]], + ['c3d_5ftexinitwithparams_113',['C3D_TexInitWithParams',['../texture_8c.html#afa0b16b43f95e7786bcf85dd9eb4c746',1,'texture.c']]], + ['c3d_5ftexloadimage_114',['C3D_TexLoadImage',['../texture_8c.html#abfc2aa9643a319accc71ebb559e68891',1,'texture.c']]], + ['c3d_5ftexshadowparams_115',['C3D_TexShadowParams',['../texture_8c.html#ac74ca64e5d72e7bf3d86c9ee61d2d962',1,'texture.c']]], + ['c3d_5funused_116',['C3D_UNUSED',['../internal_8h.html#a951496897ceef07fbde38ba6a247aaac',1,'internal.h']]], + ['c3d_5fupdateuniforms_117',['C3D_UpdateUniforms',['../uniforms_8c.html#ad274dff39f7bbc80ac20e8b4a36eee46',1,'uniforms.c']]], + ['c3di_5fattrinfobind_118',['C3Di_AttrInfoBind',['../attribs_8c.html#ac600ec36cc12c6473e0574f38ce2a6ef',1,'C3Di_AttrInfoBind(C3D_AttrInfo *info): attribs.c'],['../internal_8h.html#ac600ec36cc12c6473e0574f38ce2a6ef',1,'C3Di_AttrInfoBind(C3D_AttrInfo *info): attribs.c']]], + ['c3di_5fbufinfobind_119',['C3Di_BufInfoBind',['../buffers_8c.html#a49e592c82e10a02ca46a91745ba53182',1,'C3Di_BufInfoBind(C3D_BufInfo *info): buffers.c'],['../internal_8h.html#a49e592c82e10a02ca46a91745ba53182',1,'C3Di_BufInfoBind(C3D_BufInfo *info): buffers.c']]], + ['c3di_5fclearshaderuniforms_120',['C3Di_ClearShaderUniforms',['../internal_8h.html#ae0d0cabc17e43f2ab2368a390e283759',1,'C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type): uniforms.c'],['../uniforms_8c.html#ae0d0cabc17e43f2ab2368a390e283759',1,'C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type): uniforms.c']]], + ['c3di_5fdirtyuniforms_121',['C3Di_DirtyUniforms',['../internal_8h.html#a3122c009e7f6b5e2fb570003212fad73',1,'C3Di_DirtyUniforms(GPU_SHADER_TYPE type): uniforms.c'],['../uniforms_8c.html#a3122c009e7f6b5e2fb570003212fad73',1,'C3Di_DirtyUniforms(GPU_SHADER_TYPE type): uniforms.c']]], + ['c3di_5feffectbind_122',['C3Di_EffectBind',['../effect_8c.html#a70021f960e770a637643fcfa5e0d1c9c',1,'C3Di_EffectBind(C3D_Effect *e): effect.c'],['../internal_8h.html#a4fd792654ea1facdfa6dbda29b7f4914',1,'C3Di_EffectBind(C3D_Effect *effect): effect.c']]], + ['c3di_5fframebufbind_123',['C3Di_FrameBufBind',['../framebuffer_8c.html#abdac0a0f522dddd85db6e17f03e20121',1,'C3Di_FrameBufBind(C3D_FrameBuf *fb): framebuffer.c'],['../internal_8h.html#abdac0a0f522dddd85db6e17f03e20121',1,'C3Di_FrameBufBind(C3D_FrameBuf *fb): framebuffer.c']]], + ['c3di_5fgasupdate_124',['C3Di_GasUpdate',['../internal_8h.html#a8caed26d6204363f215976aaa7e05e6c',1,'C3Di_GasUpdate(C3D_Context *ctx): gas.c'],['../gas_8c.html#a8caed26d6204363f215976aaa7e05e6c',1,'C3Di_GasUpdate(C3D_Context *ctx): gas.c']]], + ['c3di_5flightenvdirty_125',['C3Di_LightEnvDirty',['../lightenv_8c.html#a2ce7e3f5086a67f3465a3486715e0d71',1,'lightenv.c']]], + ['c3di_5flightenvupdate_126',['C3Di_LightEnvUpdate',['../lightenv_8c.html#a50cc612d98a9fd5823ed865fd15a5713',1,'lightenv.c']]], + ['c3di_5flightmtlblend_127',['C3Di_LightMtlBlend',['../internal_8h.html#a5e20dd6f18115396537df0713e22a0b4',1,'C3Di_LightMtlBlend(C3D_Light *light): light.c'],['../light_8c.html#a5e20dd6f18115396537df0713e22a0b4',1,'C3Di_LightMtlBlend(C3D_Light *light): light.c']]], + ['c3di_5floadshaderuniforms_128',['C3Di_LoadShaderUniforms',['../uniforms_8c.html#a50e19b086244713ca897d5cb8a1a1e86',1,'C3Di_LoadShaderUniforms(shaderInstance_s *si): uniforms.c'],['../internal_8h.html#a50e19b086244713ca897d5cb8a1a1e86',1,'C3Di_LoadShaderUniforms(shaderInstance_s *si): uniforms.c']]], + ['c3di_5fproctexdirty_129',['C3Di_ProcTexDirty',['../proctex_8c.html#a858a4ba4e2f0ea53219743ad022ba883',1,'proctex.c']]], + ['c3di_5fproctexupdate_130',['C3Di_ProcTexUpdate',['../proctex_8c.html#a6f727aa06168f2d1e94d93e5538b9ac7',1,'proctex.c']]], + ['c3di_5frenderqueuedisablevblank_131',['C3Di_RenderQueueDisableVBlank',['../internal_8h.html#a73b8cdfbcd16488c7a6a54dade6ae470',1,'C3Di_RenderQueueDisableVBlank(void): renderqueue.c'],['../renderqueue_8c.html#a73b8cdfbcd16488c7a6a54dade6ae470',1,'C3Di_RenderQueueDisableVBlank(void): renderqueue.c']]], + ['c3di_5frenderqueueenablevblank_132',['C3Di_RenderQueueEnableVBlank',['../internal_8h.html#a765ddd29aa58ce4598429750d3f692a5',1,'C3Di_RenderQueueEnableVBlank(void): renderqueue.c'],['../renderqueue_8c.html#a765ddd29aa58ce4598429750d3f692a5',1,'C3Di_RenderQueueEnableVBlank(void): renderqueue.c']]], + ['c3di_5frenderqueueexit_133',['C3Di_RenderQueueExit',['../renderqueue_8c.html#aa8202fe4deb317840c5ca9516d7813f2',1,'C3Di_RenderQueueExit(void): renderqueue.c'],['../internal_8h.html#aa8202fe4deb317840c5ca9516d7813f2',1,'C3Di_RenderQueueExit(void): renderqueue.c']]], + ['c3di_5frenderqueueinit_134',['C3Di_RenderQueueInit',['../internal_8h.html#a15d6ad6f422fcb523ff7ddf6808f959c',1,'C3Di_RenderQueueInit(void): renderqueue.c'],['../renderqueue_8c.html#a15d6ad6f422fcb523ff7ddf6808f959c',1,'C3Di_RenderQueueInit(void): renderqueue.c']]], + ['c3di_5frenderqueuewaitdone_135',['C3Di_RenderQueueWaitDone',['../internal_8h.html#a7cde967201bd3128dc49b7cc7d065ff4',1,'C3Di_RenderQueueWaitDone(void): renderqueue.c'],['../renderqueue_8c.html#a7cde967201bd3128dc49b7cc7d065ff4',1,'C3Di_RenderQueueWaitDone(void): renderqueue.c']]], + ['c3di_5fsettex_136',['C3Di_SetTex',['../internal_8h.html#a9cd92f53a18da481d1ba74f4c9da7dee',1,'C3Di_SetTex(int unit, C3D_Tex *tex): texture.c'],['../texture_8c.html#a9cd92f53a18da481d1ba74f4c9da7dee',1,'C3Di_SetTex(int unit, C3D_Tex *tex): texture.c']]], + ['c3di_5fsplitframe_137',['C3Di_SplitFrame',['../base_8c.html#a139aee1e5943be7dfb22a011f6057689',1,'C3Di_SplitFrame(u32 **pBuf, u32 *pSize): base.c'],['../internal_8h.html#a139aee1e5943be7dfb22a011f6057689',1,'C3Di_SplitFrame(u32 **pBuf, u32 *pSize): base.c']]], + ['c3di_5ftexenvbind_138',['C3Di_TexEnvBind',['../texenv_8c.html#acff27a4262a8a3fb39b20f2afd4cccd5',1,'C3Di_TexEnvBind(int id, C3D_TexEnv *env): texenv.c'],['../internal_8h.html#acff27a4262a8a3fb39b20f2afd4cccd5',1,'C3Di_TexEnvBind(int id, C3D_TexEnv *env): texenv.c']]], + ['c3di_5fupdatecontext_139',['C3Di_UpdateContext',['../base_8c.html#a4cfecbe235841f7d41495a8dc6b15c32',1,'C3Di_UpdateContext(void): base.c'],['../internal_8h.html#a4cfecbe235841f7d41495a8dc6b15c32',1,'C3Di_UpdateContext(void): base.c']]], + ['c3dif_5factive_140',['C3DiF_Active',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba550917fdd0380732d3822b7b86125b5b',1,'internal.h']]], + ['c3dif_5fattrinfo_141',['C3DiF_AttrInfo',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba14a6b423ac2123849ecda6be07fe0e5a',1,'internal.h']]], + ['c3dif_5fbufinfo_142',['C3DiF_BufInfo',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacd6b3e204d1c030bb1f554fe32ef360b',1,'internal.h']]], + ['c3dif_5fdrawused_143',['C3DiF_DrawUsed',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baa82f1706d8bcb1bce7768efc27c910cd',1,'internal.h']]], + ['c3dif_5feffect_144',['C3DiF_Effect',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba41c3bdee41a5dc274fbc94cba86c759e',1,'internal.h']]], + ['c3dif_5ffoglut_145',['C3DiF_FogLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba915315f3737ad1bc187a652599d279ea',1,'internal.h']]], + ['c3dif_5fframebuf_146',['C3DiF_FrameBuf',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad1f5425c52686bfa909b5e944c3f0543',1,'internal.h']]], + ['c3dif_5fgas_147',['C3DiF_Gas',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba119e5ad9b004ff5f9ba5fd4e5f315459',1,'internal.h']]], + ['c3dif_5fgaslut_148',['C3DiF_GasLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad555487ca8479e1249d7040436c4853d',1,'internal.h']]], + ['c3dif_5fgshcode_149',['C3DiF_GshCode',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba85ea08290dfc6320a7cadd9d81157c28',1,'internal.h']]], + ['c3dif_5flightenv_150',['C3DiF_LightEnv',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baa3ad35da9c183b05faad59af8b12a59d',1,'internal.h']]], + ['c3dif_5fproctex_151',['C3DiF_ProcTex',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bace0cdbd9a0d9c58871a5cd7015b578b7',1,'internal.h']]], + ['c3dif_5fproctexcolorlut_152',['C3DiF_ProcTexColorLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba9ffeeacaa7b28ed4ae8511a1ab70e4c4',1,'internal.h']]], + ['c3dif_5fproctexlut_153',['C3DiF_ProcTexLut',['../internal_8h.html#a6f06d00aa6c07b4e6aefd1d7abd71459',1,'internal.h']]], + ['c3dif_5fproctexlutall_154',['C3DiF_ProcTexLutAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad776c32e592101c58730da2cbe16bc9c',1,'internal.h']]], + ['c3dif_5fprogram_155',['C3DiF_Program',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baddc7c542adb0d880ef2c41e75658ff8b',1,'internal.h']]], + ['c3dif_5fscissor_156',['C3DiF_Scissor',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba22ba4715ea7ab4ba3574140c670b518d',1,'internal.h']]], + ['c3dif_5ftex_157',['C3DiF_Tex',['../internal_8h.html#a387e2013baca693d8c923f75f2bc0fc9',1,'internal.h']]], + ['c3dif_5ftexall_158',['C3DiF_TexAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba15486d871c23e1aeec375129a5d5f488',1,'internal.h']]], + ['c3dif_5ftexenv_159',['C3DiF_TexEnv',['../internal_8h.html#a5c1cc19e34f2546befdd67706ed6e70a',1,'internal.h']]], + ['c3dif_5ftexenvall_160',['C3DiF_TexEnvAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baf9ff6d8f15941e74b78c9a577ca8de72',1,'internal.h']]], + ['c3dif_5ftexenvbuf_161',['C3DiF_TexEnvBuf',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba8cd84b5e5096e0a36d1814c45ab6af08',1,'internal.h']]], + ['c3dif_5ftexstatus_162',['C3DiF_TexStatus',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55babf861f17928b72f60c3b14adee71c055',1,'internal.h']]], + ['c3dif_5fviewport_163',['C3DiF_Viewport',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba44bed54f1738cafab64fc1435640eed7',1,'internal.h']]], + ['c3dif_5fvshcode_164',['C3DiF_VshCode',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba3b6b45accda62e2542d2d8d72e3bd24e',1,'internal.h']]], + ['c3dig_5faccstage_165',['C3DiG_AccStage',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac9dc684c6cf91e55c6155a9c01167cab',1,'internal.h']]], + ['c3dig_5fbeginacc_166',['C3DiG_BeginAcc',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a557b7a7b4e40b999d01d24c811fe9575',1,'internal.h']]], + ['c3dig_5frenderstage_167',['C3DiG_RenderStage',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a63a268e626cd80e1d51e85d48202d91c',1,'internal.h']]], + ['c3dig_5fsetaccmax_168',['C3DiG_SetAccMax',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ab0a87112138f6dae612a60507c2f18f0',1,'internal.h']]], + ['clrlogicop_169',['clrLogicOp',['../struct_c3_d___effect.html#ab5e81d981915561dcd4352b07aa4d593',1,'C3D_Effect']]], + ['cmdbuf_170',['cmdBuf',['../struct_c3_d___context.html#a3d911de33f8581a227f09a6e94d52f40',1,'C3D_Context']]], + ['cmdbufsize_171',['cmdBufSize',['../struct_c3_d___context.html#aef96c9da1f31a124cac231f18dd2e3eb',1,'C3D_Context']]], + ['cmdbufusage_172',['cmdBufUsage',['../struct_c3_d___context.html#ad56de99a7837b0af3bb85f270f99f443',1,'C3D_Context']]], + ['count_173',['count',['../uniforms_8c.html#ad43c3812e6d13e0518d9f8b8f463ffcf',1,'uniforms.c']]], + ['cullmode_174',['cullMode',['../struct_c3_d___effect.html#a361f124a155a6bf6971467daa7a7d8b2',1,'C3D_Effect']]] +]; diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js new file mode 100644 index 0000000..0b0cd87 --- /dev/null +++ b/docs/html/search/all_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['data_0',['data',['../uniforms_8c.html#a872e8b5e85fef9e42007068199581495',1,'uniforms.c']]], + ['depthtest_1',['depthTest',['../struct_c3_d___effect.html#a9a3ce17163873e2ab5e48ab1e305bae0',1,'C3D_Effect']]], + ['dirty_2',['dirty',['../uniforms_8c.html#ad25edacba00e4d0666a9959053b7cc10',1,'uniforms.c']]], + ['drawarrays_2ec_3',['drawArrays.c',['../draw_arrays_8c.html',1,'']]], + ['drawelements_2ec_4',['drawElements.c',['../draw_elements_8c.html',1,'']]] +]; diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js new file mode 100644 index 0000000..4411d48 --- /dev/null +++ b/docs/html/search/all_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['earlydepth_0',['earlyDepth',['../struct_c3_d___effect.html#a3397411003351e4a7a8b3e001a47a85a',1,'C3D_Effect']]], + ['earlydepthfunc_1',['earlyDepthFunc',['../struct_c3_d___effect.html#ab988707d63c82bcee320f8722085e13e',1,'C3D_Effect']]], + ['earlydepthref_2',['earlyDepthRef',['../struct_c3_d___effect.html#ab24639b4383eb8701020f46cd01e9644',1,'C3D_Effect']]], + ['effect_3',['effect',['../struct_c3_d___context.html#ad8f5384d0ce1785ad1fc88857abf7522',1,'C3D_Context']]], + ['effect_2ec_4',['effect.c',['../effect_8c.html',1,'']]] +]; diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js new file mode 100644 index 0000000..095fb9c --- /dev/null +++ b/docs/html/search/all_6.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['fb_0',['fb',['../struct_c3_d___context.html#afeed36b52b807cd8ac248bb47e413741',1,'C3D_Context']]], + ['fixedattribdirty_1',['fixedAttribDirty',['../struct_c3_d___context.html#a2cfe54bfacc99795619bd9da5d0a7261',1,'C3D_Context']]], + ['fixedattribeverdirty_2',['fixedAttribEverDirty',['../struct_c3_d___context.html#a60b3908ed58b4fb9cd30f224ccefed21',1,'C3D_Context']]], + ['fixedattribs_3',['fixedAttribs',['../struct_c3_d___context.html#a00e1248e912c6ef20a6d735944738666',1,'C3D_Context']]], + ['flags_4',['flags',['../struct_c3_d___context.html#a060c9eda900637b676805b72e16ad4ee',1,'C3D_Context']]], + ['fog_2ec_5',['fog.c',['../fog_8c.html',1,'']]], + ['fogclr_6',['fogClr',['../struct_c3_d___context.html#ab9dccee59972678fdd8ce310af36f0ce',1,'C3D_Context']]], + ['foglut_7',['fogLut',['../struct_c3_d___context.html#acf3487a3d99b3a98dd0127655f50ddc4',1,'C3D_Context']]], + ['foglut_5fexp_8',['FogLut_Exp',['../fog_8c.html#a66632ecd1b44cf397db7682a1590bc4b',1,'fog.c']]], + ['foglut_5ffromarray_9',['FogLut_FromArray',['../fog_8c.html#a149ecb2e595183a88702023998266493',1,'fog.c']]], + ['format_10',['format',['../struct_tex3_d_s___texture__s.html#acd8d57ca33404e227248a1bcaab75559',1,'Tex3DS_Texture_s']]], + ['fragopmode_11',['fragOpMode',['../struct_c3_d___effect.html#aa41fca9c92e899a85ae90dd678c84045',1,'C3D_Effect']]], + ['fragopshadow_12',['fragOpShadow',['../struct_c3_d___effect.html#ae30d30e5ecd3a38b0d2efc304e41e307',1,'C3D_Effect']]], + ['framebuffer_2ec_13',['framebuffer.c',['../framebuffer_8c.html',1,'']]] +]; diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js new file mode 100644 index 0000000..390eba3 --- /dev/null +++ b/docs/html/search/all_7.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['gas_2ec_0',['gas.c',['../gas_8c.html',1,'']]], + ['gasaccmax_1',['gasAccMax',['../struct_c3_d___context.html#a46796c689bfdcf581d5e30ed9059545a',1,'C3D_Context']]], + ['gasattn_2',['gasAttn',['../struct_c3_d___context.html#a28e34b82078c21c367f8824981f42ae9',1,'C3D_Context']]], + ['gasdeltaz_3',['gasDeltaZ',['../struct_c3_d___context.html#a7876b4666dad54e4215c6c73418f9daf',1,'C3D_Context']]], + ['gasflags_4',['gasFlags',['../struct_c3_d___context.html#a567c93db75ea706effb0201c8470125f',1,'C3D_Context']]], + ['gaslightxy_5',['gasLightXY',['../struct_c3_d___context.html#a274a578416df4d3e6e77430f743caa46',1,'C3D_Context']]], + ['gaslightz_6',['gasLightZ',['../struct_c3_d___context.html#ae58bef7a5d748332eb36da8fbe610b9b',1,'C3D_Context']]], + ['gaslightzcolor_7',['gasLightZColor',['../struct_c3_d___context.html#a1586a4301cb16fc245ca32c047e44780',1,'C3D_Context']]], + ['gaslut_8',['gasLut',['../struct_c3_d___context.html#a84d1ef86b62d47cb6571b6a6329e1e09',1,'C3D_Context']]], + ['gaslut_5ffromarray_9',['GasLut_FromArray',['../gas_8c.html#aa4dce96b8bebc6f9c3894cb9a17cbe16',1,'gas.c']]], + ['gxqueue_10',['gxQueue',['../struct_c3_d___context.html#a680c04725ccc6dce38dc38b018e0c148',1,'C3D_Context']]] +]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js new file mode 100644 index 0000000..2d72cd1 --- /dev/null +++ b/docs/html/search/all_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['height_0',['height',['../struct_tex3_d_s___texture__s.html#a3a106d6ccec889e76194e4bb20018bed',1,'Tex3DS_Texture_s::height()'],['../struct_tex3_d_si___sub_texture.html#ae6806953d4aa73b90b612520434d2c4c',1,'Tex3DSi_SubTexture::height()']]] +]; diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js new file mode 100644 index 0000000..24d8044 --- /dev/null +++ b/docs/html/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['immediate_2ec_0',['immediate.c',['../immediate_8c.html',1,'']]], + ['internal_2eh_1',['internal.h',['../internal_8h.html',1,'']]] +]; diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js new file mode 100644 index 0000000..8f9a9e5 --- /dev/null +++ b/docs/html/search/all_a.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['left_0',['left',['../struct_tex3_d_si___sub_texture.html#a53eced25476f356efaf7beb98b98e5aa',1,'Tex3DSi_SubTexture']]], + ['light_2ec_1',['light.c',['../light_8c.html',1,'']]], + ['lightenv_2',['lightEnv',['../struct_c3_d___context.html#ae47862d7586b1444612d04723f82d9a5',1,'C3D_Context']]], + ['lightenv_2ec_3',['lightenv.c',['../lightenv_8c.html',1,'']]], + ['lightlut_2ec_4',['lightlut.c',['../lightlut_8c.html',1,'']]], + ['lightlut_5ffromarray_5',['LightLut_FromArray',['../lightlut_8c.html#a9b8b3517fe8b867689551801a69b011a',1,'lightlut.c']]], + ['lightlut_5ffromfunc_6',['LightLut_FromFunc',['../lightlut_8c.html#a5fc17b58965a82427775599c4ba5525a',1,'lightlut.c']]], + ['lightlutda_5fcreate_7',['LightLutDA_Create',['../lightlut_8c.html#aae86ce8989d5bdc85c62d0fc1aa85105',1,'lightlut.c']]] +]; diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js new file mode 100644 index 0000000..d0a6626 --- /dev/null +++ b/docs/html/search/all_b.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['mipmaplevels_0',['mipmapLevels',['../struct_tex3_d_s___texture__s.html#aa852bd3bcea5385942286844290874dc',1,'Tex3DS_Texture_s']]], + ['mtxstack_2ec_1',['mtxstack.c',['../mtxstack_8c.html',1,'']]], + ['mtxstack_5fbind_2',['MtxStack_Bind',['../mtxstack_8c.html#a83bb47cbc090a31bdd271b77e54d15cc',1,'mtxstack.c']]], + ['mtxstack_5finit_3',['MtxStack_Init',['../mtxstack_8c.html#a270acb036c65e035aa2f4929ad68caf2',1,'mtxstack.c']]], + ['mtxstack_5fpop_4',['MtxStack_Pop',['../mtxstack_8c.html#aa760fcf279b61fb9cd1eadb208b8b735',1,'mtxstack.c']]], + ['mtxstack_5fpush_5',['MtxStack_Push',['../mtxstack_8c.html#a1d3768971c12d482f6a6e0c3a5c1f1b8',1,'mtxstack.c']]], + ['mtxstack_5fupdate_6',['MtxStack_Update',['../mtxstack_8c.html#a058130e9530aa772bf3d1a912d4f3c13',1,'mtxstack.c']]] +]; diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js new file mode 100644 index 0000000..d2b4c94 --- /dev/null +++ b/docs/html/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['numsubtextures_0',['numSubTextures',['../struct_tex3_d_s___texture__s.html#a052a0f02995d2ea81acba9a42d0866db',1,'Tex3DS_Texture_s']]] +]; diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js new file mode 100644 index 0000000..f838c88 --- /dev/null +++ b/docs/html/search/all_d.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['proctex_0',['procTex',['../struct_c3_d___context.html#aff07353f71a27879ead633d6edc86560',1,'C3D_Context']]], + ['proctex_2ec_1',['proctex.c',['../proctex_8c.html',1,'']]], + ['proctexcolorlut_2',['procTexColorLut',['../struct_c3_d___context.html#a829f0084ad4b0de7ed62bc0465ef2dce',1,'C3D_Context']]], + ['proctexcolorlut_5fwrite_3',['ProcTexColorLut_Write',['../proctex_8c.html#a2b28950b8e00508b8d241cc57f7ea433',1,'proctex.c']]], + ['proctexlut_4',['procTexLut',['../struct_c3_d___context.html#ad2a585233d66a88b1233c368ed6b1f87',1,'C3D_Context']]], + ['proctexlut_5ffromarray_5',['ProcTexLut_FromArray',['../proctex_8c.html#a9e3d456ec182285298d8e844c852a207',1,'proctex.c']]], + ['program_6',['program',['../struct_c3_d___context.html#aa09d0c1766d0bab3a68b31f0373fa8c4',1,'C3D_Context']]] +]; diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js new file mode 100644 index 0000000..5925682 --- /dev/null +++ b/docs/html/search/all_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['renderqueue_2ec_0',['renderqueue.c',['../renderqueue_8c.html',1,'']]], + ['right_1',['right',['../struct_tex3_d_si___sub_texture.html#a46d27edf058faf56779df4e3e9cdee4e',1,'Tex3DSi_SubTexture']]] +]; diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js new file mode 100644 index 0000000..0e8e2d0 --- /dev/null +++ b/docs/html/search/all_f.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['scissor_0',['scissor',['../struct_c3_d___context.html#a76d6b562e06dcacc7a063ad504dbdb03',1,'C3D_Context']]], + ['stencilmode_1',['stencilMode',['../struct_c3_d___effect.html#a08957dc606bdc427a03110fc742f7e03',1,'C3D_Effect']]], + ['stencilop_2',['stencilOp',['../struct_c3_d___effect.html#a4f827ebca96ef5fb306f8be9895edf42',1,'C3D_Effect']]], + ['subtextures_3',['subTextures',['../struct_tex3_d_s___texture__s.html#affe229aba59bed71dbd44ff3a8dbbd0d',1,'Tex3DS_Texture_s']]] +]; diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js new file mode 100644 index 0000000..cdfda48 --- /dev/null +++ b/docs/html/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['c3d_5fcontext_0',['C3D_Context',['../struct_c3_d___context.html',1,'']]], + ['c3d_5feffect_1',['C3D_Effect',['../struct_c3_d___effect.html',1,'']]] +]; diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js new file mode 100644 index 0000000..6f762bb --- /dev/null +++ b/docs/html/search/classes_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['tex3ds_5ftexture_5fs_0',['Tex3DS_Texture_s',['../struct_tex3_d_s___texture__s.html',1,'']]], + ['tex3dsi_5fsubtexture_1',['Tex3DSi_SubTexture',['../struct_tex3_d_si___sub_texture.html',1,'']]] +]; diff --git a/docs/html/search/close.svg b/docs/html/search/close.svg new file mode 100644 index 0000000..a933eea --- /dev/null +++ b/docs/html/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/docs/html/search/defines_0.js b/docs/html/search/defines_0.js new file mode 100644 index 0000000..f7819bd --- /dev/null +++ b/docs/html/search/defines_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['buffer_5fbase_5fpaddr_0',['BUFFER_BASE_PADDR',['../buffers_8c.html#abbe2effeef5ab2b53c5002dfd7dacfd2',1,'buffers.c']]] +]; diff --git a/docs/html/search/defines_1.js b/docs/html/search/defines_1.js new file mode 100644 index 0000000..f776660 --- /dev/null +++ b/docs/html/search/defines_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['c3d_5funused_0',['C3D_UNUSED',['../internal_8h.html#a951496897ceef07fbde38ba6a247aaac',1,'internal.h']]], + ['c3dif_5fproctexlut_1',['C3DiF_ProcTexLut',['../internal_8h.html#a6f06d00aa6c07b4e6aefd1d7abd71459',1,'internal.h']]], + ['c3dif_5ftex_2',['C3DiF_Tex',['../internal_8h.html#a387e2013baca693d8c923f75f2bc0fc9',1,'internal.h']]], + ['c3dif_5ftexenv_3',['C3DiF_TexEnv',['../internal_8h.html#a5c1cc19e34f2546befdd67706ed6e70a',1,'internal.h']]] +]; diff --git a/docs/html/search/enumvalues_0.js b/docs/html/search/enumvalues_0.js new file mode 100644 index 0000000..c0a77e2 --- /dev/null +++ b/docs/html/search/enumvalues_0.js @@ -0,0 +1,29 @@ +var searchData= +[ + ['c3dif_5factive_0',['C3DiF_Active',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba550917fdd0380732d3822b7b86125b5b',1,'internal.h']]], + ['c3dif_5fattrinfo_1',['C3DiF_AttrInfo',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba14a6b423ac2123849ecda6be07fe0e5a',1,'internal.h']]], + ['c3dif_5fbufinfo_2',['C3DiF_BufInfo',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacd6b3e204d1c030bb1f554fe32ef360b',1,'internal.h']]], + ['c3dif_5fdrawused_3',['C3DiF_DrawUsed',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baa82f1706d8bcb1bce7768efc27c910cd',1,'internal.h']]], + ['c3dif_5feffect_4',['C3DiF_Effect',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba41c3bdee41a5dc274fbc94cba86c759e',1,'internal.h']]], + ['c3dif_5ffoglut_5',['C3DiF_FogLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba915315f3737ad1bc187a652599d279ea',1,'internal.h']]], + ['c3dif_5fframebuf_6',['C3DiF_FrameBuf',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad1f5425c52686bfa909b5e944c3f0543',1,'internal.h']]], + ['c3dif_5fgas_7',['C3DiF_Gas',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba119e5ad9b004ff5f9ba5fd4e5f315459',1,'internal.h']]], + ['c3dif_5fgaslut_8',['C3DiF_GasLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad555487ca8479e1249d7040436c4853d',1,'internal.h']]], + ['c3dif_5fgshcode_9',['C3DiF_GshCode',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba85ea08290dfc6320a7cadd9d81157c28',1,'internal.h']]], + ['c3dif_5flightenv_10',['C3DiF_LightEnv',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baa3ad35da9c183b05faad59af8b12a59d',1,'internal.h']]], + ['c3dif_5fproctex_11',['C3DiF_ProcTex',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bace0cdbd9a0d9c58871a5cd7015b578b7',1,'internal.h']]], + ['c3dif_5fproctexcolorlut_12',['C3DiF_ProcTexColorLut',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba9ffeeacaa7b28ed4ae8511a1ab70e4c4',1,'internal.h']]], + ['c3dif_5fproctexlutall_13',['C3DiF_ProcTexLutAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55bad776c32e592101c58730da2cbe16bc9c',1,'internal.h']]], + ['c3dif_5fprogram_14',['C3DiF_Program',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baddc7c542adb0d880ef2c41e75658ff8b',1,'internal.h']]], + ['c3dif_5fscissor_15',['C3DiF_Scissor',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba22ba4715ea7ab4ba3574140c670b518d',1,'internal.h']]], + ['c3dif_5ftexall_16',['C3DiF_TexAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba15486d871c23e1aeec375129a5d5f488',1,'internal.h']]], + ['c3dif_5ftexenvall_17',['C3DiF_TexEnvAll',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55baf9ff6d8f15941e74b78c9a577ca8de72',1,'internal.h']]], + ['c3dif_5ftexenvbuf_18',['C3DiF_TexEnvBuf',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba8cd84b5e5096e0a36d1814c45ab6af08',1,'internal.h']]], + ['c3dif_5ftexstatus_19',['C3DiF_TexStatus',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55babf861f17928b72f60c3b14adee71c055',1,'internal.h']]], + ['c3dif_5fviewport_20',['C3DiF_Viewport',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba44bed54f1738cafab64fc1435640eed7',1,'internal.h']]], + ['c3dif_5fvshcode_21',['C3DiF_VshCode',['../internal_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba3b6b45accda62e2542d2d8d72e3bd24e',1,'internal.h']]], + ['c3dig_5faccstage_22',['C3DiG_AccStage',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac9dc684c6cf91e55c6155a9c01167cab',1,'internal.h']]], + ['c3dig_5fbeginacc_23',['C3DiG_BeginAcc',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a557b7a7b4e40b999d01d24c811fe9575',1,'internal.h']]], + ['c3dig_5frenderstage_24',['C3DiG_RenderStage',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a63a268e626cd80e1d51e85d48202d91c',1,'internal.h']]], + ['c3dig_5fsetaccmax_25',['C3DiG_SetAccMax',['../internal_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ab0a87112138f6dae612a60507c2f18f0',1,'internal.h']]] +]; diff --git a/docs/html/search/files_0.js b/docs/html/search/files_0.js new file mode 100644 index 0000000..eb8608f --- /dev/null +++ b/docs/html/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['attribs_2ec_0',['attribs.c',['../attribs_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_1.js b/docs/html/search/files_1.js new file mode 100644 index 0000000..4cf1a1c --- /dev/null +++ b/docs/html/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['base_2ec_0',['base.c',['../base_8c.html',1,'']]], + ['buffers_2ec_1',['buffers.c',['../buffers_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_2.js b/docs/html/search/files_2.js new file mode 100644 index 0000000..edba4a3 --- /dev/null +++ b/docs/html/search/files_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['drawarrays_2ec_0',['drawArrays.c',['../draw_arrays_8c.html',1,'']]], + ['drawelements_2ec_1',['drawElements.c',['../draw_elements_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_3.js b/docs/html/search/files_3.js new file mode 100644 index 0000000..9ce1dcf --- /dev/null +++ b/docs/html/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['effect_2ec_0',['effect.c',['../effect_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_4.js b/docs/html/search/files_4.js new file mode 100644 index 0000000..665eb8a --- /dev/null +++ b/docs/html/search/files_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fog_2ec_0',['fog.c',['../fog_8c.html',1,'']]], + ['framebuffer_2ec_1',['framebuffer.c',['../framebuffer_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_5.js b/docs/html/search/files_5.js new file mode 100644 index 0000000..23e88c8 --- /dev/null +++ b/docs/html/search/files_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gas_2ec_0',['gas.c',['../gas_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_6.js b/docs/html/search/files_6.js new file mode 100644 index 0000000..24d8044 --- /dev/null +++ b/docs/html/search/files_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['immediate_2ec_0',['immediate.c',['../immediate_8c.html',1,'']]], + ['internal_2eh_1',['internal.h',['../internal_8h.html',1,'']]] +]; diff --git a/docs/html/search/files_7.js b/docs/html/search/files_7.js new file mode 100644 index 0000000..ae28e8b --- /dev/null +++ b/docs/html/search/files_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['light_2ec_0',['light.c',['../light_8c.html',1,'']]], + ['lightenv_2ec_1',['lightenv.c',['../lightenv_8c.html',1,'']]], + ['lightlut_2ec_2',['lightlut.c',['../lightlut_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_8.js b/docs/html/search/files_8.js new file mode 100644 index 0000000..5346340 --- /dev/null +++ b/docs/html/search/files_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mtxstack_2ec_0',['mtxstack.c',['../mtxstack_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_9.js b/docs/html/search/files_9.js new file mode 100644 index 0000000..2189896 --- /dev/null +++ b/docs/html/search/files_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['proctex_2ec_0',['proctex.c',['../proctex_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_a.js b/docs/html/search/files_a.js new file mode 100644 index 0000000..e56a5a9 --- /dev/null +++ b/docs/html/search/files_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['renderqueue_2ec_0',['renderqueue.c',['../renderqueue_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_b.js b/docs/html/search/files_b.js new file mode 100644 index 0000000..3f55df7 --- /dev/null +++ b/docs/html/search/files_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['tex3ds_2ec_0',['tex3ds.c',['../tex3ds_8c.html',1,'']]], + ['texenv_2ec_1',['texenv.c',['../texenv_8c.html',1,'']]], + ['texture_2ec_2',['texture.c',['../texture_8c.html',1,'']]] +]; diff --git a/docs/html/search/files_c.js b/docs/html/search/files_c.js new file mode 100644 index 0000000..37b198a --- /dev/null +++ b/docs/html/search/files_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['uniforms_2ec_0',['uniforms.c',['../uniforms_8c.html',1,'']]] +]; diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js new file mode 100644 index 0000000..ee4a550 --- /dev/null +++ b/docs/html/search/functions_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5f_5fattribute_5f_5f_0',['__attribute__',['../base_8c.html#af9aace1b44b73111e15aa39f06f43456',1,'__attribute__((weak)): base.c'],['../tex3ds_8c.html#ab898071398b359603a35c202e9c65f3b',1,'__attribute__((packed)): tex3ds.c']]] +]; diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js new file mode 100644 index 0000000..46bfb48 --- /dev/null +++ b/docs/html/search/functions_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['attrinfo_5faddfixed_0',['AttrInfo_AddFixed',['../attribs_8c.html#a7ef5c674515715bc56c3d585ba3e729d',1,'attribs.c']]], + ['attrinfo_5faddloader_1',['AttrInfo_AddLoader',['../attribs_8c.html#a4e2e4bdce8a218aa36b168e61a081c21',1,'attribs.c']]], + ['attrinfo_5finit_2',['AttrInfo_Init',['../attribs_8c.html#aa0f970274110d97b21d52d89bd7d0ba5',1,'attribs.c']]] +]; diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js new file mode 100644 index 0000000..4af092f --- /dev/null +++ b/docs/html/search/functions_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['bufinfo_5fadd_0',['BufInfo_Add',['../buffers_8c.html#ace3c32831df0d7cbe2890990a5d06749',1,'buffers.c']]], + ['bufinfo_5finit_1',['BufInfo_Init',['../buffers_8c.html#a6bd7a8fb0f9a2922c4d3f27bbe14dc4a',1,'buffers.c']]] +]; diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js new file mode 100644 index 0000000..5bf9f93 --- /dev/null +++ b/docs/html/search/functions_3.js @@ -0,0 +1,134 @@ +var searchData= +[ + ['c3d_5falphablend_0',['C3D_AlphaBlend',['../effect_8c.html#aef14b560979a4fabc7ae5057a18c5445',1,'effect.c']]], + ['c3d_5falphatest_1',['C3D_AlphaTest',['../effect_8c.html#a555cd40790b14750276cd36f47041c2a',1,'effect.c']]], + ['c3d_5fbindprogram_2',['C3D_BindProgram',['../base_8c.html#a46a4b1c8578240f5f303e18e99d97af1',1,'base.c']]], + ['c3d_5fblendingcolor_3',['C3D_BlendingColor',['../effect_8c.html#af07e35a0f7f647f995c7f6f337d4b2eb',1,'effect.c']]], + ['c3d_5fcalccolorbufsize_4',['C3D_CalcColorBufSize',['../framebuffer_8c.html#a615ec927724adc090747b66c1d6648b5',1,'framebuffer.c']]], + ['c3d_5fcalcdepthbufsize_5',['C3D_CalcDepthBufSize',['../framebuffer_8c.html#a9059233abed3188edc90e95020ac63fe',1,'framebuffer.c']]], + ['c3d_5fcolorlogicop_6',['C3D_ColorLogicOp',['../effect_8c.html#aeea658d49c9a03e5432ef797dd1bd630',1,'effect.c']]], + ['c3d_5fcullface_7',['C3D_CullFace',['../effect_8c.html#a711302406d9e93d5ed71bd782c83918e',1,'effect.c']]], + ['c3d_5fdepthmap_8',['C3D_DepthMap',['../effect_8c.html#a089d29970416d0e2afd28de2d88b25d5',1,'effect.c']]], + ['c3d_5fdepthtest_9',['C3D_DepthTest',['../effect_8c.html#af38339706d598b6e5e3a88766e95a99f',1,'effect.c']]], + ['c3d_5fdirtytexenv_10',['C3D_DirtyTexEnv',['../texenv_8c.html#abc47d36029155ab4065b679bf1bbd978',1,'texenv.c']]], + ['c3d_5fdrawarrays_11',['C3D_DrawArrays',['../draw_arrays_8c.html#a3622d8b83a5912c50432f330085564c6',1,'drawArrays.c']]], + ['c3d_5fdrawelements_12',['C3D_DrawElements',['../draw_elements_8c.html#a9fa75694d9963a1800141b2452badd5c',1,'drawElements.c']]], + ['c3d_5fearlydepthtest_13',['C3D_EarlyDepthTest',['../effect_8c.html#af6d28032f679a91d505185eb8e59d019',1,'effect.c']]], + ['c3d_5ffini_14',['C3D_Fini',['../base_8c.html#af09c99c8398f086e77bbdbf618e32df6',1,'base.c']]], + ['c3d_5ffixedattribgetwriteptr_15',['C3D_FixedAttribGetWritePtr',['../base_8c.html#aa7d62486a2373a05fb5e66859589f800',1,'base.c']]], + ['c3d_5ffogcolor_16',['C3D_FogColor',['../fog_8c.html#a2e017fb15d6c0f3bf74378a40a2ba50d',1,'fog.c']]], + ['c3d_5ffoggasmode_17',['C3D_FogGasMode',['../fog_8c.html#a8dc6123d7468e86a322bc3aaa07435b1',1,'fog.c']]], + ['c3d_5ffoglutbind_18',['C3D_FogLutBind',['../fog_8c.html#a69cb58662660e29af29945c26de20895',1,'fog.c']]], + ['c3d_5ffragopmode_19',['C3D_FragOpMode',['../effect_8c.html#a72bafc7ade3093d1c90feb244fcc7e1d',1,'effect.c']]], + ['c3d_5ffragopshadow_20',['C3D_FragOpShadow',['../effect_8c.html#ac76152822ff9433cacc9c1cbc8e0c4cf',1,'effect.c']]], + ['c3d_5fframebegin_21',['C3D_FrameBegin',['../renderqueue_8c.html#a7675742b59d3b6718f68179bbe31e78b',1,'renderqueue.c']]], + ['c3d_5fframebufclear_22',['C3D_FrameBufClear',['../framebuffer_8c.html#a6f28133b23ed22710aa38f7d59203272',1,'framebuffer.c']]], + ['c3d_5fframebuftex_23',['C3D_FrameBufTex',['../framebuffer_8c.html#a20b36fa584fbcfde834d011677fea4d6',1,'framebuffer.c']]], + ['c3d_5fframebuftransfer_24',['C3D_FrameBufTransfer',['../framebuffer_8c.html#a5b11d7b5f9708b7ab42d35df5d753345',1,'framebuffer.c']]], + ['c3d_5fframecounter_25',['C3D_FrameCounter',['../renderqueue_8c.html#a5ef85bebbc2a8a98a409a4c24a05fee6',1,'renderqueue.c']]], + ['c3d_5fframedrawon_26',['C3D_FrameDrawOn',['../renderqueue_8c.html#a1cf7de15e6026508e2502dd8a938a554',1,'renderqueue.c']]], + ['c3d_5fframeend_27',['C3D_FrameEnd',['../renderqueue_8c.html#afff1197369155052b5ad89eca13fbb34',1,'renderqueue.c']]], + ['c3d_5fframeendhook_28',['C3D_FrameEndHook',['../renderqueue_8c.html#a0fbf711434a86cf52247197bdd18d03d',1,'renderqueue.c']]], + ['c3d_5fframerate_29',['C3D_FrameRate',['../renderqueue_8c.html#a9ce9a686ea3cd4f8703b8d3cb815af06',1,'renderqueue.c']]], + ['c3d_5fframesplit_30',['C3D_FrameSplit',['../renderqueue_8c.html#a30d22d0f997fa9d49f58a9e0cd51d433',1,'renderqueue.c']]], + ['c3d_5fframesync_31',['C3D_FrameSync',['../renderqueue_8c.html#a41442453dd910a4c79dec8f6a5cc6acc',1,'renderqueue.c']]], + ['c3d_5fgasaccmax_32',['C3D_GasAccMax',['../gas_8c.html#a66e43fb45a078cda3b69bf34977a6c3f',1,'gas.c']]], + ['c3d_5fgasattn_33',['C3D_GasAttn',['../gas_8c.html#a6ae41647f4fe68ce9b85be7645508385',1,'gas.c']]], + ['c3d_5fgasbeginacc_34',['C3D_GasBeginAcc',['../gas_8c.html#a6efe9090dee9469ff9857561d5067e4c',1,'gas.c']]], + ['c3d_5fgasdeltaz_35',['C3D_GasDeltaZ',['../gas_8c.html#a4081c60804943b4eb960c56add623154',1,'gas.c']]], + ['c3d_5fgaslightdirection_36',['C3D_GasLightDirection',['../gas_8c.html#afa0b22b5c51898fe3a57166eb2c8fbf2',1,'gas.c']]], + ['c3d_5fgaslightplanar_37',['C3D_GasLightPlanar',['../gas_8c.html#a3bb70069dc9d5130060d478691044ce3',1,'gas.c']]], + ['c3d_5fgaslightview_38',['C3D_GasLightView',['../gas_8c.html#a651dcc05b26e47c345a997e73369366f',1,'gas.c']]], + ['c3d_5fgaslutbind_39',['C3D_GasLutBind',['../gas_8c.html#ae97c37523a4b07711c94388c43819f07',1,'gas.c']]], + ['c3d_5fgaslutinput_40',['C3D_GasLutInput',['../gas_8c.html#a0897bb3e7eb6f5ac4e64a52f25739e0d',1,'gas.c']]], + ['c3d_5fgetattrinfo_41',['C3D_GetAttrInfo',['../attribs_8c.html#ad0410a84631efa152a0e122c9b7deb1b',1,'attribs.c']]], + ['c3d_5fgetbufinfo_42',['C3D_GetBufInfo',['../buffers_8c.html#af67da4e259a0b0fc0e54f8e32249d817',1,'buffers.c']]], + ['c3d_5fgetcmdbufusage_43',['C3D_GetCmdBufUsage',['../base_8c.html#aedb07e1e24a9a95654bef448a8067a3b',1,'base.c']]], + ['c3d_5fgetdrawingtime_44',['C3D_GetDrawingTime',['../renderqueue_8c.html#a4d5d9a58ee65c08aac17d819e072d8d1',1,'renderqueue.c']]], + ['c3d_5fgetframebuf_45',['C3D_GetFrameBuf',['../framebuffer_8c.html#a0c4cd56f5e20277bcdbc56f844b23ea6',1,'framebuffer.c']]], + ['c3d_5fgetprocessingtime_46',['C3D_GetProcessingTime',['../renderqueue_8c.html#a42255e0c2c469fc7ef4ce52115390fa4',1,'renderqueue.c']]], + ['c3d_5fgettexenv_47',['C3D_GetTexEnv',['../texenv_8c.html#a1b2b631232bfeb820d01e8d5e71d6792',1,'texenv.c']]], + ['c3d_5fimmdrawbegin_48',['C3D_ImmDrawBegin',['../immediate_8c.html#a4cd0c7092d4dcc36e4299c409af0df95',1,'immediate.c']]], + ['c3d_5fimmdrawend_49',['C3D_ImmDrawEnd',['../immediate_8c.html#a017fa75cabcc13abb1136b78522e7cda',1,'immediate.c']]], + ['c3d_5fimmsendattrib_50',['C3D_ImmSendAttrib',['../immediate_8c.html#a772832b686a6197596c50ae4ef883bf1',1,'immediate.c']]], + ['c3d_5finit_51',['C3D_Init',['../base_8c.html#adec4fb78c37b9f9b5a23e95d0c6ed48e',1,'base.c']]], + ['c3d_5flightambient_52',['C3D_LightAmbient',['../light_8c.html#a14bc9b81f135e92df83541105e5a6022',1,'light.c']]], + ['c3d_5flightdiffuse_53',['C3D_LightDiffuse',['../light_8c.html#a973c826bbc2c98d22a857001a351652b',1,'light.c']]], + ['c3d_5flightdistattn_54',['C3D_LightDistAttn',['../light_8c.html#a8df68289dcb6944e567aa59dbefcf4c8',1,'light.c']]], + ['c3d_5flightdistattnenable_55',['C3D_LightDistAttnEnable',['../light_8c.html#a7edc7e97d411bba61175f977970cab98',1,'light.c']]], + ['c3d_5flightenable_56',['C3D_LightEnable',['../light_8c.html#a22464b5d85058b7129361a37d3c07032',1,'light.c']]], + ['c3d_5flightenvambient_57',['C3D_LightEnvAmbient',['../lightenv_8c.html#a40c904da1d7382b1184351d389c50819',1,'lightenv.c']]], + ['c3d_5flightenvbind_58',['C3D_LightEnvBind',['../lightenv_8c.html#a44cb318d8b5b651e26a14c5be1840735',1,'lightenv.c']]], + ['c3d_5flightenvbumpmode_59',['C3D_LightEnvBumpMode',['../lightenv_8c.html#a3faa896a0a592846e364eefeb08cec30',1,'lightenv.c']]], + ['c3d_5flightenvbumpsel_60',['C3D_LightEnvBumpSel',['../lightenv_8c.html#a32fe1de44d5e2b131f582edce96953b5',1,'lightenv.c']]], + ['c3d_5flightenvclamphighlights_61',['C3D_LightEnvClampHighlights',['../lightenv_8c.html#ae22e5854b3a4cc59529928b0d3c07d66',1,'lightenv.c']]], + ['c3d_5flightenvfresnel_62',['C3D_LightEnvFresnel',['../lightenv_8c.html#a5fbad59caab6411e54d5f594fb34368d',1,'lightenv.c']]], + ['c3d_5flightenvinit_63',['C3D_LightEnvInit',['../lightenv_8c.html#ac3677edb222d956e07724ebb1d012ae0',1,'lightenv.c']]], + ['c3d_5flightenvlut_64',['C3D_LightEnvLut',['../lightenv_8c.html#a2b328f2b54b9f0a0baa50684e7826982',1,'lightenv.c']]], + ['c3d_5flightenvmaterial_65',['C3D_LightEnvMaterial',['../lightenv_8c.html#a0a43b71cc4d3aac3aef86ebe4458bf2b',1,'lightenv.c']]], + ['c3d_5flightenvshadowmode_66',['C3D_LightEnvShadowMode',['../lightenv_8c.html#a620aaa0aecdb77ee9e1c4488acf747b4',1,'lightenv.c']]], + ['c3d_5flightenvshadowsel_67',['C3D_LightEnvShadowSel',['../lightenv_8c.html#ab581d4efd60b1458e8525f90e02d3592',1,'lightenv.c']]], + ['c3d_5flightgeofactor_68',['C3D_LightGeoFactor',['../light_8c.html#a8614e08e3affa1e2afcb45a31dc541fa',1,'light.c']]], + ['c3d_5flightinit_69',['C3D_LightInit',['../light_8c.html#ab8ab92b7fbfb27125ed98fffcf44f016',1,'light.c']]], + ['c3d_5flightposition_70',['C3D_LightPosition',['../light_8c.html#a6592df5c2f8f93092533f2af802a083c',1,'light.c']]], + ['c3d_5flightshadowenable_71',['C3D_LightShadowEnable',['../light_8c.html#a44ea377d23ca980e136b913fda50696e',1,'light.c']]], + ['c3d_5flightspecular0_72',['C3D_LightSpecular0',['../light_8c.html#a12b8b1d7f29b72215b648ae72b4f2bad',1,'light.c']]], + ['c3d_5flightspecular1_73',['C3D_LightSpecular1',['../light_8c.html#a489b566167b28a1d64fd82ec457bacdc',1,'light.c']]], + ['c3d_5flightspotdir_74',['C3D_LightSpotDir',['../light_8c.html#a9b177218b5ce2215413ec9675ed682f1',1,'light.c']]], + ['c3d_5flightspotenable_75',['C3D_LightSpotEnable',['../light_8c.html#a817887a9074a3c168cb5e8c8b010cc72',1,'light.c']]], + ['c3d_5flightspotlut_76',['C3D_LightSpotLut',['../light_8c.html#a8dbd12f98685b3dbfdab1e564519f2c0',1,'light.c']]], + ['c3d_5flighttwosidediffuse_77',['C3D_LightTwoSideDiffuse',['../light_8c.html#a7484b348db434dde3a2f3fb4921195ef',1,'light.c']]], + ['c3d_5fproctexbind_78',['C3D_ProcTexBind',['../proctex_8c.html#ab8829dfaf5b3218c25d34fb6a346f923',1,'proctex.c']]], + ['c3d_5fproctexcolorlutbind_79',['C3D_ProcTexColorLutBind',['../proctex_8c.html#a5778f964dda8176a626295c481475740',1,'proctex.c']]], + ['c3d_5fproctexinit_80',['C3D_ProcTexInit',['../proctex_8c.html#a345b54954ff53d69da26e67004f27566',1,'proctex.c']]], + ['c3d_5fproctexlodbias_81',['C3D_ProcTexLodBias',['../proctex_8c.html#ab7b57156fec968f6fa9b3c23d8f35021',1,'proctex.c']]], + ['c3d_5fproctexlutbind_82',['C3D_ProcTexLutBind',['../proctex_8c.html#a5955241da90248b5b970fccdad7e35fc',1,'proctex.c']]], + ['c3d_5fproctexnoisecoefs_83',['C3D_ProcTexNoiseCoefs',['../proctex_8c.html#ae07d23679dbadf4b0d8beaf6502e22eb',1,'proctex.c']]], + ['c3d_5frendertargetcreate_84',['C3D_RenderTargetCreate',['../renderqueue_8c.html#a716ffff33be46fe13a0b66b13de4e5f8',1,'renderqueue.c']]], + ['c3d_5frendertargetcreatefromtex_85',['C3D_RenderTargetCreateFromTex',['../renderqueue_8c.html#a31e0a8da75cf659a9ff59f8e51a42f34',1,'renderqueue.c']]], + ['c3d_5frendertargetdelete_86',['C3D_RenderTargetDelete',['../renderqueue_8c.html#afa76b60e45b1a19fa44136a880c311ef',1,'renderqueue.c']]], + ['c3d_5frendertargetsetoutput_87',['C3D_RenderTargetSetOutput',['../renderqueue_8c.html#aa44d9c7acd33a35026292cb0481b4ebf',1,'renderqueue.c']]], + ['c3d_5fsetattrinfo_88',['C3D_SetAttrInfo',['../attribs_8c.html#a6b5dbb56e3874447d62ca53182cf7795',1,'attribs.c']]], + ['c3d_5fsetbufinfo_89',['C3D_SetBufInfo',['../buffers_8c.html#a171a9cd987caaa33b5556e60b1a716e6',1,'buffers.c']]], + ['c3d_5fsetframebuf_90',['C3D_SetFrameBuf',['../framebuffer_8c.html#aa44f954d22329dc45084b3c71593fd30',1,'framebuffer.c']]], + ['c3d_5fsetscissor_91',['C3D_SetScissor',['../base_8c.html#ad1dc1878d090a2a8946e40265b56fecc',1,'base.c']]], + ['c3d_5fsettexenv_92',['C3D_SetTexEnv',['../texenv_8c.html#a3a2ba49764ebf3e4467d554fe40769e1',1,'texenv.c']]], + ['c3d_5fsetviewport_93',['C3D_SetViewport',['../base_8c.html#af0c625289847e014e5045cd61218a559',1,'base.c']]], + ['c3d_5fstencilop_94',['C3D_StencilOp',['../effect_8c.html#ad8a3f3ce3342c2fc2cbee737d5eeaf5d',1,'effect.c']]], + ['c3d_5fstenciltest_95',['C3D_StencilTest',['../effect_8c.html#a97039180afd2adbc0659fb37790008cb',1,'effect.c']]], + ['c3d_5fsyncdisplaytransfer_96',['C3D_SyncDisplayTransfer',['../renderqueue_8c.html#ae463bfd7d3676c3bcc56869f2e17ecf1',1,'renderqueue.c']]], + ['c3d_5fsyncmemoryfill_97',['C3D_SyncMemoryFill',['../renderqueue_8c.html#a87d66e53af7a8267f4be0e7283c4ce9c',1,'renderqueue.c']]], + ['c3d_5fsynctexturecopy_98',['C3D_SyncTextureCopy',['../renderqueue_8c.html#a40706d596256234e2655707ebdcacb32',1,'renderqueue.c']]], + ['c3d_5ftexbind_99',['C3D_TexBind',['../texture_8c.html#a360d2c5598e94a10dbd1667b02676105',1,'texture.c']]], + ['c3d_5ftexdelete_100',['C3D_TexDelete',['../texture_8c.html#accf86ec4d1ab6318cb64dc596cb9961e',1,'texture.c']]], + ['c3d_5ftexenvbufcolor_101',['C3D_TexEnvBufColor',['../texenv_8c.html#a81588f3622353d3da05dd2ff96e43020',1,'texenv.c']]], + ['c3d_5ftexenvbufupdate_102',['C3D_TexEnvBufUpdate',['../texenv_8c.html#afd650b68579ca331052abb1ee60f8013',1,'texenv.c']]], + ['c3d_5ftexflush_103',['C3D_TexFlush',['../texture_8c.html#a2f3af100fa9f63065b10be89b4c75a75',1,'texture.c']]], + ['c3d_5ftexgeneratemipmap_104',['C3D_TexGenerateMipmap',['../texture_8c.html#abc333445dfee8a3418b51249cee58b66',1,'texture.c']]], + ['c3d_5ftexinitwithparams_105',['C3D_TexInitWithParams',['../texture_8c.html#afa0b16b43f95e7786bcf85dd9eb4c746',1,'texture.c']]], + ['c3d_5ftexloadimage_106',['C3D_TexLoadImage',['../texture_8c.html#abfc2aa9643a319accc71ebb559e68891',1,'texture.c']]], + ['c3d_5ftexshadowparams_107',['C3D_TexShadowParams',['../texture_8c.html#ac74ca64e5d72e7bf3d86c9ee61d2d962',1,'texture.c']]], + ['c3d_5fupdateuniforms_108',['C3D_UpdateUniforms',['../uniforms_8c.html#ad274dff39f7bbc80ac20e8b4a36eee46',1,'uniforms.c']]], + ['c3di_5fattrinfobind_109',['C3Di_AttrInfoBind',['../attribs_8c.html#ac600ec36cc12c6473e0574f38ce2a6ef',1,'C3Di_AttrInfoBind(C3D_AttrInfo *info): attribs.c'],['../internal_8h.html#ac600ec36cc12c6473e0574f38ce2a6ef',1,'C3Di_AttrInfoBind(C3D_AttrInfo *info): attribs.c']]], + ['c3di_5fbufinfobind_110',['C3Di_BufInfoBind',['../buffers_8c.html#a49e592c82e10a02ca46a91745ba53182',1,'C3Di_BufInfoBind(C3D_BufInfo *info): buffers.c'],['../internal_8h.html#a49e592c82e10a02ca46a91745ba53182',1,'C3Di_BufInfoBind(C3D_BufInfo *info): buffers.c']]], + ['c3di_5fclearshaderuniforms_111',['C3Di_ClearShaderUniforms',['../internal_8h.html#ae0d0cabc17e43f2ab2368a390e283759',1,'C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type): uniforms.c'],['../uniforms_8c.html#ae0d0cabc17e43f2ab2368a390e283759',1,'C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type): uniforms.c']]], + ['c3di_5fdirtyuniforms_112',['C3Di_DirtyUniforms',['../internal_8h.html#a3122c009e7f6b5e2fb570003212fad73',1,'C3Di_DirtyUniforms(GPU_SHADER_TYPE type): uniforms.c'],['../uniforms_8c.html#a3122c009e7f6b5e2fb570003212fad73',1,'C3Di_DirtyUniforms(GPU_SHADER_TYPE type): uniforms.c']]], + ['c3di_5feffectbind_113',['C3Di_EffectBind',['../effect_8c.html#a70021f960e770a637643fcfa5e0d1c9c',1,'C3Di_EffectBind(C3D_Effect *e): effect.c'],['../internal_8h.html#a4fd792654ea1facdfa6dbda29b7f4914',1,'C3Di_EffectBind(C3D_Effect *effect): effect.c']]], + ['c3di_5fframebufbind_114',['C3Di_FrameBufBind',['../framebuffer_8c.html#abdac0a0f522dddd85db6e17f03e20121',1,'C3Di_FrameBufBind(C3D_FrameBuf *fb): framebuffer.c'],['../internal_8h.html#abdac0a0f522dddd85db6e17f03e20121',1,'C3Di_FrameBufBind(C3D_FrameBuf *fb): framebuffer.c']]], + ['c3di_5fgasupdate_115',['C3Di_GasUpdate',['../gas_8c.html#a8caed26d6204363f215976aaa7e05e6c',1,'C3Di_GasUpdate(C3D_Context *ctx): gas.c'],['../internal_8h.html#a8caed26d6204363f215976aaa7e05e6c',1,'C3Di_GasUpdate(C3D_Context *ctx): gas.c']]], + ['c3di_5flightenvdirty_116',['C3Di_LightEnvDirty',['../lightenv_8c.html#a2ce7e3f5086a67f3465a3486715e0d71',1,'lightenv.c']]], + ['c3di_5flightenvupdate_117',['C3Di_LightEnvUpdate',['../lightenv_8c.html#a50cc612d98a9fd5823ed865fd15a5713',1,'lightenv.c']]], + ['c3di_5flightmtlblend_118',['C3Di_LightMtlBlend',['../internal_8h.html#a5e20dd6f18115396537df0713e22a0b4',1,'C3Di_LightMtlBlend(C3D_Light *light): light.c'],['../light_8c.html#a5e20dd6f18115396537df0713e22a0b4',1,'C3Di_LightMtlBlend(C3D_Light *light): light.c']]], + ['c3di_5floadshaderuniforms_119',['C3Di_LoadShaderUniforms',['../internal_8h.html#a50e19b086244713ca897d5cb8a1a1e86',1,'C3Di_LoadShaderUniforms(shaderInstance_s *si): uniforms.c'],['../uniforms_8c.html#a50e19b086244713ca897d5cb8a1a1e86',1,'C3Di_LoadShaderUniforms(shaderInstance_s *si): uniforms.c']]], + ['c3di_5fproctexdirty_120',['C3Di_ProcTexDirty',['../proctex_8c.html#a858a4ba4e2f0ea53219743ad022ba883',1,'proctex.c']]], + ['c3di_5fproctexupdate_121',['C3Di_ProcTexUpdate',['../proctex_8c.html#a6f727aa06168f2d1e94d93e5538b9ac7',1,'proctex.c']]], + ['c3di_5frenderqueuedisablevblank_122',['C3Di_RenderQueueDisableVBlank',['../internal_8h.html#a73b8cdfbcd16488c7a6a54dade6ae470',1,'C3Di_RenderQueueDisableVBlank(void): renderqueue.c'],['../renderqueue_8c.html#a73b8cdfbcd16488c7a6a54dade6ae470',1,'C3Di_RenderQueueDisableVBlank(void): renderqueue.c']]], + ['c3di_5frenderqueueenablevblank_123',['C3Di_RenderQueueEnableVBlank',['../internal_8h.html#a765ddd29aa58ce4598429750d3f692a5',1,'C3Di_RenderQueueEnableVBlank(void): renderqueue.c'],['../renderqueue_8c.html#a765ddd29aa58ce4598429750d3f692a5',1,'C3Di_RenderQueueEnableVBlank(void): renderqueue.c']]], + ['c3di_5frenderqueueexit_124',['C3Di_RenderQueueExit',['../internal_8h.html#aa8202fe4deb317840c5ca9516d7813f2',1,'C3Di_RenderQueueExit(void): renderqueue.c'],['../renderqueue_8c.html#aa8202fe4deb317840c5ca9516d7813f2',1,'C3Di_RenderQueueExit(void): renderqueue.c']]], + ['c3di_5frenderqueueinit_125',['C3Di_RenderQueueInit',['../internal_8h.html#a15d6ad6f422fcb523ff7ddf6808f959c',1,'C3Di_RenderQueueInit(void): renderqueue.c'],['../renderqueue_8c.html#a15d6ad6f422fcb523ff7ddf6808f959c',1,'C3Di_RenderQueueInit(void): renderqueue.c']]], + ['c3di_5frenderqueuewaitdone_126',['C3Di_RenderQueueWaitDone',['../internal_8h.html#a7cde967201bd3128dc49b7cc7d065ff4',1,'C3Di_RenderQueueWaitDone(void): renderqueue.c'],['../renderqueue_8c.html#a7cde967201bd3128dc49b7cc7d065ff4',1,'C3Di_RenderQueueWaitDone(void): renderqueue.c']]], + ['c3di_5fsettex_127',['C3Di_SetTex',['../internal_8h.html#a9cd92f53a18da481d1ba74f4c9da7dee',1,'C3Di_SetTex(int unit, C3D_Tex *tex): texture.c'],['../texture_8c.html#a9cd92f53a18da481d1ba74f4c9da7dee',1,'C3Di_SetTex(int unit, C3D_Tex *tex): texture.c']]], + ['c3di_5fsplitframe_128',['C3Di_SplitFrame',['../base_8c.html#a139aee1e5943be7dfb22a011f6057689',1,'C3Di_SplitFrame(u32 **pBuf, u32 *pSize): base.c'],['../internal_8h.html#a139aee1e5943be7dfb22a011f6057689',1,'C3Di_SplitFrame(u32 **pBuf, u32 *pSize): base.c']]], + ['c3di_5ftexenvbind_129',['C3Di_TexEnvBind',['../internal_8h.html#acff27a4262a8a3fb39b20f2afd4cccd5',1,'C3Di_TexEnvBind(int id, C3D_TexEnv *env): texenv.c'],['../texenv_8c.html#acff27a4262a8a3fb39b20f2afd4cccd5',1,'C3Di_TexEnvBind(int id, C3D_TexEnv *env): texenv.c']]], + ['c3di_5fupdatecontext_130',['C3Di_UpdateContext',['../base_8c.html#a4cfecbe235841f7d41495a8dc6b15c32',1,'C3Di_UpdateContext(void): base.c'],['../internal_8h.html#a4cfecbe235841f7d41495a8dc6b15c32',1,'C3Di_UpdateContext(void): base.c']]] +]; diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js new file mode 100644 index 0000000..2a7ebdf --- /dev/null +++ b/docs/html/search/functions_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['foglut_5fexp_0',['FogLut_Exp',['../fog_8c.html#a66632ecd1b44cf397db7682a1590bc4b',1,'fog.c']]], + ['foglut_5ffromarray_1',['FogLut_FromArray',['../fog_8c.html#a149ecb2e595183a88702023998266493',1,'fog.c']]] +]; diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js new file mode 100644 index 0000000..802a657 --- /dev/null +++ b/docs/html/search/functions_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gaslut_5ffromarray_0',['GasLut_FromArray',['../gas_8c.html#aa4dce96b8bebc6f9c3894cb9a17cbe16',1,'gas.c']]] +]; diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js new file mode 100644 index 0000000..fb09bfb --- /dev/null +++ b/docs/html/search/functions_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['lightlut_5ffromarray_0',['LightLut_FromArray',['../lightlut_8c.html#a9b8b3517fe8b867689551801a69b011a',1,'lightlut.c']]], + ['lightlut_5ffromfunc_1',['LightLut_FromFunc',['../lightlut_8c.html#a5fc17b58965a82427775599c4ba5525a',1,'lightlut.c']]], + ['lightlutda_5fcreate_2',['LightLutDA_Create',['../lightlut_8c.html#aae86ce8989d5bdc85c62d0fc1aa85105',1,'lightlut.c']]] +]; diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js new file mode 100644 index 0000000..67e3f55 --- /dev/null +++ b/docs/html/search/functions_7.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mtxstack_5fbind_0',['MtxStack_Bind',['../mtxstack_8c.html#a83bb47cbc090a31bdd271b77e54d15cc',1,'mtxstack.c']]], + ['mtxstack_5finit_1',['MtxStack_Init',['../mtxstack_8c.html#a270acb036c65e035aa2f4929ad68caf2',1,'mtxstack.c']]], + ['mtxstack_5fpop_2',['MtxStack_Pop',['../mtxstack_8c.html#aa760fcf279b61fb9cd1eadb208b8b735',1,'mtxstack.c']]], + ['mtxstack_5fpush_3',['MtxStack_Push',['../mtxstack_8c.html#a1d3768971c12d482f6a6e0c3a5c1f1b8',1,'mtxstack.c']]], + ['mtxstack_5fupdate_4',['MtxStack_Update',['../mtxstack_8c.html#a058130e9530aa772bf3d1a912d4f3c13',1,'mtxstack.c']]] +]; diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js new file mode 100644 index 0000000..da61421 --- /dev/null +++ b/docs/html/search/functions_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['proctexcolorlut_5fwrite_0',['ProcTexColorLut_Write',['../proctex_8c.html#a2b28950b8e00508b8d241cc57f7ea433',1,'proctex.c']]], + ['proctexlut_5ffromarray_1',['ProcTexLut_FromArray',['../proctex_8c.html#a9e3d456ec182285298d8e844c852a207',1,'proctex.c']]] +]; diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js new file mode 100644 index 0000000..182d9be --- /dev/null +++ b/docs/html/search/functions_9.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['tex3ds_5fgetnumsubtextures_0',['Tex3DS_GetNumSubTextures',['../tex3ds_8c.html#ab2a4089637e155481da431da62646042',1,'tex3ds.c']]], + ['tex3ds_5fgetsubtexture_1',['Tex3DS_GetSubTexture',['../tex3ds_8c.html#ad3e1b65a79e9a989b8e440570816561d',1,'tex3ds.c']]], + ['tex3ds_5ftexturefree_2',['Tex3DS_TextureFree',['../tex3ds_8c.html#a644ebdcb177b99196c3799b6f6e7b1de',1,'tex3ds.c']]], + ['tex3ds_5ftextureimport_3',['Tex3DS_TextureImport',['../tex3ds_8c.html#aeb2c3487491ef866ff16f6cecde9448d',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportcallback_4',['Tex3DS_TextureImportCallback',['../tex3ds_8c.html#a76fb1ed8388513928ca6e06ada4e7552',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportfd_5',['Tex3DS_TextureImportFD',['../tex3ds_8c.html#a20dfee0fe7c2ac8b93e95065b64cb76f',1,'tex3ds.c']]], + ['tex3ds_5ftextureimportstdio_6',['Tex3DS_TextureImportStdio',['../tex3ds_8c.html#a2840b76f4ce3a0f86e2d86b37dcb923e',1,'tex3ds.c']]] +]; diff --git a/docs/html/search/mag.svg b/docs/html/search/mag.svg new file mode 100644 index 0000000..9f46b30 --- /dev/null +++ b/docs/html/search/mag.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/docs/html/search/mag_d.svg b/docs/html/search/mag_d.svg new file mode 100644 index 0000000..b9a814c --- /dev/null +++ b/docs/html/search/mag_d.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/docs/html/search/mag_sel.svg b/docs/html/search/mag_sel.svg new file mode 100644 index 0000000..03626f6 --- /dev/null +++ b/docs/html/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/docs/html/search/mag_seld.svg b/docs/html/search/mag_seld.svg new file mode 100644 index 0000000..6e720dc --- /dev/null +++ b/docs/html/search/mag_seld.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/docs/html/search/search.css b/docs/html/search/search.css new file mode 100644 index 0000000..19f76f9 --- /dev/null +++ b/docs/html/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/html/search/search.js b/docs/html/search/search.js new file mode 100644 index 0000000..e103a26 --- /dev/null +++ b/docs/html/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var jsFile; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + var loadJS = function(url, impl, loc){ + var scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + var domSearchBox = this.DOMSearchBox(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + var domSearchClose = this.DOMSearchClose(); + var resultsPath = this.resultsPath; + + var handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + searchResults.Search(searchValue); + + if (domPopupSearchResultsWindow.style.display!='block') + { + domSearchClose.style.display = 'inline-block'; + var left = getXPos(domSearchBox) + 150; + var top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + var maxWidth = document.body.clientWidth; + var maxHeight = document.body.clientHeight; + var width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + var height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults(resultsPath) +{ + var results = document.getElementById("SRResults"); + results.innerHTML = ''; + for (var e=0; e + + + + + + +Citro3d: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/docs/html/struct_c3_d___context.html b/docs/html/struct_c3_d___context.html new file mode 100644 index 0000000..36cafb4 --- /dev/null +++ b/docs/html/struct_c3_d___context.html @@ -0,0 +1,751 @@ + + + + + + + +Citro3d: C3D_Context Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    C3D_Context Struct Reference
    +
    +
    + +

    #include <internal.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    gxCmdQueue_s gxQueue
     
    u32 * cmdBuf
     
    size_t cmdBufSize
     
    float cmdBufUsage
     
    u32 flags
     
    shaderProgram_s * program
     
    C3D_AttrInfo attrInfo
     
    C3D_BufInfo bufInfo
     
    C3D_Effect effect
     
    C3D_LightEnv * lightEnv
     
    u32 texConfig
     
    u32 texShadow
     
    C3D_Tex * tex [3]
     
    C3D_TexEnv texEnv [6]
     
    u32 texEnvBuf
     
    u32 texEnvBufClr
     
    u32 fogClr
     
    C3D_FogLut * fogLut
     
    u16 gasAttn
     
    u16 gasAccMax
     
    u32 gasLightXY
     
    u32 gasLightZ
     
    u32 gasLightZColor
     
    u32 gasDeltaZ: 24
     
    u32 gasFlags: 8
     
    C3D_GasLut * gasLut
     
    C3D_ProcTex * procTex
     
    C3D_ProcTexLut * procTexLut [3]
     
    C3D_ProcTexColorLut * procTexColorLut
     
    C3D_FrameBuf fb
     
    u32 viewport [5]
     
    u32 scissor [3]
     
    u16 fixedAttribDirty
     
    u16 fixedAttribEverDirty
     
    C3D_FVec fixedAttribs [12]
     
    +

    Detailed Description

    +
    +

    Definition at line 31 of file internal.h.

    +

    Member Data Documentation

    + +

    ◆ attrInfo

    + +
    +
    + + + + +
    C3D_AttrInfo C3D_Context::attrInfo
    +
    + +

    Definition at line 41 of file internal.h.

    + +
    +
    + +

    ◆ bufInfo

    + +
    +
    + + + + +
    C3D_BufInfo C3D_Context::bufInfo
    +
    + +

    Definition at line 42 of file internal.h.

    + +
    +
    + +

    ◆ cmdBuf

    + +
    +
    + + + + +
    u32* C3D_Context::cmdBuf
    +
    + +

    Definition at line 34 of file internal.h.

    + +
    +
    + +

    ◆ cmdBufSize

    + +
    +
    + + + + +
    size_t C3D_Context::cmdBufSize
    +
    + +

    Definition at line 35 of file internal.h.

    + +
    +
    + +

    ◆ cmdBufUsage

    + +
    +
    + + + + +
    float C3D_Context::cmdBufUsage
    +
    + +

    Definition at line 36 of file internal.h.

    + +
    +
    + +

    ◆ effect

    + +
    +
    + + + + +
    C3D_Effect C3D_Context::effect
    +
    + +

    Definition at line 43 of file internal.h.

    + +
    +
    + +

    ◆ fb

    + +
    +
    + + + + +
    C3D_FrameBuf C3D_Context::fb
    +
    + +

    Definition at line 65 of file internal.h.

    + +
    +
    + +

    ◆ fixedAttribDirty

    + +
    +
    + + + + +
    u16 C3D_Context::fixedAttribDirty
    +
    + +

    Definition at line 69 of file internal.h.

    + +
    +
    + +

    ◆ fixedAttribEverDirty

    + +
    +
    + + + + +
    u16 C3D_Context::fixedAttribEverDirty
    +
    + +

    Definition at line 69 of file internal.h.

    + +
    +
    + +

    ◆ fixedAttribs

    + +
    +
    + + + + +
    C3D_FVec C3D_Context::fixedAttribs[12]
    +
    + +

    Definition at line 70 of file internal.h.

    + +
    +
    + +

    ◆ flags

    + +
    +
    + + + + +
    u32 C3D_Context::flags
    +
    + +

    Definition at line 38 of file internal.h.

    + +
    +
    + +

    ◆ fogClr

    + +
    +
    + + + + +
    u32 C3D_Context::fogClr
    +
    + +

    Definition at line 52 of file internal.h.

    + +
    +
    + +

    ◆ fogLut

    + +
    +
    + + + + +
    C3D_FogLut* C3D_Context::fogLut
    +
    + +

    Definition at line 53 of file internal.h.

    + +
    +
    + +

    ◆ gasAccMax

    + +
    +
    + + + + +
    u16 C3D_Context::gasAccMax
    +
    + +

    Definition at line 55 of file internal.h.

    + +
    +
    + +

    ◆ gasAttn

    + +
    +
    + + + + +
    u16 C3D_Context::gasAttn
    +
    + +

    Definition at line 55 of file internal.h.

    + +
    +
    + +

    ◆ gasDeltaZ

    + +
    +
    + + + + +
    u32 C3D_Context::gasDeltaZ
    +
    + +

    Definition at line 57 of file internal.h.

    + +
    +
    + +

    ◆ gasFlags

    + +
    +
    + + + + +
    u32 C3D_Context::gasFlags
    +
    + +

    Definition at line 58 of file internal.h.

    + +
    +
    + +

    ◆ gasLightXY

    + +
    +
    + + + + +
    u32 C3D_Context::gasLightXY
    +
    + +

    Definition at line 56 of file internal.h.

    + +
    +
    + +

    ◆ gasLightZ

    + +
    +
    + + + + +
    u32 C3D_Context::gasLightZ
    +
    + +

    Definition at line 56 of file internal.h.

    + +
    +
    + +

    ◆ gasLightZColor

    + +
    +
    + + + + +
    u32 C3D_Context::gasLightZColor
    +
    + +

    Definition at line 56 of file internal.h.

    + +
    +
    + +

    ◆ gasLut

    + +
    +
    + + + + +
    C3D_GasLut* C3D_Context::gasLut
    +
    + +

    Definition at line 59 of file internal.h.

    + +
    +
    + +

    ◆ gxQueue

    + +
    +
    + + + + +
    gxCmdQueue_s C3D_Context::gxQueue
    +
    + +

    Definition at line 33 of file internal.h.

    + +
    +
    + +

    ◆ lightEnv

    + +
    +
    + + + + +
    C3D_LightEnv* C3D_Context::lightEnv
    +
    + +

    Definition at line 44 of file internal.h.

    + +
    +
    + +

    ◆ procTex

    + +
    +
    + + + + +
    C3D_ProcTex* C3D_Context::procTex
    +
    + +

    Definition at line 61 of file internal.h.

    + +
    +
    + +

    ◆ procTexColorLut

    + +
    +
    + + + + +
    C3D_ProcTexColorLut* C3D_Context::procTexColorLut
    +
    + +

    Definition at line 63 of file internal.h.

    + +
    +
    + +

    ◆ procTexLut

    + +
    +
    + + + + +
    C3D_ProcTexLut* C3D_Context::procTexLut[3]
    +
    + +

    Definition at line 62 of file internal.h.

    + +
    +
    + +

    ◆ program

    + +
    +
    + + + + +
    shaderProgram_s* C3D_Context::program
    +
    + +

    Definition at line 39 of file internal.h.

    + +
    +
    + +

    ◆ scissor

    + +
    +
    + + + + +
    u32 C3D_Context::scissor[3]
    +
    + +

    Definition at line 67 of file internal.h.

    + +
    +
    + +

    ◆ tex

    + +
    +
    + + + + +
    C3D_Tex* C3D_Context::tex[3]
    +
    + +

    Definition at line 48 of file internal.h.

    + +
    +
    + +

    ◆ texConfig

    + +
    +
    + + + + +
    u32 C3D_Context::texConfig
    +
    + +

    Definition at line 46 of file internal.h.

    + +
    +
    + +

    ◆ texEnv

    + +
    +
    + + + + +
    C3D_TexEnv C3D_Context::texEnv[6]
    +
    + +

    Definition at line 49 of file internal.h.

    + +
    +
    + +

    ◆ texEnvBuf

    + +
    +
    + + + + +
    u32 C3D_Context::texEnvBuf
    +
    + +

    Definition at line 51 of file internal.h.

    + +
    +
    + +

    ◆ texEnvBufClr

    + +
    +
    + + + + +
    u32 C3D_Context::texEnvBufClr
    +
    + +

    Definition at line 51 of file internal.h.

    + +
    +
    + +

    ◆ texShadow

    + +
    +
    + + + + +
    u32 C3D_Context::texShadow
    +
    + +

    Definition at line 47 of file internal.h.

    + +
    +
    + +

    ◆ viewport

    + +
    +
    + + + + +
    u32 C3D_Context::viewport[5]
    +
    + +

    Definition at line 66 of file internal.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/docs/html/struct_c3_d___context.js b/docs/html/struct_c3_d___context.js new file mode 100644 index 0000000..a55c6ce --- /dev/null +++ b/docs/html/struct_c3_d___context.js @@ -0,0 +1,38 @@ +var struct_c3_d___context = +[ + [ "attrInfo", "struct_c3_d___context.html#a81d94fb558d133ebfcd8e88300c4a69f", null ], + [ "bufInfo", "struct_c3_d___context.html#a0d993d8a5035bd8f950f6e2f5bb6dad2", null ], + [ "cmdBuf", "struct_c3_d___context.html#a3d911de33f8581a227f09a6e94d52f40", null ], + [ "cmdBufSize", "struct_c3_d___context.html#aef96c9da1f31a124cac231f18dd2e3eb", null ], + [ "cmdBufUsage", "struct_c3_d___context.html#ad56de99a7837b0af3bb85f270f99f443", null ], + [ "effect", "struct_c3_d___context.html#ad8f5384d0ce1785ad1fc88857abf7522", null ], + [ "fb", "struct_c3_d___context.html#afeed36b52b807cd8ac248bb47e413741", null ], + [ "fixedAttribDirty", "struct_c3_d___context.html#a2cfe54bfacc99795619bd9da5d0a7261", null ], + [ "fixedAttribEverDirty", "struct_c3_d___context.html#a60b3908ed58b4fb9cd30f224ccefed21", null ], + [ "fixedAttribs", "struct_c3_d___context.html#a00e1248e912c6ef20a6d735944738666", null ], + [ "flags", "struct_c3_d___context.html#a060c9eda900637b676805b72e16ad4ee", null ], + [ "fogClr", "struct_c3_d___context.html#ab9dccee59972678fdd8ce310af36f0ce", null ], + [ "fogLut", "struct_c3_d___context.html#acf3487a3d99b3a98dd0127655f50ddc4", null ], + [ "gasAccMax", "struct_c3_d___context.html#a46796c689bfdcf581d5e30ed9059545a", null ], + [ "gasAttn", "struct_c3_d___context.html#a28e34b82078c21c367f8824981f42ae9", null ], + [ "gasDeltaZ", "struct_c3_d___context.html#a7876b4666dad54e4215c6c73418f9daf", null ], + [ "gasFlags", "struct_c3_d___context.html#a567c93db75ea706effb0201c8470125f", null ], + [ "gasLightXY", "struct_c3_d___context.html#a274a578416df4d3e6e77430f743caa46", null ], + [ "gasLightZ", "struct_c3_d___context.html#ae58bef7a5d748332eb36da8fbe610b9b", null ], + [ "gasLightZColor", "struct_c3_d___context.html#a1586a4301cb16fc245ca32c047e44780", null ], + [ "gasLut", "struct_c3_d___context.html#a84d1ef86b62d47cb6571b6a6329e1e09", null ], + [ "gxQueue", "struct_c3_d___context.html#a680c04725ccc6dce38dc38b018e0c148", null ], + [ "lightEnv", "struct_c3_d___context.html#ae47862d7586b1444612d04723f82d9a5", null ], + [ "procTex", "struct_c3_d___context.html#aff07353f71a27879ead633d6edc86560", null ], + [ "procTexColorLut", "struct_c3_d___context.html#a829f0084ad4b0de7ed62bc0465ef2dce", null ], + [ "procTexLut", "struct_c3_d___context.html#ad2a585233d66a88b1233c368ed6b1f87", null ], + [ "program", "struct_c3_d___context.html#aa09d0c1766d0bab3a68b31f0373fa8c4", null ], + [ "scissor", "struct_c3_d___context.html#a76d6b562e06dcacc7a063ad504dbdb03", null ], + [ "tex", "struct_c3_d___context.html#a65d2e5b1e6265073c80fb759316343ba", null ], + [ "texConfig", "struct_c3_d___context.html#a3df51343ca0c1829f23fcdcfe69d9d04", null ], + [ "texEnv", "struct_c3_d___context.html#a8486fedaae5bf7f482025dae985ba2a3", null ], + [ "texEnvBuf", "struct_c3_d___context.html#a6f4d132b6ca1fc9f34950906503001cb", null ], + [ "texEnvBufClr", "struct_c3_d___context.html#afaed4c017fd633865ba04d253b27d934", null ], + [ "texShadow", "struct_c3_d___context.html#ad90188948cd28d5680fc62a4b699d195", null ], + [ "viewport", "struct_c3_d___context.html#ac4290cf3539004a3923f3ed3aa6f24a3", null ] +]; \ No newline at end of file diff --git a/docs/html/struct_c3_d___effect-members.html b/docs/html/struct_c3_d___effect-members.html new file mode 100644 index 0000000..258af7a --- /dev/null +++ b/docs/html/struct_c3_d___effect-members.html @@ -0,0 +1,123 @@ + + + + + + + +Citro3d: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    C3D_Effect Member List
    +
    + +
    + + + + diff --git a/docs/html/struct_c3_d___effect.html b/docs/html/struct_c3_d___effect.html new file mode 100644 index 0000000..ca698d8 --- /dev/null +++ b/docs/html/struct_c3_d___effect.html @@ -0,0 +1,409 @@ + + + + + + + +Citro3d: C3D_Effect Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    C3D_Effect Struct Reference
    +
    +
    + +

    #include <internal.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    u32 fragOpMode
     
    u32 fragOpShadow
     
    u32 zScale
     
    u32 zOffset
     
    GPU_CULLMODE cullMode
     
    bool zBuffer
     
    bool earlyDepth
     
    GPU_EARLYDEPTHFUNC earlyDepthFunc
     
    u32 earlyDepthRef
     
    u32 alphaTest
     
    u32 stencilMode
     
    u32 stencilOp
     
    u32 depthTest
     
    u32 blendClr
     
    u32 alphaBlend
     
    GPU_LOGICOP clrLogicOp
     
    +

    Detailed Description

    +
    +

    Definition at line 12 of file internal.h.

    +

    Member Data Documentation

    + +

    ◆ alphaBlend

    + +
    +
    + + + + +
    u32 C3D_Effect::alphaBlend
    +
    + +

    Definition at line 27 of file internal.h.

    + +
    +
    + +

    ◆ alphaTest

    + +
    +
    + + + + +
    u32 C3D_Effect::alphaTest
    +
    + +

    Definition at line 22 of file internal.h.

    + +
    +
    + +

    ◆ blendClr

    + +
    +
    + + + + +
    u32 C3D_Effect::blendClr
    +
    + +

    Definition at line 26 of file internal.h.

    + +
    +
    + +

    ◆ clrLogicOp

    + +
    +
    + + + + +
    GPU_LOGICOP C3D_Effect::clrLogicOp
    +
    + +

    Definition at line 28 of file internal.h.

    + +
    +
    + +

    ◆ cullMode

    + +
    +
    + + + + +
    GPU_CULLMODE C3D_Effect::cullMode
    +
    + +

    Definition at line 17 of file internal.h.

    + +
    +
    + +

    ◆ depthTest

    + +
    +
    + + + + +
    u32 C3D_Effect::depthTest
    +
    + +

    Definition at line 24 of file internal.h.

    + +
    +
    + +

    ◆ earlyDepth

    + +
    +
    + + + + +
    bool C3D_Effect::earlyDepth
    +
    + +

    Definition at line 18 of file internal.h.

    + +
    +
    + +

    ◆ earlyDepthFunc

    + +
    +
    + + + + +
    GPU_EARLYDEPTHFUNC C3D_Effect::earlyDepthFunc
    +
    + +

    Definition at line 19 of file internal.h.

    + +
    +
    + +

    ◆ earlyDepthRef

    + +
    +
    + + + + +
    u32 C3D_Effect::earlyDepthRef
    +
    + +

    Definition at line 20 of file internal.h.

    + +
    +
    + +

    ◆ fragOpMode

    + +
    +
    + + + + +
    u32 C3D_Effect::fragOpMode
    +
    + +

    Definition at line 14 of file internal.h.

    + +
    +
    + +

    ◆ fragOpShadow

    + +
    +
    + + + + +
    u32 C3D_Effect::fragOpShadow
    +
    + +

    Definition at line 15 of file internal.h.

    + +
    +
    + +

    ◆ stencilMode

    + +
    +
    + + + + +
    u32 C3D_Effect::stencilMode
    +
    + +

    Definition at line 23 of file internal.h.

    + +
    +
    + +

    ◆ stencilOp

    + +
    +
    + + + + +
    u32 C3D_Effect::stencilOp
    +
    + +

    Definition at line 23 of file internal.h.

    + +
    +
    + +

    ◆ zBuffer

    + +
    +
    + + + + +
    bool C3D_Effect::zBuffer
    +
    + +

    Definition at line 18 of file internal.h.

    + +
    +
    + +

    ◆ zOffset

    + +
    +
    + + + + +
    u32 C3D_Effect::zOffset
    +
    + +

    Definition at line 16 of file internal.h.

    + +
    +
    + +

    ◆ zScale

    + +
    +
    + + + + +
    u32 C3D_Effect::zScale
    +
    + +

    Definition at line 16 of file internal.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/docs/html/struct_c3_d___effect.js b/docs/html/struct_c3_d___effect.js new file mode 100644 index 0000000..b113af7 --- /dev/null +++ b/docs/html/struct_c3_d___effect.js @@ -0,0 +1,19 @@ +var struct_c3_d___effect = +[ + [ "alphaBlend", "struct_c3_d___effect.html#abc74d60c7601eae49380e2f7737c90b4", null ], + [ "alphaTest", "struct_c3_d___effect.html#a226b4271d5998e54cd6453c1e668463d", null ], + [ "blendClr", "struct_c3_d___effect.html#a2135f19276122f785035c6914fe693e6", null ], + [ "clrLogicOp", "struct_c3_d___effect.html#ab5e81d981915561dcd4352b07aa4d593", null ], + [ "cullMode", "struct_c3_d___effect.html#a361f124a155a6bf6971467daa7a7d8b2", null ], + [ "depthTest", "struct_c3_d___effect.html#a9a3ce17163873e2ab5e48ab1e305bae0", null ], + [ "earlyDepth", "struct_c3_d___effect.html#a3397411003351e4a7a8b3e001a47a85a", null ], + [ "earlyDepthFunc", "struct_c3_d___effect.html#ab988707d63c82bcee320f8722085e13e", null ], + [ "earlyDepthRef", "struct_c3_d___effect.html#ab24639b4383eb8701020f46cd01e9644", null ], + [ "fragOpMode", "struct_c3_d___effect.html#aa41fca9c92e899a85ae90dd678c84045", null ], + [ "fragOpShadow", "struct_c3_d___effect.html#ae30d30e5ecd3a38b0d2efc304e41e307", null ], + [ "stencilMode", "struct_c3_d___effect.html#a08957dc606bdc427a03110fc742f7e03", null ], + [ "stencilOp", "struct_c3_d___effect.html#a4f827ebca96ef5fb306f8be9895edf42", null ], + [ "zBuffer", "struct_c3_d___effect.html#a7976f4fbacae4747727aec4ba72d1902", null ], + [ "zOffset", "struct_c3_d___effect.html#a84db888680ec1c1cee776dcef2d76c09", null ], + [ "zScale", "struct_c3_d___effect.html#aee2719c6d058933e124dd95bcd298dae", null ] +]; \ No newline at end of file diff --git a/docs/html/struct_tex3_d_s___texture__s-members.html b/docs/html/struct_tex3_d_s___texture__s-members.html new file mode 100644 index 0000000..98ff8ce --- /dev/null +++ b/docs/html/struct_tex3_d_s___texture__s-members.html @@ -0,0 +1,113 @@ + + + + + + + +Citro3d: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Tex3DS_Texture_s Member List
    +
    + +
    + + + + diff --git a/docs/html/struct_tex3_d_s___texture__s.html b/docs/html/struct_tex3_d_s___texture__s.html new file mode 100644 index 0000000..a93a63e --- /dev/null +++ b/docs/html/struct_tex3_d_s___texture__s.html @@ -0,0 +1,249 @@ + + + + + + + +Citro3d: Tex3DS_Texture_s Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    Tex3DS_Texture_s Struct Reference
    +
    +
    + +

    Tex3DS texture. + More...

    + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    u16 numSubTextures
     Number of subtextures. More...
     
    u16 width
     Texture width. More...
     
    u16 height
     Texture height. More...
     
    u8 format
     Texture format. More...
     
    u8 mipmapLevels
     Number of mipmaps. More...
     
    Tex3DS_SubTexture subTextures []
     Subtextures. More...
     
    +

    Detailed Description

    +

    Tex3DS texture.

    + +

    Definition at line 34 of file tex3ds.c.

    +

    Member Data Documentation

    + +

    ◆ format

    + +
    +
    + + + + +
    u8 Tex3DS_Texture_s::format
    +
    + +

    Texture format.

    + +

    Definition at line 39 of file tex3ds.c.

    + +
    +
    + +

    ◆ height

    + +
    +
    + + + + +
    u16 Tex3DS_Texture_s::height
    +
    + +

    Texture height.

    + +

    Definition at line 38 of file tex3ds.c.

    + +
    +
    + +

    ◆ mipmapLevels

    + +
    +
    + + + + +
    u8 Tex3DS_Texture_s::mipmapLevels
    +
    + +

    Number of mipmaps.

    + +

    Definition at line 40 of file tex3ds.c.

    + +
    +
    + +

    ◆ numSubTextures

    + +
    +
    + + + + +
    u16 Tex3DS_Texture_s::numSubTextures
    +
    + +

    Number of subtextures.

    + +

    Definition at line 36 of file tex3ds.c.

    + +
    +
    + +

    ◆ subTextures

    + +
    +
    + + + + +
    Tex3DS_SubTexture Tex3DS_Texture_s::subTextures[]
    +
    + +

    Subtextures.

    + +

    Definition at line 41 of file tex3ds.c.

    + +
    +
    + +

    ◆ width

    + +
    +
    + + + + +
    u16 Tex3DS_Texture_s::width
    +
    + +

    Texture width.

    + +

    Definition at line 37 of file tex3ds.c.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/docs/html/struct_tex3_d_s___texture__s.js b/docs/html/struct_tex3_d_s___texture__s.js new file mode 100644 index 0000000..ad65210 --- /dev/null +++ b/docs/html/struct_tex3_d_s___texture__s.js @@ -0,0 +1,9 @@ +var struct_tex3_d_s___texture__s = +[ + [ "format", "struct_tex3_d_s___texture__s.html#acd8d57ca33404e227248a1bcaab75559", null ], + [ "height", "struct_tex3_d_s___texture__s.html#a3a106d6ccec889e76194e4bb20018bed", null ], + [ "mipmapLevels", "struct_tex3_d_s___texture__s.html#aa852bd3bcea5385942286844290874dc", null ], + [ "numSubTextures", "struct_tex3_d_s___texture__s.html#a052a0f02995d2ea81acba9a42d0866db", null ], + [ "subTextures", "struct_tex3_d_s___texture__s.html#affe229aba59bed71dbd44ff3a8dbbd0d", null ], + [ "width", "struct_tex3_d_s___texture__s.html#a25d12872880bcf93b513c53779f5aee0", null ] +]; \ No newline at end of file diff --git a/docs/html/struct_tex3_d_si___sub_texture-members.html b/docs/html/struct_tex3_d_si___sub_texture-members.html new file mode 100644 index 0000000..b8282d9 --- /dev/null +++ b/docs/html/struct_tex3_d_si___sub_texture-members.html @@ -0,0 +1,113 @@ + + + + + + + +Citro3d: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Tex3DSi_SubTexture Member List
    +
    + +
    + + + + diff --git a/docs/html/struct_tex3_d_si___sub_texture.html b/docs/html/struct_tex3_d_si___sub_texture.html new file mode 100644 index 0000000..1d159f8 --- /dev/null +++ b/docs/html/struct_tex3_d_si___sub_texture.html @@ -0,0 +1,227 @@ + + + + + + + +Citro3d: Tex3DSi_SubTexture Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    Tex3DSi_SubTexture Struct Reference
    +
    +
    + + + + + + + + + + + + + + +

    +Public Attributes

    u16 width
     
    u16 height
     
    u16 left
     
    u16 top
     
    u16 right
     
    u16 bottom
     
    +

    Detailed Description

    +
    +

    Definition at line 54 of file tex3ds.c.

    +

    Member Data Documentation

    + +

    ◆ bottom

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::bottom
    +
    + +

    Definition at line 57 of file tex3ds.c.

    + +
    +
    + +

    ◆ height

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::height
    +
    + +

    Definition at line 56 of file tex3ds.c.

    + +
    +
    + +

    ◆ left

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::left
    +
    + +

    Definition at line 57 of file tex3ds.c.

    + +
    +
    + +

    ◆ right

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::right
    +
    + +

    Definition at line 57 of file tex3ds.c.

    + +
    +
    + +

    ◆ top

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::top
    +
    + +

    Definition at line 57 of file tex3ds.c.

    + +
    +
    + +

    ◆ width

    + +
    +
    + + + + +
    u16 Tex3DSi_SubTexture::width
    +
    + +

    Definition at line 56 of file tex3ds.c.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/docs/html/struct_tex3_d_si___sub_texture.js b/docs/html/struct_tex3_d_si___sub_texture.js new file mode 100644 index 0000000..25fe5d0 --- /dev/null +++ b/docs/html/struct_tex3_d_si___sub_texture.js @@ -0,0 +1,9 @@ +var struct_tex3_d_si___sub_texture = +[ + [ "bottom", "struct_tex3_d_si___sub_texture.html#aa721db515076dc28b60f4f6201525a11", null ], + [ "height", "struct_tex3_d_si___sub_texture.html#ae6806953d4aa73b90b612520434d2c4c", null ], + [ "left", "struct_tex3_d_si___sub_texture.html#a53eced25476f356efaf7beb98b98e5aa", null ], + [ "right", "struct_tex3_d_si___sub_texture.html#a46d27edf058faf56779df4e3e9cdee4e", null ], + [ "top", "struct_tex3_d_si___sub_texture.html#a6cc2b79637333bff9742879bf7bf01d9", null ], + [ "width", "struct_tex3_d_si___sub_texture.html#ac8ad50d7399df3cdfe17ce981c1e9e96", null ] +]; \ No newline at end of file diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/docs/html/sync_off.png differ diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/docs/html/sync_on.png differ diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/docs/html/tab_a.png differ diff --git a/docs/html/tab_ad.png b/docs/html/tab_ad.png new file mode 100644 index 0000000..e34850a Binary files /dev/null and b/docs/html/tab_ad.png differ diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/docs/html/tab_b.png differ diff --git a/docs/html/tab_bd.png b/docs/html/tab_bd.png new file mode 100644 index 0000000..91c2524 Binary files /dev/null and b/docs/html/tab_bd.png differ diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/docs/html/tab_h.png differ diff --git a/docs/html/tab_hd.png b/docs/html/tab_hd.png new file mode 100644 index 0000000..2489273 Binary files /dev/null and b/docs/html/tab_hd.png differ diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/docs/html/tab_s.png differ diff --git a/docs/html/tab_sd.png b/docs/html/tab_sd.png new file mode 100644 index 0000000..757a565 Binary files /dev/null and b/docs/html/tab_sd.png differ diff --git a/docs/html/tabs.css b/docs/html/tabs.css new file mode 100644 index 0000000..71c8a47 --- /dev/null +++ b/docs/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file diff --git a/docs/html/tex3ds_8c.html b/docs/html/tex3ds_8c.html new file mode 100644 index 0000000..0814ea1 --- /dev/null +++ b/docs/html/tex3ds_8c.html @@ -0,0 +1,444 @@ + + + + + + + +Citro3d: source/tex3ds.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    tex3ds.c File Reference
    +
    +
    + +

    Tex3DS routines. +More...

    +
    #include <tex3ds.h>
    +#include <stdio.h>
    +#include <stdlib.h>
    +#include <string.h>
    +#include <unistd.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + +

    +Classes

    struct  Tex3DS_Texture_s
     Tex3DS texture. More...
     
    struct  Tex3DSi_SubTexture
     
    + + + + + + + + + + + + + + + + + +

    +Functions

    struct __attribute__ ((packed))
     
    Tex3DS_Texture Tex3DS_TextureImport (const void *input, size_t insize, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
     
    Tex3DS_Texture Tex3DS_TextureImportCallback (C3D_Tex *tex, C3D_TexCube *texcube, bool vram, decompressCallback callback, void *userdata)
     
    Tex3DS_Texture Tex3DS_TextureImportFD (int fd, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
     
    Tex3DS_Texture Tex3DS_TextureImportStdio (FILE *fp, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
     
    size_t Tex3DS_GetNumSubTextures (const Tex3DS_Texture texture)
     
    const Tex3DS_SubTexture * Tex3DS_GetSubTexture (const Tex3DS_Texture texture, size_t index)
     
    void Tex3DS_TextureFree (Tex3DS_Texture texture)
     
    + + + +

    +Variables

     Tex3DSi_Header
     
    +

    Detailed Description

    +

    Tex3DS routines.

    + +

    Definition in file tex3ds.c.

    +

    Function Documentation

    + +

    ◆ __attribute__()

    + +
    +
    + + + + + + + + +
    struct __attribute__ ((packed) )
    +
    + +

    Definition at line 1 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_GetNumSubTextures()

    + +
    +
    + + + + + + + + +
    size_t Tex3DS_GetNumSubTextures (const Tex3DS_Texture texture)
    +
    + +

    Definition at line 225 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_GetSubTexture()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    const Tex3DS_SubTexture * Tex3DS_GetSubTexture (const Tex3DS_Texture texture,
    size_t index 
    )
    +
    + +

    Definition at line 231 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_TextureFree()

    + +
    +
    + + + + + + + + +
    void Tex3DS_TextureFree (Tex3DS_Texture texture)
    +
    + +

    Definition at line 238 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_TextureImport()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tex3DS_Texture Tex3DS_TextureImport (const void * input,
    size_t insize,
    C3D_Tex * tex,
    C3D_TexCube * texcube,
    bool vram 
    )
    +
    + +

    Definition at line 201 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_TextureImportCallback()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tex3DS_Texture Tex3DS_TextureImportCallback (C3D_Tex * tex,
    C3D_TexCube * texcube,
    bool vram,
    decompressCallback callback,
    void * userdata 
    )
    +
    + +

    Definition at line 207 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_TextureImportFD()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tex3DS_Texture Tex3DS_TextureImportFD (int fd,
    C3D_Tex * tex,
    C3D_TexCube * texcube,
    bool vram 
    )
    +
    + +

    Definition at line 213 of file tex3ds.c.

    + +
    +
    + +

    ◆ Tex3DS_TextureImportStdio()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tex3DS_Texture Tex3DS_TextureImportStdio (FILE * fp,
    C3D_Tex * tex,
    C3D_TexCube * texcube,
    bool vram 
    )
    +
    + +

    Definition at line 219 of file tex3ds.c.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ Tex3DSi_Header

    + +
    +
    + + + + +
    Tex3DSi_Header
    +
    + +

    Definition at line 52 of file tex3ds.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/tex3ds_8c.js b/docs/html/tex3ds_8c.js new file mode 100644 index 0000000..d002cc4 --- /dev/null +++ b/docs/html/tex3ds_8c.js @@ -0,0 +1,14 @@ +var tex3ds_8c = +[ + [ "Tex3DS_Texture_s", "struct_tex3_d_s___texture__s.html", "struct_tex3_d_s___texture__s" ], + [ "Tex3DSi_SubTexture", "struct_tex3_d_si___sub_texture.html", "struct_tex3_d_si___sub_texture" ], + [ "__attribute__", "tex3ds_8c.html#ab898071398b359603a35c202e9c65f3b", null ], + [ "Tex3DS_GetNumSubTextures", "tex3ds_8c.html#ab2a4089637e155481da431da62646042", null ], + [ "Tex3DS_GetSubTexture", "tex3ds_8c.html#ad3e1b65a79e9a989b8e440570816561d", null ], + [ "Tex3DS_TextureFree", "tex3ds_8c.html#a644ebdcb177b99196c3799b6f6e7b1de", null ], + [ "Tex3DS_TextureImport", "tex3ds_8c.html#aeb2c3487491ef866ff16f6cecde9448d", null ], + [ "Tex3DS_TextureImportCallback", "tex3ds_8c.html#a76fb1ed8388513928ca6e06ada4e7552", null ], + [ "Tex3DS_TextureImportFD", "tex3ds_8c.html#a20dfee0fe7c2ac8b93e95065b64cb76f", null ], + [ "Tex3DS_TextureImportStdio", "tex3ds_8c.html#a2840b76f4ce3a0f86e2d86b37dcb923e", null ], + [ "Tex3DSi_Header", "tex3ds_8c.html#a99529fc03f922130a8bb9d9cd3667b77", null ] +]; \ No newline at end of file diff --git a/docs/html/tex3ds_8c_source.html b/docs/html/tex3ds_8c_source.html new file mode 100644 index 0000000..db138f0 --- /dev/null +++ b/docs/html/tex3ds_8c_source.html @@ -0,0 +1,368 @@ + + + + + + + +Citro3d: source/tex3ds.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    tex3ds.c
    +
    +
    +Go to the documentation of this file.
    1/*------------------------------------------------------------------------------
    +
    2 * Copyright (c) 2017
    +
    3 * Michael Theall (mtheall)
    +
    4 *
    +
    5 * This file is part of citro3d.
    +
    6 *
    +
    7 * This software is provided 'as-is', without any express or implied warranty.
    +
    8 * In no event will the authors be held liable for any damages arising from the
    +
    9 * use of this software.
    +
    10 *
    +
    11 * Permission is granted to anyone to use this software for any purpose,
    +
    12 * including commercial applications, and to alter it and redistribute it
    +
    13 * freely, subject to the following restrictions:
    +
    14 *
    +
    15 * 1. The origin of this software must not be misrepresented; you must not
    +
    16 * claim that you wrote the original software. If you use this software in
    +
    17 * a product, an acknowledgment in the product documentation would be
    +
    18 * appreciated but is not required.
    +
    19 * 2. Altered source versions must be plainly marked as such, and must not be
    +
    20 * misrepresented as being the original software.
    +
    21 * 3. This notice may not be removed or altered from any source distribution.
    +
    22 *----------------------------------------------------------------------------*/
    +
    26#include <tex3ds.h>
    +
    27#include <stdio.h>
    +
    28#include <stdlib.h>
    +
    29#include <string.h>
    +
    30#include <unistd.h>
    +
    31
    + +
    35{
    + +
    37 u16 width;
    +
    38 u16 height;
    +
    39 u8 format;
    + +
    41 Tex3DS_SubTexture subTextures[];
    +
    42};
    +
    43
    +
    44typedef struct __attribute__((packed))
    +
    45{
    +
    46 u16 numSubTextures;
    +
    47 u8 width_log2 : 3;
    +
    48 u8 height_log2 : 3;
    +
    49 u8 type : 1;
    +
    50 u8 format;
    +
    51 u8 mipmapLevels;
    + +
    53
    +
    54typedef struct
    +
    55{
    +
    56 u16 width, height;
    +
    57 u16 left, top, right, bottom;
    + +
    59
    +
    60static inline bool Tex3DSi_ReadData(decompressCallback callback, void** userdata, void* buffer, size_t size, size_t* insize)
    +
    61{
    +
    62 if (callback)
    +
    63 return callback(*userdata, buffer, size) == size;
    +
    64 if (size > *insize)
    +
    65 return false;
    +
    66
    +
    67 memcpy(buffer, *userdata, size);
    +
    68 *userdata = (u8*)*userdata + size;
    +
    69 *insize -= size;
    +
    70 return true;
    +
    71}
    +
    72
    +
    73static Tex3DS_Texture
    +
    74Tex3DSi_ImportCommon(C3D_Tex* tex, C3D_TexCube* texcube, bool vram, decompressCallback callback, void* userdata, size_t insize)
    +
    75{
    +
    76 // Read header
    + +
    78 if (!Tex3DSi_ReadData(callback, &userdata, &hdr, sizeof(hdr), &insize))
    +
    79 return NULL;
    +
    80
    +
    81 // Allocate space for header + subtextures
    +
    82 Tex3DS_Texture texture = (Tex3DS_Texture)malloc(sizeof(struct Tex3DS_Texture_s) + hdr.numSubTextures*sizeof(Tex3DS_SubTexture));
    +
    83 if (!texture)
    +
    84 return NULL;
    +
    85
    +
    86 // Fill texture metadata structure
    +
    87 texture->numSubTextures = hdr.numSubTextures;
    +
    88 texture->width = 1 << (hdr.width_log2 + 3);
    +
    89 texture->height = 1 << (hdr.height_log2 + 3);
    +
    90 texture->format = hdr.format;
    +
    91 texture->mipmapLevels = hdr.mipmapLevels;
    +
    92
    +
    93 // Read subtexture info
    +
    94 for (size_t i = 0; i < hdr.numSubTextures; i ++)
    +
    95 {
    +
    96 Tex3DSi_SubTexture subtex;
    +
    97 if (!Tex3DSi_ReadData(callback, &userdata, &subtex, sizeof(Tex3DSi_SubTexture), &insize))
    +
    98 {
    +
    99 free(texture);
    +
    100 return NULL;
    +
    101 }
    +
    102 texture->subTextures[i].width = subtex.width;
    +
    103 texture->subTextures[i].height = subtex.height;
    +
    104 texture->subTextures[i].left = subtex.left / 1024.0f;
    +
    105 texture->subTextures[i].top = subtex.top / 1024.0f;
    +
    106 texture->subTextures[i].right = subtex.right / 1024.0f;
    +
    107 texture->subTextures[i].bottom = subtex.bottom / 1024.0f;
    +
    108 }
    +
    109
    +
    110 // Allocate texture memory
    +
    111 C3D_TexInitParams params;
    +
    112 params.width = texture->width;
    +
    113 params.height = texture->height;
    +
    114 params.maxLevel = texture->mipmapLevels;
    +
    115 params.format = texture->format;
    +
    116 params.type = (GPU_TEXTURE_MODE_PARAM)hdr.type;
    +
    117 params.onVram = vram;
    +
    118 if (!C3D_TexInitWithParams(tex, texcube, params))
    +
    119 {
    +
    120 free(texture);
    +
    121 return NULL;
    +
    122 }
    +
    123
    +
    124 // Get texture size, including mipmaps
    +
    125 size_t base_texsize = C3D_TexCalcTotalSize(tex->size, texture->mipmapLevels);
    +
    126 size_t texsize = base_texsize;
    +
    127
    +
    128 // If this is a cubemap/skybox, there are 6 textures
    +
    129 if (params.type == GPU_TEX_CUBE_MAP)
    +
    130 texsize *= 6;
    +
    131
    +
    132 if (vram)
    +
    133 {
    +
    134 // Allocate staging buffer in linear memory
    +
    135 void* texdata = linearAlloc(texsize);
    +
    136 if (!texdata)
    +
    137 {
    +
    138 C3D_TexDelete(tex);
    +
    139 free(texture);
    +
    140 return NULL;
    +
    141 }
    +
    142
    +
    143 // Decompress into staging buffer for VRAM upload
    +
    144 if (!decompress(texdata, texsize, callback, userdata, insize))
    +
    145 {
    +
    146 linearFree(texdata);
    +
    147 C3D_TexDelete(tex);
    +
    148 free(texture);
    +
    149 return NULL;
    +
    150 }
    +
    151
    +
    152 // Flush buffer to prepare DMA to VRAM
    +
    153 GSPGPU_FlushDataCache(texdata, texsize);
    +
    154
    +
    155 size_t texcount = 1;
    +
    156 if (params.type == GPU_TEX_CUBE_MAP)
    +
    157 texcount = 6;
    +
    158
    +
    159 // Upload texture(s) to VRAM
    +
    160 for (size_t i = 0; i < texcount; ++i)
    +
    161 C3D_TexLoadImage(tex, (u8*)texdata + i * base_texsize, i, -1);
    +
    162
    +
    163 linearFree(texdata);
    +
    164 } else if (params.type == GPU_TEX_CUBE_MAP)
    +
    165 {
    +
    166 decompressIOVec iov[6];
    +
    167
    +
    168 // Setup IO vectors
    +
    169 for (size_t i = 0; i < 6; ++i)
    +
    170 {
    +
    171 u32 size;
    +
    172 iov[i].data = C3D_TexCubeGetImagePtr(tex, i, -1, &size);
    +
    173 iov[i].size = size;
    +
    174 }
    +
    175
    +
    176 // Decompress into texture memory
    +
    177 if (!decompressV(iov, 6, callback, userdata, insize))
    +
    178 {
    +
    179 C3D_TexDelete(tex);
    +
    180 free(texture);
    +
    181 return NULL;
    +
    182 }
    +
    183 } else
    +
    184 {
    +
    185 u32 size;
    +
    186 void* data = C3D_Tex2DGetImagePtr(tex, -1, &size);
    +
    187
    +
    188 // Decompress into texture memory
    +
    189 if (!decompress(data, size, callback, userdata, insize))
    +
    190 {
    +
    191 C3D_TexDelete(tex);
    +
    192 free(texture);
    +
    193 return NULL;
    +
    194 }
    +
    195 }
    +
    196
    +
    197 return texture;
    +
    198}
    +
    199
    +
    200Tex3DS_Texture
    +
    201Tex3DS_TextureImport(const void* input, size_t insize, C3D_Tex* tex, C3D_TexCube* texcube, bool vram)
    +
    202{
    +
    203 return Tex3DSi_ImportCommon(tex, texcube, vram, NULL, (void*)input, insize);
    +
    204}
    +
    205
    +
    206Tex3DS_Texture
    +
    207Tex3DS_TextureImportCallback(C3D_Tex* tex, C3D_TexCube* texcube, bool vram, decompressCallback callback, void* userdata)
    +
    208{
    +
    209 return Tex3DSi_ImportCommon(tex, texcube, vram, callback, userdata, 0);
    +
    210}
    +
    211
    +
    212Tex3DS_Texture
    +
    213Tex3DS_TextureImportFD(int fd, C3D_Tex* tex, C3D_TexCube* texcube, bool vram)
    +
    214{
    +
    215 return Tex3DSi_ImportCommon(tex, texcube, vram, decompressCallback_FD, &fd, 0);
    +
    216}
    +
    217
    +
    218Tex3DS_Texture
    +
    219Tex3DS_TextureImportStdio(FILE* fp, C3D_Tex* tex, C3D_TexCube* texcube, bool vram)
    +
    220{
    +
    221 return Tex3DSi_ImportCommon(tex, texcube, vram, decompressCallback_Stdio, fp, 0);
    +
    222}
    +
    223
    +
    224size_t
    +
    225Tex3DS_GetNumSubTextures(const Tex3DS_Texture texture)
    +
    226{
    +
    227 return texture->numSubTextures;
    +
    228}
    +
    229
    +
    230const Tex3DS_SubTexture*
    +
    231Tex3DS_GetSubTexture(const Tex3DS_Texture texture, size_t index)
    +
    232{
    +
    233 if (index < texture->numSubTextures)
    +
    234 return &texture->subTextures[index];
    +
    235 return NULL;
    +
    236}
    +
    237
    +
    238void Tex3DS_TextureFree(Tex3DS_Texture texture)
    +
    239{
    +
    240 free(texture);
    +
    241}
    +
    Tex3DS texture.
    Definition: tex3ds.c:35
    +
    u16 numSubTextures
    Number of subtextures.
    Definition: tex3ds.c:36
    +
    u16 width
    Texture width.
    Definition: tex3ds.c:37
    +
    u16 height
    Texture height.
    Definition: tex3ds.c:38
    +
    u8 mipmapLevels
    Number of mipmaps.
    Definition: tex3ds.c:40
    +
    u8 format
    Texture format.
    Definition: tex3ds.c:39
    +
    Tex3DS_SubTexture subTextures[]
    Subtextures.
    Definition: tex3ds.c:41
    + + + + + + + +
    Tex3DS_Texture Tex3DS_TextureImportFD(int fd, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
    Definition: tex3ds.c:213
    +
    Tex3DS_Texture Tex3DS_TextureImportStdio(FILE *fp, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
    Definition: tex3ds.c:219
    +
    void Tex3DS_TextureFree(Tex3DS_Texture texture)
    Definition: tex3ds.c:238
    +
    Tex3DS_Texture Tex3DS_TextureImportCallback(C3D_Tex *tex, C3D_TexCube *texcube, bool vram, decompressCallback callback, void *userdata)
    Definition: tex3ds.c:207
    +
    Tex3DSi_Header
    Definition: tex3ds.c:52
    +
    size_t Tex3DS_GetNumSubTextures(const Tex3DS_Texture texture)
    Definition: tex3ds.c:225
    +
    struct __attribute__((packed))
    Definition: tex3ds.c:44
    +
    const Tex3DS_SubTexture * Tex3DS_GetSubTexture(const Tex3DS_Texture texture, size_t index)
    Definition: tex3ds.c:231
    +
    Tex3DS_Texture Tex3DS_TextureImport(const void *input, size_t insize, C3D_Tex *tex, C3D_TexCube *texcube, bool vram)
    Definition: tex3ds.c:201
    +
    void C3D_TexLoadImage(C3D_Tex *tex, const void *data, GPU_TEXFACE face, int level)
    Definition: texture.c:112
    +
    void C3D_TexDelete(C3D_Tex *tex)
    Definition: texture.c:242
    +
    bool C3D_TexInitWithParams(C3D_Tex *tex, C3D_TexCube *cube, C3D_TexInitParams p)
    Definition: texture.c:63
    +
    float24Uniform_s * data
    Definition: uniforms.c:16
    +
    +
    + + + + diff --git a/docs/html/texenv_8c.html b/docs/html/texenv_8c.html new file mode 100644 index 0000000..43fc20f --- /dev/null +++ b/docs/html/texenv_8c.html @@ -0,0 +1,277 @@ + + + + + + + +Citro3d: source/texenv.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    texenv.c File Reference
    +
    +
    +
    #include "internal.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + +

    +Functions

    C3D_TexEnv * C3D_GetTexEnv (int id)
     
    void C3D_SetTexEnv (int id, C3D_TexEnv *env)
     
    void C3D_DirtyTexEnv (C3D_TexEnv *env)
     
    void C3Di_TexEnvBind (int id, C3D_TexEnv *env)
     
    void C3D_TexEnvBufUpdate (int mode, int mask)
     
    void C3D_TexEnvBufColor (u32 color)
     
    +

    Function Documentation

    + +

    ◆ C3D_DirtyTexEnv()

    + +
    +
    + + + + + + + + +
    void C3D_DirtyTexEnv (C3D_TexEnv * env)
    +
    + +

    Definition at line 28 of file texenv.c.

    + +
    +
    + +

    ◆ C3D_GetTexEnv()

    + +
    +
    + + + + + + + + +
    C3D_TexEnv * C3D_GetTexEnv (int id)
    +
    + +

    Definition at line 3 of file texenv.c.

    + +
    +
    + +

    ◆ C3D_SetTexEnv()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_SetTexEnv (int id,
    C3D_TexEnv * env 
    )
    +
    + +

    Definition at line 14 of file texenv.c.

    + +
    +
    + +

    ◆ C3D_TexEnvBufColor()

    + +
    +
    + + + + + + + + +
    void C3D_TexEnvBufColor (u32 color)
    +
    + +

    Definition at line 72 of file texenv.c.

    + +
    +
    + +

    ◆ C3D_TexEnvBufUpdate()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_TexEnvBufUpdate (int mode,
    int mask 
    )
    +
    + +

    Definition at line 46 of file texenv.c.

    + +
    +
    + +

    ◆ C3Di_TexEnvBind()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3Di_TexEnvBind (int id,
    C3D_TexEnv * env 
    )
    +
    + +

    Definition at line 40 of file texenv.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/texenv_8c.js b/docs/html/texenv_8c.js new file mode 100644 index 0000000..792fbe5 --- /dev/null +++ b/docs/html/texenv_8c.js @@ -0,0 +1,9 @@ +var texenv_8c = +[ + [ "C3D_DirtyTexEnv", "texenv_8c.html#abc47d36029155ab4065b679bf1bbd978", null ], + [ "C3D_GetTexEnv", "texenv_8c.html#a1b2b631232bfeb820d01e8d5e71d6792", null ], + [ "C3D_SetTexEnv", "texenv_8c.html#a3a2ba49764ebf3e4467d554fe40769e1", null ], + [ "C3D_TexEnvBufColor", "texenv_8c.html#a81588f3622353d3da05dd2ff96e43020", null ], + [ "C3D_TexEnvBufUpdate", "texenv_8c.html#afd650b68579ca331052abb1ee60f8013", null ], + [ "C3Di_TexEnvBind", "texenv_8c.html#acff27a4262a8a3fb39b20f2afd4cccd5", null ] +]; \ No newline at end of file diff --git a/docs/html/texenv_8c_source.html b/docs/html/texenv_8c_source.html new file mode 100644 index 0000000..ccfbdc6 --- /dev/null +++ b/docs/html/texenv_8c_source.html @@ -0,0 +1,201 @@ + + + + + + + +Citro3d: source/texenv.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    texenv.c
    +
    +
    +Go to the documentation of this file.
    1#include "internal.h"
    +
    2
    +
    3C3D_TexEnv* C3D_GetTexEnv(int id)
    +
    4{
    +
    5 C3D_Context* ctx = C3Di_GetContext();
    +
    6
    +
    7 if (!(ctx->flags & C3DiF_Active))
    +
    8 return NULL;
    +
    9
    +
    10 ctx->flags |= C3DiF_TexEnv(id);
    +
    11 return &ctx->texEnv[id];
    +
    12}
    +
    13
    +
    14void C3D_SetTexEnv(int id, C3D_TexEnv* env)
    +
    15{
    +
    16 C3D_Context* ctx = C3Di_GetContext();
    +
    17
    +
    18 if (!(ctx->flags & C3DiF_Active))
    +
    19 return;
    +
    20
    +
    21 ctx->flags |= C3DiF_TexEnv(id);
    +
    22 if (env)
    +
    23 memcpy(&ctx->texEnv[id], env, sizeof(*env));
    +
    24 else
    +
    25 C3D_TexEnvInit(&ctx->texEnv[id]);
    +
    26}
    +
    27
    +
    28void C3D_DirtyTexEnv(C3D_TexEnv* env)
    +
    29{
    +
    30 C3D_Context* ctx = C3Di_GetContext();
    +
    31
    +
    32 if (!(ctx->flags & C3DiF_Active))
    +
    33 return;
    +
    34
    +
    35 u32 id = env-ctx->texEnv;
    +
    36 if (id < 6)
    +
    37 ctx->flags |= C3DiF_TexEnv(id);
    +
    38}
    +
    39
    +
    40void C3Di_TexEnvBind(int id, C3D_TexEnv* env)
    +
    41{
    +
    42 if (id >= 4) id += 2;
    +
    43 GPUCMD_AddIncrementalWrites(GPUREG_TEXENV0_SOURCE + id*8, (u32*)env, sizeof(C3D_TexEnv)/sizeof(u32));
    +
    44}
    +
    45
    +
    46void C3D_TexEnvBufUpdate(int mode, int mask)
    +
    47{
    +
    48 C3D_Context* ctx = C3Di_GetContext();
    +
    49
    +
    50 if (!(ctx->flags & C3DiF_Active))
    +
    51 return;
    +
    52
    +
    53 u32 val = ctx->texEnvBuf;
    +
    54 mask &= 0xF;
    +
    55
    +
    56 if (mode & C3D_RGB)
    +
    57 {
    +
    58 val &= ~(0xF << 8);
    +
    59 val |= mask << 8;
    +
    60 }
    +
    61
    +
    62 if (mode & C3D_Alpha)
    +
    63 {
    +
    64 val &= ~(0xF << 12);
    +
    65 val |= mask << 12;
    +
    66 }
    +
    67
    +
    68 ctx->texEnvBuf = val;
    +
    69 ctx->flags |= C3DiF_TexEnvBuf;
    +
    70}
    +
    71
    +
    72void C3D_TexEnvBufColor(u32 color)
    +
    73{
    +
    74 C3D_Context* ctx = C3Di_GetContext();
    +
    75
    +
    76 if (!(ctx->flags & C3DiF_Active))
    +
    77 return;
    +
    78
    +
    79 ctx->texEnvBufClr = color;
    +
    80 ctx->flags |= C3DiF_TexEnvBuf;
    +
    81}
    + +
    @ C3DiF_Active
    Definition: internal.h:75
    +
    @ C3DiF_TexEnvBuf
    Definition: internal.h:84
    +
    #define C3DiF_TexEnv(n)
    Definition: internal.h:99
    + +
    u32 flags
    Definition: internal.h:38
    +
    u32 texEnvBuf
    Definition: internal.h:51
    +
    C3D_TexEnv texEnv[6]
    Definition: internal.h:49
    +
    u32 texEnvBufClr
    Definition: internal.h:51
    +
    C3D_TexEnv * C3D_GetTexEnv(int id)
    Definition: texenv.c:3
    +
    void C3D_SetTexEnv(int id, C3D_TexEnv *env)
    Definition: texenv.c:14
    +
    void C3D_TexEnvBufColor(u32 color)
    Definition: texenv.c:72
    +
    void C3D_DirtyTexEnv(C3D_TexEnv *env)
    Definition: texenv.c:28
    +
    void C3Di_TexEnvBind(int id, C3D_TexEnv *env)
    Definition: texenv.c:40
    +
    void C3D_TexEnvBufUpdate(int mode, int mask)
    Definition: texenv.c:46
    +
    +
    + + + + diff --git a/docs/html/texture_8c.html b/docs/html/texture_8c.html new file mode 100644 index 0000000..e3ba261 --- /dev/null +++ b/docs/html/texture_8c.html @@ -0,0 +1,370 @@ + + + + + + + +Citro3d: source/texture.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    texture.c File Reference
    +
    +
    +
    #include "internal.h"
    +#include <c3d/renderqueue.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + +

    +Functions

    bool C3D_TexInitWithParams (C3D_Tex *tex, C3D_TexCube *cube, C3D_TexInitParams p)
     
    void C3D_TexLoadImage (C3D_Tex *tex, const void *data, GPU_TEXFACE face, int level)
     
    void C3D_TexGenerateMipmap (C3D_Tex *tex, GPU_TEXFACE face)
     
    void C3D_TexBind (int unitId, C3D_Tex *tex)
     
    void C3D_TexFlush (C3D_Tex *tex)
     
    void C3D_TexDelete (C3D_Tex *tex)
     
    void C3D_TexShadowParams (bool perspective, float bias)
     
    void C3Di_SetTex (int unit, C3D_Tex *tex)
     
    +

    Function Documentation

    + +

    ◆ C3D_TexBind()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_TexBind (int unitId,
    C3D_Tex * tex 
    )
    +
    + +

    Definition at line 222 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexDelete()

    + +
    +
    + + + + + + + + +
    void C3D_TexDelete (C3D_Tex * tex)
    +
    + +

    Definition at line 242 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexFlush()

    + +
    +
    + + + + + + + + +
    void C3D_TexFlush (C3D_Tex * tex)
    +
    + +

    Definition at line 236 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexGenerateMipmap()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_TexGenerateMipmap (C3D_Tex * tex,
    GPU_TEXFACE face 
    )
    +
    + +

    Definition at line 155 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexInitWithParams()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    bool C3D_TexInitWithParams (C3D_Tex * tex,
    C3D_TexCube * cube,
    C3D_TexInitParams p 
    )
    +
    + +

    Definition at line 63 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexLoadImage()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void C3D_TexLoadImage (C3D_Tex * tex,
    const void * data,
    GPU_TEXFACE face,
    int level 
    )
    +
    + +

    Definition at line 112 of file texture.c.

    + +
    +
    + +

    ◆ C3D_TexShadowParams()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3D_TexShadowParams (bool perspective,
    float bias 
    )
    +
    + +

    Definition at line 250 of file texture.c.

    + +
    +
    + +

    ◆ C3Di_SetTex()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void C3Di_SetTex (int unit,
    C3D_Tex * tex 
    )
    +
    + +

    Definition at line 265 of file texture.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/texture_8c.js b/docs/html/texture_8c.js new file mode 100644 index 0000000..4576609 --- /dev/null +++ b/docs/html/texture_8c.js @@ -0,0 +1,11 @@ +var texture_8c = +[ + [ "C3D_TexBind", "texture_8c.html#a360d2c5598e94a10dbd1667b02676105", null ], + [ "C3D_TexDelete", "texture_8c.html#accf86ec4d1ab6318cb64dc596cb9961e", null ], + [ "C3D_TexFlush", "texture_8c.html#a2f3af100fa9f63065b10be89b4c75a75", null ], + [ "C3D_TexGenerateMipmap", "texture_8c.html#abc333445dfee8a3418b51249cee58b66", null ], + [ "C3D_TexInitWithParams", "texture_8c.html#afa0b16b43f95e7786bcf85dd9eb4c746", null ], + [ "C3D_TexLoadImage", "texture_8c.html#abfc2aa9643a319accc71ebb559e68891", null ], + [ "C3D_TexShadowParams", "texture_8c.html#ac74ca64e5d72e7bf3d86c9ee61d2d962", null ], + [ "C3Di_SetTex", "texture_8c.html#a9cd92f53a18da481d1ba74f4c9da7dee", null ] +]; \ No newline at end of file diff --git a/docs/html/texture_8c_source.html b/docs/html/texture_8c_source.html new file mode 100644 index 0000000..30e35b1 --- /dev/null +++ b/docs/html/texture_8c_source.html @@ -0,0 +1,423 @@ + + + + + + + +Citro3d: source/texture.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    texture.c
    +
    +
    +Go to the documentation of this file.
    1#include "internal.h"
    +
    2#include <c3d/renderqueue.h>
    +
    3
    +
    4// Return bits per pixel
    +
    5static inline size_t fmtSize(GPU_TEXCOLOR fmt)
    +
    6{
    +
    7 switch (fmt)
    +
    8 {
    +
    9 case GPU_RGBA8:
    +
    10 return 32;
    +
    11 case GPU_RGB8:
    +
    12 return 24;
    +
    13 case GPU_RGBA5551:
    +
    14 case GPU_RGB565:
    +
    15 case GPU_RGBA4:
    +
    16 case GPU_LA8:
    +
    17 case GPU_HILO8:
    +
    18 return 16;
    +
    19 case GPU_L8:
    +
    20 case GPU_A8:
    +
    21 case GPU_LA4:
    +
    22 case GPU_ETC1A4:
    +
    23 return 8;
    +
    24 case GPU_L4:
    +
    25 case GPU_A4:
    +
    26 case GPU_ETC1:
    +
    27 return 4;
    +
    28 default:
    +
    29 return 0;
    +
    30 }
    +
    31}
    +
    32
    +
    33static inline bool checkTexSize(u32 size)
    +
    34{
    +
    35 if (size < 8 || size > 1024)
    +
    36 return false;
    +
    37 if (size & (size-1))
    +
    38 return false;
    +
    39 return true;
    +
    40}
    +
    41
    +
    42static inline void allocFree(void* addr)
    +
    43{
    +
    44 if (addrIsVRAM(addr))
    +
    45 vramFree(addr);
    +
    46 else
    +
    47 linearFree(addr);
    +
    48}
    +
    49
    +
    50static void C3Di_TexCubeDelete(C3D_TexCube* cube)
    +
    51{
    +
    52 int i;
    +
    53 for (i = 0; i < 6; i ++)
    +
    54 {
    +
    55 if (cube->data[i])
    +
    56 {
    +
    57 allocFree(cube->data[i]);
    +
    58 cube->data[i] = NULL;
    +
    59 }
    +
    60 }
    +
    61}
    +
    62
    +
    63bool C3D_TexInitWithParams(C3D_Tex* tex, C3D_TexCube* cube, C3D_TexInitParams p)
    +
    64{
    +
    65 if (!checkTexSize(p.width) || !checkTexSize(p.height)) return false;
    +
    66
    +
    67 bool isCube = typeIsCube(p.type);
    +
    68 if (isCube && !cube) return false;
    +
    69
    +
    70 u32 size = fmtSize(p.format);
    +
    71 if (!size) return false;
    +
    72 size *= (u32)p.width * p.height / 8;
    +
    73 u32 total_size = C3D_TexCalcTotalSize(size, p.maxLevel);
    +
    74
    +
    75 if (!isCube)
    +
    76 {
    +
    77 tex->data = p.onVram ? vramAlloc(total_size) : linearAlloc(total_size);
    +
    78 if (!tex->data) return false;
    +
    79 } else
    +
    80 {
    +
    81 memset(cube, 0, sizeof(*cube));
    +
    82 int i;
    +
    83 for (i = 0; i < 6; i ++)
    +
    84 {
    +
    85 cube->data[i] = p.onVram ? vramAlloc(total_size) : linearAlloc(total_size);
    +
    86 if (!cube->data[i] ||
    +
    87 (i>0 && (((u32)cube->data[0] ^ (u32)cube->data[i])>>(3+22)))) // Check upper 6bits match with first face
    +
    88 {
    +
    89 C3Di_TexCubeDelete(cube);
    +
    90 return false;
    +
    91 }
    +
    92 }
    +
    93 tex->cube = cube;
    +
    94 }
    +
    95
    +
    96 tex->width = p.width;
    +
    97 tex->height = p.height;
    +
    98 tex->param = GPU_TEXTURE_MODE(p.type);
    +
    99 if (p.format == GPU_ETC1)
    +
    100 tex->param |= GPU_TEXTURE_ETC1_PARAM;
    +
    101 if (p.type == GPU_TEX_SHADOW_2D || p.type == GPU_TEX_SHADOW_CUBE)
    +
    102 tex->param |= GPU_TEXTURE_SHADOW_PARAM;
    +
    103 tex->fmt = p.format;
    +
    104 tex->size = size;
    +
    105 tex->border = 0;
    +
    106 tex->lodBias = 0;
    +
    107 tex->maxLevel = p.maxLevel;
    +
    108 tex->minLevel = 0;
    +
    109 return true;
    +
    110}
    +
    111
    +
    112void C3D_TexLoadImage(C3D_Tex* tex, const void* data, GPU_TEXFACE face, int level)
    +
    113{
    +
    114 u32 size = 0;
    +
    115 void* out = C3D_TexGetImagePtr(tex,
    +
    116 C3Di_TexIs2D(tex) ? tex->data : tex->cube->data[face],
    +
    117 level, &size);
    +
    118
    +
    119 if (!addrIsVRAM(out))
    +
    120 memcpy(out, data, size);
    +
    121 else
    +
    122 C3D_SyncTextureCopy((u32*)data, 0, (u32*)out, 0, size, 8);
    +
    123}
    +
    124
    +
    125static void C3Di_DownscaleRGBA8(u32* dst, const u32* src[4])
    +
    126{
    +
    127 u32 i, j;
    +
    128 for (i = 0; i < 64; i ++)
    +
    129 {
    +
    130 const u32* a = src[i>>4] + (i<<2 & 0x3F);
    +
    131 u32 dest = 0;
    +
    132 for (j = 0; j < 32; j += 8)
    +
    133 {
    +
    134 u32 val = (((a[0]>>j)&0xFF)+((a[1]>>j)&0xFF)+((a[2]>>j)&0xFF)+((a[3]>>j)&0xFF))>>2;
    +
    135 dest |= val<<j;
    +
    136 }
    +
    137 *dst++ = dest;
    +
    138 }
    +
    139}
    +
    140
    +
    141static void C3Di_DownscaleRGB8(u8* dst, const u8* src[4])
    +
    142{
    +
    143 u32 i, j;
    +
    144 for (i = 0; i < 64; i ++)
    +
    145 {
    +
    146 const u8* a = src[i>>4] + 3*(i<<2 & 0x3F);
    +
    147 for (j = 0; j < 3; j ++)
    +
    148 {
    +
    149 *dst++ = ((u32)a[0] + a[3] + a[6] + a[9])>>2;
    +
    150 a++;
    +
    151 }
    +
    152 }
    +
    153}
    +
    154
    +
    155void C3D_TexGenerateMipmap(C3D_Tex* tex, GPU_TEXFACE face)
    +
    156{
    +
    157 int fmt = tex->fmt;
    +
    158 size_t block_size = (8*8*fmtSize(fmt))/8;
    +
    159
    +
    160 /*
    +
    161 const u32 transfer_flags =
    +
    162 GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_XY) | BIT(5) |
    +
    163 GX_TRANSFER_IN_FORMAT(tex->fmt) | GX_TRANSFER_OUT_FORMAT(tex->fmt);
    +
    164 */
    +
    165
    +
    166 void* src = C3Di_TexIs2D(tex) ? tex->data : tex->cube->data[face];
    +
    167 if (addrIsVRAM(src))
    +
    168 return; // CPU can't write to VRAM
    +
    169
    +
    170 int i;
    +
    171 u32 level_size = tex->size;
    +
    172 u32 src_width = tex->width;
    +
    173 u32 src_height = tex->height;
    +
    174 for (i = 0; i < tex->maxLevel; i ++)
    +
    175 {
    +
    176 void* dst = (u8*)src + level_size;
    +
    177 u32 dst_width = src_width>>1;
    +
    178 u32 dst_height = src_height>>1;
    +
    179
    +
    180 /* Doesn't work due to size restriction bullshit
    +
    181 C3D_SyncDisplayTransfer(
    +
    182 (u32*)src, GX_BUFFER_DIM(src_width,src_height),
    +
    183 (u32*)dst, GX_BUFFER_DIM(dst_width,dst_height),
    +
    184 transfer_flags);
    +
    185 */
    +
    186
    +
    187 u32 i,j;
    +
    188 u32 src_stride = src_width/8;
    +
    189 u32 dst_stride = dst_width/8;
    +
    190 for (j = 0; j < (dst_height/8); j ++)
    +
    191 {
    +
    192 for (i = 0; i < dst_stride; i ++)
    +
    193 {
    +
    194 void* dst_block = (u8*)dst + block_size*(i + j*dst_stride);
    +
    195 const void* src_blocks[4] =
    +
    196 {
    +
    197 (u8*)src + block_size*(2*i+0 + (2*j+0)*src_stride),
    +
    198 (u8*)src + block_size*(2*i+1 + (2*j+0)*src_stride),
    +
    199 (u8*)src + block_size*(2*i+0 + (2*j+1)*src_stride),
    +
    200 (u8*)src + block_size*(2*i+1 + (2*j+1)*src_stride),
    +
    201 };
    +
    202 switch (fmt)
    +
    203 {
    +
    204 case GPU_RGBA8:
    +
    205 C3Di_DownscaleRGBA8(dst_block, (const u32**)src_blocks);
    +
    206 break;
    +
    207 case GPU_RGB8:
    +
    208 C3Di_DownscaleRGB8(dst_block, (const u8**)src_blocks);
    +
    209 default:
    +
    210 break;
    +
    211 }
    +
    212 }
    +
    213 }
    +
    214
    +
    215 level_size >>= 2;
    +
    216 src = dst;
    +
    217 src_width = dst_width;
    +
    218 src_height = dst_height;
    +
    219 }
    +
    220}
    +
    221
    +
    222void C3D_TexBind(int unitId, C3D_Tex* tex)
    +
    223{
    +
    224 C3D_Context* ctx = C3Di_GetContext();
    +
    225
    +
    226 if (!(ctx->flags & C3DiF_Active))
    +
    227 return;
    +
    228
    +
    229 if (unitId > 0 && C3D_TexGetType(tex) != GPU_TEX_2D)
    +
    230 return;
    +
    231
    +
    232 ctx->flags |= C3DiF_Tex(unitId);
    +
    233 ctx->tex[unitId] = tex;
    +
    234}
    +
    235
    +
    236void C3D_TexFlush(C3D_Tex* tex)
    +
    237{
    +
    238 if (!addrIsVRAM(tex->data))
    +
    239 GSPGPU_FlushDataCache(tex->data, C3D_TexCalcTotalSize(tex->size, tex->maxLevel));
    +
    240}
    +
    241
    +
    242void C3D_TexDelete(C3D_Tex* tex)
    +
    243{
    +
    244 if (C3Di_TexIs2D(tex))
    +
    245 allocFree(tex->data);
    +
    246 else
    +
    247 C3Di_TexCubeDelete(tex->cube);
    +
    248}
    +
    249
    +
    250void C3D_TexShadowParams(bool perspective, float bias)
    +
    251{
    +
    252 C3D_Context* ctx = C3Di_GetContext();
    +
    253
    +
    254 if (!(ctx->flags & C3DiF_Active))
    +
    255 return;
    +
    256
    +
    257 u32 iBias = (u32)(fabs(bias) * BIT(24));
    +
    258 if (iBias >= BIT(24))
    +
    259 iBias = BIT(24)-1;
    +
    260
    +
    261 ctx->texShadow = (iBias &~ 1) | (perspective ? 0 : 1);
    +
    262 ctx->flags |= C3DiF_TexStatus;
    +
    263}
    +
    264
    +
    265void C3Di_SetTex(int unit, C3D_Tex* tex)
    +
    266{
    +
    267 u32 reg[10];
    +
    268 u32 regcount = 5;
    +
    269 reg[0] = tex->border;
    +
    270 reg[1] = tex->dim;
    +
    271 reg[2] = tex->param;
    +
    272 reg[3] = tex->lodParam;
    +
    273 if (C3Di_TexIs2D(tex))
    +
    274 reg[4] = osConvertVirtToPhys(tex->data) >> 3;
    +
    275 else
    +
    276 {
    +
    277 int i;
    +
    278 C3D_TexCube* cube = tex->cube;
    +
    279 regcount = 10;
    +
    280 reg[4] = osConvertVirtToPhys(cube->data[0]) >> 3;
    +
    281 for (i = 1; i < 6; i ++)
    +
    282 reg[4+i] = (osConvertVirtToPhys(cube->data[i]) >> 3) & 0x3FFFFF;
    +
    283 }
    +
    284
    +
    285 switch (unit)
    +
    286 {
    +
    287 case 0:
    +
    288 GPUCMD_AddIncrementalWrites(GPUREG_TEXUNIT0_BORDER_COLOR, reg, regcount);
    +
    289 GPUCMD_AddWrite(GPUREG_TEXUNIT0_TYPE, tex->fmt);
    +
    290 break;
    +
    291 case 1:
    +
    292 GPUCMD_AddIncrementalWrites(GPUREG_TEXUNIT1_BORDER_COLOR, reg, 5);
    +
    293 GPUCMD_AddWrite(GPUREG_TEXUNIT1_TYPE, tex->fmt);
    +
    294 break;
    +
    295 case 2:
    +
    296 GPUCMD_AddIncrementalWrites(GPUREG_TEXUNIT2_BORDER_COLOR, reg, 5);
    +
    297 GPUCMD_AddWrite(GPUREG_TEXUNIT2_TYPE, tex->fmt);
    +
    298 break;
    +
    299 }
    +
    300}
    + +
    @ C3DiF_Active
    Definition: internal.h:75
    +
    @ C3DiF_TexStatus
    Definition: internal.h:88
    +
    #define C3DiF_Tex(n)
    Definition: internal.h:97
    +
    void C3D_SyncTextureCopy(u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 size, u32 flags)
    Definition: renderqueue.c:430
    + +
    u32 flags
    Definition: internal.h:38
    +
    C3D_Tex * tex[3]
    Definition: internal.h:48
    +
    u32 texShadow
    Definition: internal.h:47
    +
    void C3D_TexFlush(C3D_Tex *tex)
    Definition: texture.c:236
    +
    void C3D_TexBind(int unitId, C3D_Tex *tex)
    Definition: texture.c:222
    +
    void C3Di_SetTex(int unit, C3D_Tex *tex)
    Definition: texture.c:265
    +
    void C3D_TexGenerateMipmap(C3D_Tex *tex, GPU_TEXFACE face)
    Definition: texture.c:155
    +
    void C3D_TexLoadImage(C3D_Tex *tex, const void *data, GPU_TEXFACE face, int level)
    Definition: texture.c:112
    +
    void C3D_TexShadowParams(bool perspective, float bias)
    Definition: texture.c:250
    +
    void C3D_TexDelete(C3D_Tex *tex)
    Definition: texture.c:242
    +
    bool C3D_TexInitWithParams(C3D_Tex *tex, C3D_TexCube *cube, C3D_TexInitParams p)
    Definition: texture.c:63
    +
    float24Uniform_s * data
    Definition: uniforms.c:16
    +
    +
    + + + + diff --git a/docs/html/uniforms_8c.html b/docs/html/uniforms_8c.html new file mode 100644 index 0000000..07e0a93 --- /dev/null +++ b/docs/html/uniforms_8c.html @@ -0,0 +1,365 @@ + + + + + + + +Citro3d: source/uniforms.c File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    uniforms.c File Reference
    +
    +
    +
    #include "internal.h"
    +#include <c3d/uniforms.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + +

    +Functions

    void C3D_UpdateUniforms (GPU_SHADER_TYPE type)
     
    void C3Di_DirtyUniforms (GPU_SHADER_TYPE type)
     
    void C3Di_LoadShaderUniforms (shaderInstance_s *si)
     
    void C3Di_ClearShaderUniforms (GPU_SHADER_TYPE type)
     
    + + + + + + + + + + + + + +

    +Variables

    C3D_FVec C3D_FVUnif [2][C3D_FVUNIF_COUNT]
     
    C3D_IVec C3D_IVUnif [2][C3D_IVUNIF_COUNT]
     
    u16 C3D_BoolUnifs [2]
     
    bool C3D_FVUnifDirty [2][C3D_FVUNIF_COUNT]
     
    bool C3D_IVUnifDirty [2][C3D_IVUNIF_COUNT]
     
    bool C3D_BoolUnifsDirty [2]
     
    +

    Function Documentation

    + +

    ◆ C3D_UpdateUniforms()

    + +
    +
    + + + + + + + + +
    void C3D_UpdateUniforms (GPU_SHADER_TYPE type)
    +
    + +

    Definition at line 22 of file uniforms.c.

    + +
    +
    + +

    ◆ C3Di_ClearShaderUniforms()

    + +
    +
    + + + + + + + + +
    void C3Di_ClearShaderUniforms (GPU_SHADER_TYPE type)
    +
    + +

    Definition at line 129 of file uniforms.c.

    + +
    +
    + +

    ◆ C3Di_DirtyUniforms()

    + +
    +
    + + + + + + + + +
    void C3Di_DirtyUniforms (GPU_SHADER_TYPE type)
    +
    + +

    Definition at line 87 of file uniforms.c.

    + +
    +
    + +

    ◆ C3Di_LoadShaderUniforms()

    + +
    +
    + + + + + + + + +
    void C3Di_LoadShaderUniforms (shaderInstance_s * si)
    +
    + +

    Definition at line 99 of file uniforms.c.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ C3D_BoolUnifs

    + +
    +
    + + + + +
    u16 C3D_BoolUnifs[2]
    +
    + +

    Definition at line 6 of file uniforms.c.

    + +
    +
    + +

    ◆ C3D_BoolUnifsDirty

    + +
    +
    + + + + +
    bool C3D_BoolUnifsDirty[2]
    +
    + +

    Definition at line 10 of file uniforms.c.

    + +
    +
    + +

    ◆ C3D_FVUnif

    + +
    +
    + + + + +
    C3D_FVec C3D_FVUnif[2][C3D_FVUNIF_COUNT]
    +
    + +

    Definition at line 4 of file uniforms.c.

    + +
    +
    + +

    ◆ C3D_FVUnifDirty

    + +
    +
    + + + + +
    bool C3D_FVUnifDirty[2][C3D_FVUNIF_COUNT]
    +
    + +

    Definition at line 8 of file uniforms.c.

    + +
    +
    + +

    ◆ C3D_IVUnif

    + +
    +
    + + + + +
    C3D_IVec C3D_IVUnif[2][C3D_IVUNIF_COUNT]
    +
    + +

    Definition at line 5 of file uniforms.c.

    + +
    +
    + +

    ◆ C3D_IVUnifDirty

    + +
    +
    + + + + +
    bool C3D_IVUnifDirty[2][C3D_IVUNIF_COUNT]
    +
    + +

    Definition at line 9 of file uniforms.c.

    + +
    +
    + +

    ◆ count

    + +
    +
    + + + + +
    int count
    +
    + +

    Definition at line 15 of file uniforms.c.

    + +
    +
    + +

    ◆ data

    + +
    +
    + + + + +
    float24Uniform_s* data
    +
    + +

    Definition at line 16 of file uniforms.c.

    + +
    +
    + +

    ◆ dirty

    + +
    +
    + + + + +
    bool dirty
    +
    + +

    Definition at line 14 of file uniforms.c.

    + +
    +
    +
    +
    + + + + diff --git a/docs/html/uniforms_8c.js b/docs/html/uniforms_8c.js new file mode 100644 index 0000000..7be9a5e --- /dev/null +++ b/docs/html/uniforms_8c.js @@ -0,0 +1,16 @@ +var uniforms_8c = +[ + [ "C3D_UpdateUniforms", "uniforms_8c.html#ad274dff39f7bbc80ac20e8b4a36eee46", null ], + [ "C3Di_ClearShaderUniforms", "uniforms_8c.html#ae0d0cabc17e43f2ab2368a390e283759", null ], + [ "C3Di_DirtyUniforms", "uniforms_8c.html#a3122c009e7f6b5e2fb570003212fad73", null ], + [ "C3Di_LoadShaderUniforms", "uniforms_8c.html#a50e19b086244713ca897d5cb8a1a1e86", null ], + [ "C3D_BoolUnifs", "uniforms_8c.html#a24fb0ec4c46efdecc2e6995574a2710a", null ], + [ "C3D_BoolUnifsDirty", "uniforms_8c.html#a807e62b94ee1ecc4e6493dc9f42535fb", null ], + [ "C3D_FVUnif", "uniforms_8c.html#a4629f104f9d87e8028b8d5ea3d0ed694", null ], + [ "C3D_FVUnifDirty", "uniforms_8c.html#a23928fd10014f4e6ef1e444c3c6caf07", null ], + [ "C3D_IVUnif", "uniforms_8c.html#a9d280c31d411cf7cbad513ab162d86c7", null ], + [ "C3D_IVUnifDirty", "uniforms_8c.html#a7d95c86cef9538ab1622d607fc4e6ee2", null ], + [ "count", "uniforms_8c.html#ad43c3812e6d13e0518d9f8b8f463ffcf", null ], + [ "data", "uniforms_8c.html#a872e8b5e85fef9e42007068199581495", null ], + [ "dirty", "uniforms_8c.html#ad25edacba00e4d0666a9959053b7cc10", null ] +]; \ No newline at end of file diff --git a/docs/html/uniforms_8c_source.html b/docs/html/uniforms_8c_source.html new file mode 100644 index 0000000..e33eed8 --- /dev/null +++ b/docs/html/uniforms_8c_source.html @@ -0,0 +1,253 @@ + + + + + + + +Citro3d: source/uniforms.c Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    Citro3d +
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    uniforms.c
    +
    +
    +Go to the documentation of this file.
    1#include "internal.h"
    +
    2#include <c3d/uniforms.h>
    +
    3
    +
    4C3D_FVec C3D_FVUnif[2][C3D_FVUNIF_COUNT];
    +
    5C3D_IVec C3D_IVUnif[2][C3D_IVUNIF_COUNT];
    + +
    7
    +
    8bool C3D_FVUnifDirty[2][C3D_FVUNIF_COUNT];
    +
    9bool C3D_IVUnifDirty[2][C3D_IVUNIF_COUNT];
    + +
    11
    +
    12static struct
    +
    13{
    +
    14 bool dirty;
    +
    15 int count;
    +
    16 float24Uniform_s* data;
    +
    17} C3Di_ShaderFVecData[2];
    +
    18
    +
    19static bool C3Di_FVUnifEverDirty[2][C3D_FVUNIF_COUNT];
    +
    20static bool C3Di_IVUnifEverDirty[2][C3D_IVUNIF_COUNT];
    +
    21
    +
    22void C3D_UpdateUniforms(GPU_SHADER_TYPE type)
    +
    23{
    +
    24 int offset = type == GPU_GEOMETRY_SHADER ? (GPUREG_GSH_BOOLUNIFORM-GPUREG_VSH_BOOLUNIFORM) : 0;
    +
    25 int i = 0;
    +
    26
    +
    27 // Update FVec uniforms that come from shader constants
    +
    28 if (C3Di_ShaderFVecData[type].dirty)
    +
    29 {
    +
    30 while (i < C3Di_ShaderFVecData[type].count)
    +
    31 {
    +
    32 float24Uniform_s* u = &C3Di_ShaderFVecData[type].data[i++];
    +
    33 GPUCMD_AddIncrementalWrites(GPUREG_VSH_FLOATUNIFORM_CONFIG+offset, (u32*)u, 4);
    +
    34 C3D_FVUnifDirty[type][u->id] = false;
    +
    35 }
    +
    36 C3Di_ShaderFVecData[type].dirty = false;
    +
    37 i = 0;
    +
    38 }
    +
    39
    +
    40 // Update FVec uniforms
    +
    41 while (i < C3D_FVUNIF_COUNT)
    +
    42 {
    +
    43 if (!C3D_FVUnifDirty[type][i])
    +
    44 {
    +
    45 i ++;
    +
    46 continue;
    +
    47 }
    +
    48
    +
    49 // Find the number of consecutive dirty uniforms
    +
    50 int j;
    +
    51 for (j = i; j < C3D_FVUNIF_COUNT && C3D_FVUnifDirty[type][j]; j ++);
    +
    52
    +
    53 // Upload the uniforms
    +
    54 GPUCMD_AddWrite(GPUREG_VSH_FLOATUNIFORM_CONFIG+offset, 0x80000000|i);
    +
    55 GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA+offset, (u32*)&C3D_FVUnif[type][i], (j-i)*4);
    +
    56
    +
    57 // Clear the dirty flag
    +
    58 int k;
    +
    59 for (k = i; k < j; k ++)
    +
    60 {
    +
    61 C3D_FVUnifDirty[type][k] = false;
    +
    62 C3Di_FVUnifEverDirty[type][k] = true;
    +
    63 }
    +
    64
    +
    65 // Advance
    +
    66 i = j;
    +
    67 }
    +
    68
    +
    69 // Update IVec uniforms
    +
    70 for (i = 0; i < C3D_IVUNIF_COUNT; i ++)
    +
    71 {
    +
    72 if (!C3D_IVUnifDirty[type][i]) continue;
    +
    73
    +
    74 GPUCMD_AddWrite(GPUREG_VSH_INTUNIFORM_I0+offset+i, C3D_IVUnif[type][i]);
    +
    75 C3D_IVUnifDirty[type][i] = false;
    +
    76 C3Di_IVUnifEverDirty[type][i] = false;
    +
    77 }
    +
    78
    +
    79 // Update bool uniforms
    +
    80 if (C3D_BoolUnifsDirty[type])
    +
    81 {
    +
    82 GPUCMD_AddWrite(GPUREG_VSH_BOOLUNIFORM+offset, 0x7FFF0000 | C3D_BoolUnifs[type]);
    +
    83 C3D_BoolUnifsDirty[type] = false;
    +
    84 }
    +
    85}
    +
    86
    +
    87void C3Di_DirtyUniforms(GPU_SHADER_TYPE type)
    +
    88{
    +
    89 int i;
    +
    90 C3D_BoolUnifsDirty[type] = true;
    +
    91 if (C3Di_ShaderFVecData[type].count)
    +
    92 C3Di_ShaderFVecData[type].dirty = true;
    +
    93 for (i = 0; i < C3D_FVUNIF_COUNT; i ++)
    +
    94 C3D_FVUnifDirty[type][i] = C3D_FVUnifDirty[type][i] || C3Di_FVUnifEverDirty[type][i];
    +
    95 for (i = 0; i < C3D_IVUNIF_COUNT; i ++)
    +
    96 C3D_IVUnifDirty[type][i] = C3D_IVUnifDirty[type][i] || C3Di_IVUnifEverDirty[type][i];
    +
    97}
    +
    98
    +
    99void C3Di_LoadShaderUniforms(shaderInstance_s* si)
    +
    100{
    +
    101 GPU_SHADER_TYPE type = si->dvle->type;
    +
    102 if (si->boolUniformMask)
    +
    103 {
    +
    104 C3D_BoolUnifs[type] &= ~si->boolUniformMask;
    +
    105 C3D_BoolUnifs[type] |= si->boolUniforms;
    +
    106 }
    +
    107
    +
    108 if (type == GPU_GEOMETRY_SHADER)
    +
    109 C3D_BoolUnifs[type] &= ~BIT(15);
    +
    110 C3D_BoolUnifsDirty[type] = true;
    +
    111
    +
    112 if (si->intUniformMask)
    +
    113 {
    +
    114 int i;
    +
    115 for (i = 0; i < 4; i ++)
    +
    116 {
    +
    117 if (si->intUniformMask & BIT(i))
    +
    118 {
    +
    119 C3D_IVUnif[type][i] = si->intUniforms[i];
    +
    120 C3D_IVUnifDirty[type][i] = true;
    +
    121 }
    +
    122 }
    +
    123 }
    +
    124 C3Di_ShaderFVecData[type].dirty = true;
    +
    125 C3Di_ShaderFVecData[type].count = si->numFloat24Uniforms;
    +
    126 C3Di_ShaderFVecData[type].data = si->float24Uniforms;
    +
    127}
    +
    128
    +
    129void C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type)
    +
    130{
    +
    131 C3Di_ShaderFVecData[type].dirty = false;
    +
    132 C3Di_ShaderFVecData[type].count = 0;
    +
    133 C3Di_ShaderFVecData[type].data = NULL;
    +
    134}
    + +
    bool C3D_FVUnifDirty[2][C3D_FVUNIF_COUNT]
    Definition: uniforms.c:8
    +
    u16 C3D_BoolUnifs[2]
    Definition: uniforms.c:6
    +
    void C3Di_DirtyUniforms(GPU_SHADER_TYPE type)
    Definition: uniforms.c:87
    +
    C3D_FVec C3D_FVUnif[2][C3D_FVUNIF_COUNT]
    Definition: uniforms.c:4
    +
    void C3Di_LoadShaderUniforms(shaderInstance_s *si)
    Definition: uniforms.c:99
    +
    bool C3D_IVUnifDirty[2][C3D_IVUNIF_COUNT]
    Definition: uniforms.c:9
    +
    bool C3D_BoolUnifsDirty[2]
    Definition: uniforms.c:10
    +
    float24Uniform_s * data
    Definition: uniforms.c:16
    +
    C3D_IVec C3D_IVUnif[2][C3D_IVUNIF_COUNT]
    Definition: uniforms.c:5
    +
    bool dirty
    Definition: uniforms.c:14
    +
    void C3D_UpdateUniforms(GPU_SHADER_TYPE type)
    Definition: uniforms.c:22
    +
    int count
    Definition: uniforms.c:15
    +
    void C3Di_ClearShaderUniforms(GPU_SHADER_TYPE type)
    Definition: uniforms.c:129
    +
    +
    + + + +