mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Added support for INT_2_10_10_10_REV format
This commit is contained in:
parent
37deb2674a
commit
5ad69afa8a
4 changed files with 7 additions and 3 deletions
|
@ -110,7 +110,8 @@ static const GLenum ELEMENT_TYPE_TO_GL[gpu::NUM_TYPES] = {
|
|||
GL_UNSIGNED_SHORT,
|
||||
GL_BYTE,
|
||||
GL_UNSIGNED_BYTE,
|
||||
GL_UNSIGNED_BYTE
|
||||
GL_UNSIGNED_BYTE,
|
||||
GL_INT_2_10_10_10_REV,
|
||||
};
|
||||
|
||||
bool checkGLError(const char* name = nullptr);
|
||||
|
|
|
@ -38,6 +38,7 @@ const Element Element::VEC2F_UV{ VEC2, FLOAT, UV };
|
|||
const Element Element::VEC2F_XY{ VEC2, FLOAT, XY };
|
||||
const Element Element::VEC3F_XYZ{ VEC3, FLOAT, XYZ };
|
||||
const Element Element::VEC4F_XYZW{ VEC4, FLOAT, XYZW };
|
||||
const Element Element::VEC4F_W2XYZ10{ VEC4, NINT2_10_10_10, XYZW };
|
||||
const Element Element::INDEX_UINT16 { SCALAR, UINT16, INDEX };
|
||||
const Element Element::INDEX_INT32 { SCALAR, INT32, INDEX };
|
||||
const Element Element::PART_DRAWCALL{ VEC4, UINT32, PART };
|
||||
|
|
|
@ -39,6 +39,7 @@ enum Type : uint8_t {
|
|||
NINT8,
|
||||
NUINT8,
|
||||
NUINT2,
|
||||
NINT2_10_10_10,
|
||||
|
||||
COMPRESSED,
|
||||
|
||||
|
@ -65,6 +66,7 @@ static const int TYPE_SIZE[NUM_TYPES] = {
|
|||
2,
|
||||
1,
|
||||
1,
|
||||
4,
|
||||
|
||||
1
|
||||
};
|
||||
|
@ -86,6 +88,7 @@ static const bool TYPE_IS_INTEGER[NUM_TYPES] = {
|
|||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
|
||||
false,
|
||||
};
|
||||
|
@ -326,6 +329,7 @@ public:
|
|||
static const Element VEC2F_XY;
|
||||
static const Element VEC3F_XYZ;
|
||||
static const Element VEC4F_XYZW;
|
||||
static const Element VEC4F_W2XYZ10;
|
||||
static const Element INDEX_UINT16;
|
||||
static const Element INDEX_INT32;
|
||||
static const Element PART_DRAWCALL;
|
||||
|
|
|
@ -338,8 +338,6 @@ int clipTriangleWithPlane(const Triangle& triangle, const Plane& plane, Triangle
|
|||
int clippedTriangleCount = 0;
|
||||
int i;
|
||||
|
||||
assert(clippedTriangleCount > 0);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
pointDistanceToPlane[i] = plane.distance(triangleVertices[i]);
|
||||
arePointsClipped.set(i, pointDistanceToPlane[i] < 0.0f);
|
||||
|
|
Loading…
Reference in a new issue