Merge branch 'master' into embedded-optimizations-pico
This commit is contained in:
commit
739b78c43d
64 changed files with 9694 additions and 3281 deletions
1328
src/external/pep.h
vendored
Normal file
1328
src/external/pep.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
8
src/external/rlsw.h
vendored
8
src/external/rlsw.h
vendored
|
|
@ -3924,7 +3924,6 @@ static void sw_immediate_set_color(const float color[4])
|
|||
RLSW.primitive.color[2] = color[2];
|
||||
RLSW.primitive.color[3] = color[3];
|
||||
|
||||
RLSW.primitive.hasColorAlpha |= (color[3] < 1.0f);
|
||||
}
|
||||
|
||||
static void sw_immediate_set_texcoord(const float texcoord[2])
|
||||
|
|
@ -3963,6 +3962,9 @@ static void sw_immediate_push_vertex(const float position[4])
|
|||
for (int i = 0; i < 4; i++) vertex->color[i] = RLSW.primitive.color[i];
|
||||
for (int i = 0; i < 2; i++) vertex->texcoord[i] = RLSW.primitive.texcoord[i];
|
||||
|
||||
// Track whether any vertex in this primitive has alpha < 1.0
|
||||
RLSW.primitive.hasColorAlpha |= (vertex->color[3] < 1.0f);
|
||||
|
||||
// Immediate rendering of the primitive if the required number is reached
|
||||
if (RLSW.primitive.vertexCount == SW_PRIMITIVE_VERTEX_COUNT[RLSW.drawMode])
|
||||
{
|
||||
|
|
@ -4341,8 +4343,8 @@ void swScissor(int x, int y, int width, int height)
|
|||
|
||||
RLSW.scClipMin[0] = (2.0f*(float)RLSW.scMin[0]/(float)RLSW.vpSize[0]) - 1.0f;
|
||||
RLSW.scClipMax[0] = (2.0f*(float)RLSW.scMax[0]/(float)RLSW.vpSize[0]) - 1.0f;
|
||||
RLSW.scClipMax[1] = 1.0f - (2.0f*(float)RLSW.scMin[1]/(float)RLSW.vpSize[1]);
|
||||
RLSW.scClipMin[1] = 1.0f - (2.0f*(float)RLSW.scMax[1]/(float)RLSW.vpSize[1]);
|
||||
RLSW.scClipMin[1] = (2.0f*(float)RLSW.scMin[1]/(float)RLSW.vpSize[1]) - 1.0f;
|
||||
RLSW.scClipMax[1] = (2.0f*(float)RLSW.scMax[1]/(float)RLSW.vpSize[1]) - 1.0f;
|
||||
}
|
||||
|
||||
void swClearColor(float r, float g, float b, float a)
|
||||
|
|
|
|||
23
src/external/tinyobj_loader_c.h
vendored
23
src/external/tinyobj_loader_c.h
vendored
|
|
@ -1020,7 +1020,12 @@ static int parseLine(Command *command, const char *p, unsigned int p_len,
|
|||
int triangulate) {
|
||||
char linebuf[4096];
|
||||
const char *token;
|
||||
assert(p_len < 4095);
|
||||
|
||||
// @raysan5:
|
||||
// WARNING: If -DNDEBUG is set when compiling, assertions will not
|
||||
// be present in the compiled binary, replacing by a runtime check
|
||||
//assert(p_len < 4095);
|
||||
if (p_len > 4095) return 0;
|
||||
|
||||
memcpy(linebuf, p, p_len);
|
||||
linebuf[p_len] = '\0';
|
||||
|
|
@ -1102,8 +1107,12 @@ static int parseLine(Command *command, const char *p, unsigned int p_len,
|
|||
tinyobj_vertex_index_t i1;
|
||||
tinyobj_vertex_index_t i2 = f[1];
|
||||
|
||||
assert(3 * num_f < TINYOBJ_MAX_FACES_PER_F_LINE);
|
||||
|
||||
// @raysan5:
|
||||
// WARNING: If -DNDEBUG is set when compiling, assertions will not
|
||||
// be present in the compiled binary, replacing by a runtime check
|
||||
//assert(3 * num_f < TINYOBJ_MAX_FACES_PER_F_LINE);
|
||||
if (3*num_f > TINYOBJ_MAX_FACES_PER_F_LINE) return 0;
|
||||
|
||||
for (k = 2; k < num_f; k++) {
|
||||
i1 = i2;
|
||||
i2 = f[k];
|
||||
|
|
@ -1119,7 +1128,13 @@ static int parseLine(Command *command, const char *p, unsigned int p_len,
|
|||
|
||||
} else {
|
||||
unsigned int k = 0;
|
||||
assert(num_f < TINYOBJ_MAX_FACES_PER_F_LINE);
|
||||
|
||||
// @raysan5:
|
||||
// WARNING: If -DNDEBUG is set when compiling, assertions will not
|
||||
// be present in the compiled binary, replacing by a runtime check
|
||||
//assert(num_f < TINYOBJ_MAX_FACES_PER_F_LINE);
|
||||
if (num_f > TINYOBJ_MAX_FACES_PER_F_LINE) return 0;
|
||||
|
||||
for (k = 0; k < num_f; k++) {
|
||||
command->f[k] = f[k];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue