Results 1 to 1 of 1
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,221
    Thanks
    211
    Thanked 2,224 Times in 289 Posts
    Rep Power
    10

    NumVertices, primCount, Stride Logger

    Here is a simple Source to log stride, numV, and primC for Chams and other useful things.

    //declares 
    unsigned int m_Stride;
    static int stride=0;
    int temp = 0;
    int temp2 = 0;
    int temp3 = 0;

    //in DrawIndexedPrimitive
    if(NumVertices == temp){
    m_pD3Ddev->SetTexture(0,texPink);
    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

    if(primCount == temp3){
    m_pD3Ddev->SetTexture(0,texOrange);
    return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

    //in Present
    if(GetAsyncKeyState(VK_ADD))temp++;
    if(GetAsyncKeyState(VK_SUBTRACT))temp--;
    if(GetAsyncKeyState(VK_NUMPAD9)<0)temp2++;
    if(GetAsyncKeyState(VK_NUMPAD6)<0)temp2--;
    if(GetAsyncKeyState(VK_NUMPAD8)<0)temp3++;
    if(GetAsyncKeyState(VK_NUMPAD5)<0)temp3--;

    if(GetAsyncKeyState(VK_MULTIPLY)&1){
    add_log("NumVert: %d",temp);
    add_log("m_Stride: %d",temp2);
    add_log("primCount: %d", temp3);
    }

    if(GetAsyncKeyState(VK_DIVIDE)&1){
    temp=0;
    temp2=0;
    temp3=0;
    }


    //in SetRenderState
    if (temp2 != 0 && m_Stride == temp2){
    m_pD3Ddev->SetTexture(0,texGreen);
    }


    //in SetStreamSource
    if(StreamNumber==0) m_Stride=Stride;


    by Str8Soulja
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

Visitors found this page by searching for:

d3d logger

d3d stride logger

logger stride

numvertices primcount

numvertices primcount stride logger

NumVertices

stride logger

stride logger sourcesource stride loggerd3d logger sourcenumvertices loggerstride logger d3dStride == 44d3d numverticesm_Stride loggersource d3d loggerwhat are primcounts and numverticlesstride stride loggerStride Logerd3d strideswhat is num verticesstride d3dd3d primcount D3D Loggerstride == 44.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •