Changeset 1230


Ignore:
Timestamp:
Apr 15, 2012, 2:23:20 AM (9 years ago)
Author:
sam
Message:

gpu: fix the core scene renderer.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/vertexbuffer.cpp

    r1228 r1230  
    232232        if (type_index < 0 || type_index >= sizeof(tlut) / sizeof(*tlut))
    233233            type_index = 0;
    234 Log::Error("Size %d Type %d Stride %d offset %d\n", tlut[type_index].size,
    235                               tlut[type_index].type,stride,offset);
    236234
    237235        glVertexAttribPointer((GLint)reg, tlut[type_index].size,
  • trunk/src/gpu/vertexbuffer.h

    r1228 r1230  
    4545        BlendIndices,
    4646        Normal,
    47         PSize,
     47        PointSize,
    4848        TexCoord,
    4949        Tangent,
  • trunk/src/scene.cpp

    r1228 r1230  
    381381        }
    382382
     383        data->bufs[buf]->Unlock();
     384        data->bufs[buf + 1]->Unlock();
     385
    383386        stdshader->Bind();
    384387
     
    392395        /* Draw arrays */
    393396#if defined USE_D3D9 || defined _XBOX
    394         g_d3ddevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, (n - i) * 6);
     397        g_d3ddevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, (n - i) * 2);
    395398#else
    396399        glDrawArrays(GL_TRIANGLES, 0, (n - i) * 6);
    397400
    398401#   if defined HAVE_GL_2X && !defined __APPLE__
    399         glBindVertexArray(0);
     402        //glBindVertexArray(0);
    400403#   endif
    401404#   if !defined __CELLOS_LV2__ // Use cgGLEnableClientState etc.
    402405#   else
    403         glDisableClientState(GL_VERTEX_ARRAY);
    404         glDisableClientState(GL_TEXTURE_COORD_ARRAY);
     406        //glDisableClientState(GL_VERTEX_ARRAY);
     407        //glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    405408#   endif
    406409#endif
Note: See TracChangeset for help on using the changeset viewer.