mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Added line strip primitive type.
This commit is contained in:
parent
41fae47351
commit
8a354b0785
4 changed files with 9 additions and 2 deletions
|
@ -57,9 +57,10 @@
|
||||||
|
|
||||||
#define BGFX_STATE_PT_TRISTRIP UINT64_C(0x0001000000000000)
|
#define BGFX_STATE_PT_TRISTRIP UINT64_C(0x0001000000000000)
|
||||||
#define BGFX_STATE_PT_LINES UINT64_C(0x0002000000000000)
|
#define BGFX_STATE_PT_LINES UINT64_C(0x0002000000000000)
|
||||||
#define BGFX_STATE_PT_POINTS UINT64_C(0x0003000000000000)
|
#define BGFX_STATE_PT_LINESTRIP UINT64_C(0x0003000000000000)
|
||||||
|
#define BGFX_STATE_PT_POINTS UINT64_C(0x0004000000000000)
|
||||||
#define BGFX_STATE_PT_SHIFT 48
|
#define BGFX_STATE_PT_SHIFT 48
|
||||||
#define BGFX_STATE_PT_MASK UINT64_C(0x0003000000000000)
|
#define BGFX_STATE_PT_MASK UINT64_C(0x0007000000000000)
|
||||||
|
|
||||||
#define BGFX_STATE_POINT_SIZE_SHIFT 52
|
#define BGFX_STATE_POINT_SIZE_SHIFT 52
|
||||||
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x0ff0000000000000)
|
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x0ff0000000000000)
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace bgfx
|
||||||
{ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3, 3, 0 },
|
{ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, 3, 3, 0 },
|
||||||
{ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, 3, 1, 2 },
|
{ D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, 3, 1, 2 },
|
||||||
{ D3D11_PRIMITIVE_TOPOLOGY_LINELIST, 2, 2, 0 },
|
{ D3D11_PRIMITIVE_TOPOLOGY_LINELIST, 2, 2, 0 },
|
||||||
|
{ D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, 2, 1, 1 },
|
||||||
{ D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, 1, 1, 0 },
|
{ D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, 1, 1, 0 },
|
||||||
{ D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED, 0, 0, 0 },
|
{ D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
@ -39,6 +40,7 @@ namespace bgfx
|
||||||
"TriList",
|
"TriList",
|
||||||
"TriStrip",
|
"TriStrip",
|
||||||
"Line",
|
"Line",
|
||||||
|
"LineStrip",
|
||||||
"Point",
|
"Point",
|
||||||
};
|
};
|
||||||
BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
|
BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace bgfx
|
||||||
{ D3DPT_TRIANGLELIST, 3, 3, 0 },
|
{ D3DPT_TRIANGLELIST, 3, 3, 0 },
|
||||||
{ D3DPT_TRIANGLESTRIP, 3, 1, 2 },
|
{ D3DPT_TRIANGLESTRIP, 3, 1, 2 },
|
||||||
{ D3DPT_LINELIST, 2, 2, 0 },
|
{ D3DPT_LINELIST, 2, 2, 0 },
|
||||||
|
{ D3DPT_LINESTRIP, 2, 1, 1 },
|
||||||
{ D3DPT_POINTLIST, 1, 1, 0 },
|
{ D3DPT_POINTLIST, 1, 1, 0 },
|
||||||
{ D3DPRIMITIVETYPE(0), 0, 0, 0 },
|
{ D3DPRIMITIVETYPE(0), 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
@ -34,6 +35,7 @@ namespace bgfx
|
||||||
"TriList",
|
"TriList",
|
||||||
"TriStrip",
|
"TriStrip",
|
||||||
"Line",
|
"Line",
|
||||||
|
"LineStrip",
|
||||||
"Point",
|
"Point",
|
||||||
};
|
};
|
||||||
BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
|
BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace bgfx
|
||||||
{ GL_TRIANGLES, 3, 3, 0 },
|
{ GL_TRIANGLES, 3, 3, 0 },
|
||||||
{ GL_TRIANGLE_STRIP, 3, 1, 2 },
|
{ GL_TRIANGLE_STRIP, 3, 1, 2 },
|
||||||
{ GL_LINES, 2, 2, 0 },
|
{ GL_LINES, 2, 2, 0 },
|
||||||
|
{ GL_LINE_STRIP, 2, 1, 1 },
|
||||||
{ GL_POINTS, 1, 1, 0 },
|
{ GL_POINTS, 1, 1, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@ namespace bgfx
|
||||||
"TriList",
|
"TriList",
|
||||||
"TriStrip",
|
"TriStrip",
|
||||||
"Line",
|
"Line",
|
||||||
|
"LineStrip",
|
||||||
"Point",
|
"Point",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue