Original Post
I'm trying to use an array of points to simulate pixels on the screen and seem to run into a problem. If I use an array of 50,000 it creates the vertex buffer, but if i go much higher then that it throws a stack overflow exeption. Is there a limit as to how large a vertex buffer can get. This is my code so far.
void initGraphics(){ PixelVertex test[SCREEN_LENGTH]; for(int i = 0; i < SCREEN_LENGTH; i++) { PixelVertex vertex = {i % 640, i / 640, 1.0f, 1.0f, D3DCOLOR_XRGB(0, 0, 0)}; test = vertex; } // create a vertex buffer interface called v_buffer d3ddev->CreateVertexBuffer(SCREEN_LENGTH*sizeof(PixelVertex), 0, CUSTOMFVF, D3DPOOL_MANAGED, &vertexBuffer, NULL); VOID* pVoid; // a void pointer // lock v_buffer and load the vertices into it vertexBuffer->Lock(0, 0, (void**)&pVoid, 0); memcpy(pVoid, test, sizeof(test)); vertexBuffer->Unlock();}