Results 1 to 1 of 1
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 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

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
  •