if (This->strided.u.s.position.dwStride) stride = This->strided.u.s.position.dwStride; else if(This->strided.u.s.specular.dwStride) stride = This->strided.u.s.specular.dwStride; else if(This->strided.u.s.diffuse.dwStride) stride = This->strided.u.s.diffuse.dwStride; else { /* That means that there is nothing to fixup. Just upload from This->resource.allocatedMemory * directly into the vbo. Do not free the system memory copy because drawPrimitive may need it if * the stride is 0, for instancing emulation, vertex blending emulation or shader emulation. */ TRACE("No conversion needed, locking directly into the VBO in future\n"); ENTER_GL(); if(!device->isInDraw) { ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); } GL_EXTCALL(glBindBufferARB(GL_ARRAY_BUFFER_ARB, This->vbo)); checkGLcall("glBindBufferARB"); int i; for (i = 0; i != This->resource.size; i++) ERR("%i ", This->resource.allocatedMemory[i]); ERR("\n"); // GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, This->resource.size, This->resource.allocatedMemory)); ERR("%i - %i - %i - %i\n",start, end, This->resource.size, This->resource.allocatedMemory); GL_EXTCALL(glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, start, end-start, This->resource.allocatedMemory + start)); checkGLcall("glBufferSubDataARB"); LEAVE_GL(); return; } /* OK, we have the original data from the app, the description of the buffer and the dirty area. * so convert the stuff */ data = HeapAlloc(GetProcessHeap(), 0, end-start);