mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): implement draw calls in d3d backend
This commit is contained in:
parent
34c7593ddb
commit
d869c6d898
4 changed files with 78 additions and 0 deletions
|
|
@ -35,6 +35,24 @@ uint32_t CGxDevice::s_alphaRef[] = {
|
|||
|
||||
C3Vector CGxDevice::s_pointScaleIdentity = { 1.0f, 0.0f, 0.0f };
|
||||
|
||||
uint32_t CGxDevice::s_primVtxAdjust[] = {
|
||||
0, // GxPrim_Points
|
||||
0, // GxPrim_Lines
|
||||
1, // GxPrim_LineStrip
|
||||
0, // GxPrim_Triangles
|
||||
2, // GxPrim_TriangleStrip
|
||||
2, // GxPrim_TriangleFan
|
||||
};
|
||||
|
||||
uint32_t CGxDevice::s_primVtxDiv[] = {
|
||||
1, // GxPrim_Points
|
||||
2, // GxPrim_Lines
|
||||
1, // GxPrim_LineStrip
|
||||
3, // GxPrim_Triangles
|
||||
1, // GxPrim_TriangleStrip
|
||||
1, // GxPrim_TriangleFan
|
||||
};
|
||||
|
||||
ShaderConstants CGxDevice::s_shadowConstants[2];
|
||||
|
||||
uint32_t CGxDevice::s_streamPoolSize[] = {
|
||||
|
|
@ -109,6 +127,15 @@ CGxDevice* CGxDevice::NewOpenGl() {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t CGxDevice::PrimCalcCount(EGxPrim primType, uint32_t count) {
|
||||
auto div = CGxDevice::s_primVtxDiv[primType];
|
||||
if (div != 1) {
|
||||
count /= div;
|
||||
}
|
||||
|
||||
return count - CGxDevice::s_primVtxAdjust[primType];
|
||||
}
|
||||
|
||||
CGxDevice::CGxDevice() {
|
||||
// TODO
|
||||
// - implement rest of constructor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue