Yardım clip mask eklentisi için kod çakışması

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

memett4545

Üye
Üye
Mesaj
23
Beğeni
1
Puan
405
Ticaret Puanı
0
merhaba [1] [REVERSED] [Clip Masking] Official sistemler serisi. bu sistemi eklerken bi yerde takıldım
GrpTextInstance.cpp de bende başka sisteme ait kod var if def içinde bu sisteminkini nasıl entegre edebilirim acaba bakabilecek olur mu örnek
GrpTextInstance.cpp bendeki kod:
#ifdef ENABLE_FIX_MOBS_LAG
                const auto tex = pFontTexture->GetTexture(pCurCharInfo->index);
                auto& batchVertices = verticesMap[tex];
#else
                pFontTexture->SelectTexture(pCurCharInfo->index);
                STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture());
#endif

                akVertex[0].u=pCurCharInfo->left;
                akVertex[0].v=pCurCharInfo->top;
                akVertex[1].u=pCurCharInfo->left;
                akVertex[1].v=pCurCharInfo->bottom;
                akVertex[2].u=pCurCharInfo->right;
                akVertex[2].v=pCurCharInfo->top;
                akVertex[3].u=pCurCharInfo->right;
                akVertex[3].v=pCurCharInfo->bottom;

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[3].diffuse = akVertex[2].diffuse = akVertex[1].diffuse = akVertex[0].diffuse = m_dwOutLineColor;
#else
                akVertex[3].color = akVertex[2].color = akVertex[1].color = akVertex[0].color = m_dwOutLineColor;
#endif


                float feather = 0.0f; // m_fFontFeather

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[0].py = fFontSy - feather;
                akVertex[1].py = fFontEy + feather;
                akVertex[2].py = fFontSy - feather;
                akVertex[3].py = fFontEy + feather;

                akVertex[0].px = fFontSx - fFontHalfWeight - feather;
                akVertex[1].px = fFontSx - fFontHalfWeight - feather;
                akVertex[2].px = fFontEx - fFontHalfWeight + feather;
                akVertex[3].px = fFontEx - fFontHalfWeight + feather;
#else
                akVertex[0].y=fFontSy-feather;
                akVertex[1].y=fFontEy+feather;
                akVertex[2].y=fFontSy-feather;
                akVertex[3].y=fFontEy+feather;

                // ¿Ş
                akVertex[0].x=fFontSx-fFontHalfWeight-feather;
                akVertex[1].x=fFontSx-fFontHalfWeight-feather;
                akVertex[2].x=fFontEx-fFontHalfWeight+feather;
                akVertex[3].x=fFontEx-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx + fFontHalfWeight - feather;
                akVertex[1].px = fFontSx + fFontHalfWeight - feather;
                akVertex[2].px = fFontEx + fFontHalfWeight + feather;
                akVertex[3].px = fFontEx + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx+fFontHalfWeight-feather;
                akVertex[1].x=fFontSx+fFontHalfWeight-feather;
                akVertex[2].x=fFontEx+fFontHalfWeight+feather;
                akVertex[3].x=fFontEx+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx - feather;
                akVertex[1].px = fFontSx - feather;
                akVertex[2].px = fFontEx + feather;
                akVertex[3].px = fFontEx + feather;

                akVertex[0].py = fFontSy - fFontHalfWeight - feather;
                akVertex[1].py = fFontEy - fFontHalfWeight + feather;
                akVertex[2].py = fFontSy - fFontHalfWeight - feather;
                akVertex[3].py = fFontEy - fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx-feather;
                akVertex[1].x=fFontSx-feather;
                akVertex[2].x=fFontEx+feather;
                akVertex[3].x=fFontEx+feather;

                // ˤ
                akVertex[0].y=fFontSy-fFontHalfWeight-feather;
                akVertex[1].y=fFontEy-fFontHalfWeight+feather;
                akVertex[2].y=fFontSy-fFontHalfWeight-feather;
                akVertex[3].y=fFontEy-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].py = fFontSy + fFontHalfWeight - feather;
                akVertex[1].py = fFontEy + fFontHalfWeight + feather;
                akVertex[2].py = fFontSy + fFontHalfWeight - feather;
                akVertex[3].py = fFontEy + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                // ¾Æ·¡
                akVertex[0].y=fFontSy+fFontHalfWeight-feather;
                akVertex[1].y=fFontEy+fFontHalfWeight+feather;
                akVertex[2].y=fFontSy+fFontHalfWeight-feather;
                akVertex[3].y=fFontEy+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
            batchVertices.insert(batchVertices.end(),
                std::begin(akVertex), std::end(akVertex));

            fCurX += fFontAdvance;
        }
    }

    for (auto& p : verticesMap)
    {
        STATEMANAGER.SetTexture(0, p.first->GetD3DTexture());
        
        for (auto f = p.second.begin(), l = p.second.end(); f != l; )
        {
            const auto batchCount = std::min<std::size_t>(LARGE_PDT_VERTEX_BUFFER_SIZE,
                l - f);
            
            if (CGraphicBase::SetPDTStream(&*f, batchCount))
            STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0,
                batchCount - 2);       
                f += batchCount;
        }
    }
#else
            if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
            {
                STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
            }

            fCurX += fFontAdvance;
        }
    }
#endif
 
Çözüm
Örnek olarak verdiğiniz kısım için bunu deneyebilirsiniz;

C++:
#if defined(__BL_CLIP_MASK__)
                float su = pCurCharInfo->left;
                float sv = pCurCharInfo->top;
                float eu = pCurCharInfo->right;
                float ev = pCurCharInfo->bottom;

                if (pClipRect)
                {
                    const float width = pCurCharInfo->right - pCurCharInfo->left;
                    const float height = pCurCharInfo->bottom - pCurCharInfo->top;

                    if (fFontEx <= pClipRect->left)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontSx < pClipRect->left)...
Clip Masking'i ENABLE_FIX_MOBS_LAG'a değil, ENABLE_FIX_MOBS_LAG'ı Clip Masking'e entegre etmelisin. Yani önce Clip Masking'i yapıp sonra ENABLE_FIX_MOBS_LAG'ı __BL_CLIP_MASK__ definesinin içindeki ilglili kısımlara ekleyebilirsin.
 
ENABLE_FIX_MOBS_LAG'ın #else içinde değiştirdiği kısımlar clip maskingde de var.
Mesela clip masking'deki

C++:
                pFontTexture->SelectTexture(pCurCharInfo->index);
                STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture());

kısmını

C++:
#ifdef ENABLE_FIX_MOBS_LAG
                const auto tex = pFontTexture->GetTexture(pCurCharInfo->index);
                auto& batchVertices = verticesMap[tex];
#else
                pFontTexture->SelectTexture(pCurCharInfo->index);
                STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture());
#endif

yapabilirsin.
 
Örnek olarak verdiğiniz kısım için bunu deneyebilirsiniz;

C++:
#if defined(__BL_CLIP_MASK__)
                float su = pCurCharInfo->left;
                float sv = pCurCharInfo->top;
                float eu = pCurCharInfo->right;
                float ev = pCurCharInfo->bottom;

                if (pClipRect)
                {
                    const float width = pCurCharInfo->right - pCurCharInfo->left;
                    const float height = pCurCharInfo->bottom - pCurCharInfo->top;

                    if (fFontEx <= pClipRect->left)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontSx < pClipRect->left)
                    {
                        su += (pClipRect->left - fFontSx) / fFontWidth * width;
                        fFontSx = pClipRect->left;
                    }

                    if (fFontEy <= pClipRect->top)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontSy < pClipRect->top)
                    {
                        sv += (pClipRect->top - fFontSy) / fFontHeight * height;
                        fFontSy = pClipRect->top;
                    }

                    if (fFontSx >= pClipRect->right)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontEx > pClipRect->right)
                    {
                        eu -= (fFontEx - pClipRect->right) / fFontWidth * width;
                        fFontEx = pClipRect->right;
                    }

                    if (fFontSy >= pClipRect->bottom)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontEy > pClipRect->bottom)
                    {
                        ev -= (fFontEy - pClipRect->bottom) / fFontHeight * height;
                        fFontEy = pClipRect->bottom;
                    }
                }
#endif //__BL_CLIP_MASK__

#ifdef ENABLE_FIX_MOBS_LAG
                const auto tex = pFontTexture->GetTexture(pCurCharInfo->index);
                auto& batchVertices = verticesMap[tex];
#else
                pFontTexture->SelectTexture(pCurCharInfo->index);
                STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture());
#endif //ENABLE_FIX_MOBS_LAG

#if defined(__BL_CLIP_MASK__)
                akVertex[0].u = su;
                akVertex[0].v = sv;
                akVertex[1].u = su;
                akVertex[1].v = ev;
                akVertex[2].u = eu;
                akVertex[2].v = sv;
                akVertex[3].u = eu;
                akVertex[3].v = ev;
#else
                akVertex[0].u=pCurCharInfo->left;
                akVertex[0].v=pCurCharInfo->top;
                akVertex[1].u=pCurCharInfo->left;
                akVertex[1].v=pCurCharInfo->bottom;
                akVertex[2].u=pCurCharInfo->right;
                akVertex[2].v=pCurCharInfo->top;
                akVertex[3].u=pCurCharInfo->right;
                akVertex[3].v=pCurCharInfo->bottom;
#endif //__BL_CLIP_MASK__

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[3].diffuse = akVertex[2].diffuse = akVertex[1].diffuse = akVertex[0].diffuse = m_dwOutLineColor;
#else
                akVertex[3].color = akVertex[2].color = akVertex[1].color = akVertex[0].color = m_dwOutLineColor;
#endif

                float feather = 0.0f; // m_fFontFeather

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[0].py = fFontSy - feather;
                akVertex[1].py = fFontEy + feather;
                akVertex[2].py = fFontSy - feather;
                akVertex[3].py = fFontEy + feather;

                akVertex[0].px = fFontSx - fFontHalfWeight - feather;
                akVertex[1].px = fFontSx - fFontHalfWeight - feather;
                akVertex[2].px = fFontEx - fFontHalfWeight + feather;
                akVertex[3].px = fFontEx - fFontHalfWeight + feather;
#else
                akVertex[0].y=fFontSy-feather;
                akVertex[1].y=fFontEy+feather;
                akVertex[2].y=fFontSy-feather;
                akVertex[3].y=fFontEy+feather;

                // ¿Ş
                akVertex[0].x=fFontSx-fFontHalfWeight-feather;
                akVertex[1].x=fFontSx-fFontHalfWeight-feather;
                akVertex[2].x=fFontEx-fFontHalfWeight+feather;
                akVertex[3].x=fFontEx-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx + fFontHalfWeight - feather;
                akVertex[1].px = fFontSx + fFontHalfWeight - feather;
                akVertex[2].px = fFontEx + fFontHalfWeight + feather;
                akVertex[3].px = fFontEx + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx+fFontHalfWeight-feather;
                akVertex[1].x=fFontSx+fFontHalfWeight-feather;
                akVertex[2].x=fFontEx+fFontHalfWeight+feather;
                akVertex[3].x=fFontEx+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx - feather;
                akVertex[1].px = fFontSx - feather;
                akVertex[2].px = fFontEx + feather;
                akVertex[3].px = fFontEx + feather;

                akVertex[0].py = fFontSy - fFontHalfWeight - feather;
                akVertex[1].py = fFontEy - fFontHalfWeight + feather;
                akVertex[2].py = fFontSy - fFontHalfWeight - feather;
                akVertex[3].py = fFontEy - fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx-feather;
                akVertex[1].x=fFontSx-feather;
                akVertex[2].x=fFontEx+feather;
                akVertex[3].x=fFontEx+feather;

                // ˤ
                akVertex[0].y=fFontSy-fFontHalfWeight-feather;
                akVertex[1].y=fFontEy-fFontHalfWeight+feather;
                akVertex[2].y=fFontSy-fFontHalfWeight-feather;
                akVertex[3].y=fFontEy-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].py = fFontSy + fFontHalfWeight - feather;
                akVertex[1].py = fFontEy + fFontHalfWeight + feather;
                akVertex[2].py = fFontSy + fFontHalfWeight - feather;
                akVertex[3].py = fFontEy + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                // ¾Æ·¡
                akVertex[0].y=fFontSy+fFontHalfWeight-feather;
                akVertex[1].y=fFontEy+fFontHalfWeight+feather;
                akVertex[2].y=fFontSy+fFontHalfWeight-feather;
                akVertex[3].y=fFontEy+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
            batchVertices.insert(batchVertices.end(),
                std::begin(akVertex), std::end(akVertex));

            fCurX += fFontAdvance;
        }
    }

    for (auto& p : verticesMap)
    {
        STATEMANAGER.SetTexture(0, p.first->GetD3DTexture());
        
        for (auto f = p.second.begin(), l = p.second.end(); f != l; )
        {
            const auto batchCount = std::min<std::size_t>(LARGE_PDT_VERTEX_BUFFER_SIZE,
                l - f);
            
            if (CGraphicBase::SetPDTStream(&*f, batchCount))
            STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0,
                batchCount - 2);       
                f += batchCount;
        }
    }
#else
            if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
            {
                STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
            }

            fCurX += fFontAdvance;
        }
    }
#endif
 
Çözüm
deniyorum teşekkür ederim
Örnek olarak verdiğiniz kısım için bunu deneyebilirsiniz;

C++:
#if defined(__BL_CLIP_MASK__)
                float su = pCurCharInfo->left;
                float sv = pCurCharInfo->top;
                float eu = pCurCharInfo->right;
                float ev = pCurCharInfo->bottom;

                if (pClipRect)
                {
                    const float width = pCurCharInfo->right - pCurCharInfo->left;
                    const float height = pCurCharInfo->bottom - pCurCharInfo->top;

                    if (fFontEx <= pClipRect->left)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontSx < pClipRect->left)
                    {
                        su += (pClipRect->left - fFontSx) / fFontWidth * width;
                        fFontSx = pClipRect->left;
                    }

                    if (fFontEy <= pClipRect->top)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontSy < pClipRect->top)
                    {
                        sv += (pClipRect->top - fFontSy) / fFontHeight * height;
                        fFontSy = pClipRect->top;
                    }

                    if (fFontSx >= pClipRect->right)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontEx > pClipRect->right)
                    {
                        eu -= (fFontEx - pClipRect->right) / fFontWidth * width;
                        fFontEx = pClipRect->right;
                    }

                    if (fFontSy >= pClipRect->bottom)
                    {
                        fCurX += fFontAdvance;
                        continue;
                    }

                    if (fFontEy > pClipRect->bottom)
                    {
                        ev -= (fFontEy - pClipRect->bottom) / fFontHeight * height;
                        fFontEy = pClipRect->bottom;
                    }
                }
#endif //__BL_CLIP_MASK__

#ifdef ENABLE_FIX_MOBS_LAG
                const auto tex = pFontTexture->GetTexture(pCurCharInfo->index);
                auto& batchVertices = verticesMap[tex];
#else
                pFontTexture->SelectTexture(pCurCharInfo->index);
                STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture());
#endif //ENABLE_FIX_MOBS_LAG

#if defined(__BL_CLIP_MASK__)
                akVertex[0].u = su;
                akVertex[0].v = sv;
                akVertex[1].u = su;
                akVertex[1].v = ev;
                akVertex[2].u = eu;
                akVertex[2].v = sv;
                akVertex[3].u = eu;
                akVertex[3].v = ev;
#else
                akVertex[0].u=pCurCharInfo->left;
                akVertex[0].v=pCurCharInfo->top;
                akVertex[1].u=pCurCharInfo->left;
                akVertex[1].v=pCurCharInfo->bottom;
                akVertex[2].u=pCurCharInfo->right;
                akVertex[2].v=pCurCharInfo->top;
                akVertex[3].u=pCurCharInfo->right;
                akVertex[3].v=pCurCharInfo->bottom;
#endif //__BL_CLIP_MASK__

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[3].diffuse = akVertex[2].diffuse = akVertex[1].diffuse = akVertex[0].diffuse = m_dwOutLineColor;
#else
                akVertex[3].color = akVertex[2].color = akVertex[1].color = akVertex[0].color = m_dwOutLineColor;
#endif

                float feather = 0.0f; // m_fFontFeather

#ifdef ENABLE_FIX_MOBS_LAG
                akVertex[0].py = fFontSy - feather;
                akVertex[1].py = fFontEy + feather;
                akVertex[2].py = fFontSy - feather;
                akVertex[3].py = fFontEy + feather;

                akVertex[0].px = fFontSx - fFontHalfWeight - feather;
                akVertex[1].px = fFontSx - fFontHalfWeight - feather;
                akVertex[2].px = fFontEx - fFontHalfWeight + feather;
                akVertex[3].px = fFontEx - fFontHalfWeight + feather;
#else
                akVertex[0].y=fFontSy-feather;
                akVertex[1].y=fFontEy+feather;
                akVertex[2].y=fFontSy-feather;
                akVertex[3].y=fFontEy+feather;

                // ¿Ş
                akVertex[0].x=fFontSx-fFontHalfWeight-feather;
                akVertex[1].x=fFontSx-fFontHalfWeight-feather;
                akVertex[2].x=fFontEx-fFontHalfWeight+feather;
                akVertex[3].x=fFontEx-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx + fFontHalfWeight - feather;
                akVertex[1].px = fFontSx + fFontHalfWeight - feather;
                akVertex[2].px = fFontEx + fFontHalfWeight + feather;
                akVertex[3].px = fFontEx + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx+fFontHalfWeight-feather;
                akVertex[1].x=fFontSx+fFontHalfWeight-feather;
                akVertex[2].x=fFontEx+fFontHalfWeight+feather;
                akVertex[3].x=fFontEx+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].px = fFontSx - feather;
                akVertex[1].px = fFontSx - feather;
                akVertex[2].px = fFontEx + feather;
                akVertex[3].px = fFontEx + feather;

                akVertex[0].py = fFontSy - fFontHalfWeight - feather;
                akVertex[1].py = fFontEy - fFontHalfWeight + feather;
                akVertex[2].py = fFontSy - fFontHalfWeight - feather;
                akVertex[3].py = fFontEy - fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                akVertex[0].x=fFontSx-feather;
                akVertex[1].x=fFontSx-feather;
                akVertex[2].x=fFontEx+feather;
                akVertex[3].x=fFontEx+feather;

                // ˤ
                akVertex[0].y=fFontSy-fFontHalfWeight-feather;
                akVertex[1].y=fFontEy-fFontHalfWeight+feather;
                akVertex[2].y=fFontSy-fFontHalfWeight-feather;
                akVertex[3].y=fFontEy-fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
                batchVertices.insert(batchVertices.end(),
                    std::begin(akVertex), std::end(akVertex));

                akVertex[0].py = fFontSy + fFontHalfWeight - feather;
                akVertex[1].py = fFontEy + fFontHalfWeight + feather;
                akVertex[2].py = fFontSy + fFontHalfWeight - feather;
                akVertex[3].py = fFontEy + fFontHalfWeight + feather;
#else
                if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
                    STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);

                // ¾Æ·¡
                akVertex[0].y=fFontSy+fFontHalfWeight-feather;
                akVertex[1].y=fFontEy+fFontHalfWeight+feather;
                akVertex[2].y=fFontSy+fFontHalfWeight-feather;
                akVertex[3].y=fFontEy+fFontHalfWeight+feather;
#endif

#ifdef ENABLE_FIX_MOBS_LAG
            batchVertices.insert(batchVertices.end(),
                std::begin(akVertex), std::end(akVertex));

            fCurX += fFontAdvance;
        }
    }

    for (auto& p : verticesMap)
    {
        STATEMANAGER.SetTexture(0, p.first->GetD3DTexture());
       
        for (auto f = p.second.begin(), l = p.second.end(); f != l; )
        {
            const auto batchCount = std::min<std::size_t>(LARGE_PDT_VERTEX_BUFFER_SIZE,
                l - f);
           
            if (CGraphicBase::SetPDTStream(&*f, batchCount))
            STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0,
                batchCount - 2);      
                f += batchCount;
        }
    }
#else
            if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
            {
                STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
            }

            fCurX += fFontAdvance;
        }
    }
#endif
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst