mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-24 14:25:50 +12:00
Merge branch 'GamingProcessingUnit' of github.com:fleroviux/Panda3DS into pica-tev-emulation
This commit is contained in:
commit
170fe9a4b2
1 changed files with 5 additions and 5 deletions
|
@ -28,14 +28,14 @@ struct OutputVertex {
|
||||||
vec3f view; // View vector (for fragment lighting)
|
vec3f view; // View vector (for fragment lighting)
|
||||||
u32 padding2; // Unused
|
u32 padding2; // Unused
|
||||||
vec2f texcoord2; // Texcoords for TU 2
|
vec2f texcoord2; // Texcoords for TU 2
|
||||||
};
|
} s;
|
||||||
|
|
||||||
// The software, non-accelerated vertex loader writes here and then reads specific components from the above struct
|
// The software, non-accelerated vertex loader writes here and then reads specific components from the above struct
|
||||||
f24 raw[0x20];
|
f24 raw[0x20];
|
||||||
};
|
};
|
||||||
OutputVertex() {}
|
OutputVertex() {}
|
||||||
};
|
};
|
||||||
#define ASSERT_POS(member, pos) static_assert(offsetof(OutputVertex, member) == pos * sizeof(f24), "OutputVertex struct is broken!");
|
#define ASSERT_POS(member, pos) static_assert(offsetof(OutputVertex, s.member) == pos * sizeof(f24), "OutputVertex struct is broken!");
|
||||||
|
|
||||||
ASSERT_POS(positions, 0)
|
ASSERT_POS(positions, 0)
|
||||||
ASSERT_POS(quaternion, 4)
|
ASSERT_POS(quaternion, 4)
|
||||||
|
@ -245,9 +245,9 @@ void GPU::drawArrays() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::memcpy(&vertices[i].position, &out.positions, sizeof(vec4f));
|
std::memcpy(&vertices[i].position, &out.s.positions, sizeof(vec4f));
|
||||||
std::memcpy(&vertices[i].colour, &out.colour, sizeof(vec4f));
|
std::memcpy(&vertices[i].colour, &out.s.colour, sizeof(vec4f));
|
||||||
std::memcpy(&vertices[i].UVs, &out.texcoord0, 2 * sizeof(f24));
|
std::memcpy(&vertices[i].UVs, &out.s.texcoord0, 2 * sizeof(f24));
|
||||||
|
|
||||||
//printf("(x, y, z, w) = (%f, %f, %f, %f)\n", (double)vertices[i].position.x(), (double)vertices[i].position.y(), (double)vertices[i].position.z(), (double)vertices[i].position.w());
|
//printf("(x, y, z, w) = (%f, %f, %f, %f)\n", (double)vertices[i].position.x(), (double)vertices[i].position.y(), (double)vertices[i].position.z(), (double)vertices[i].position.w());
|
||||||
//printf("(r, g, b, a) = (%f, %f, %f, %f)\n", (double)vertices[i].colour.r(), (double)vertices[i].colour.g(), (double)vertices[i].colour.b(), (double)vertices[i].colour.a());
|
//printf("(r, g, b, a) = (%f, %f, %f, %f)\n", (double)vertices[i].colour.r(), (double)vertices[i].colour.g(), (double)vertices[i].colour.b(), (double)vertices[i].colour.a());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue