Could some one list the most common problems for just a triangle and some text to be slow? With just the triangle on the screen, it goes at 1-2 fps (so says my fps calculator). When I stop drawing the triangle, it says that it's running about 10fps faster. My computer can normally run decent games at 50-60fps. What are the common problems for this? I zeroed out "all" of the problems with the window wrapper (I think), so I highly doubt that it's still the window stuff.
Any suggestions? Just ask for a snippet of source-code and I'd be happy to provide it. To get started, this is the primitive class at it's current state:
#include "ColorVertex.h"template<typename TVertex> class primitive{private: ID3DXMesh* my_primitive; TVertex (vertex)[3000]; ushort (index)[9000]; ushort vertex_count; ushort index_count;public: primitive() { vertex_count = 0; index_count = 0; my_primitive = 0; } void add_vertex(const TVertex &p_vertex) { vertex[vertex_count] = p_vertex; ++vertex_count; } void add_index(ushort p_index) { index[index_count] = p_index; index_count ++; } bool complete() { TVertex* vertex_buffer; ushort* index_buffer; if (FAILED(D3DXCreateMeshFVF(vertex_count/3, vertex_count, D3DXMESH_WRITEONLY, TVertex::get_format(), device, &my_primitive))) { return false; } my_primitive->LockVertexBuffer(D3DLOCK_DISCARD,(void**)&vertex_buffer); for (auto this_vertex = 0; this_vertex != vertex_count; ++this_vertex) { vertex_buffer[this_vertex] = vertex[this_vertex]; } my_primitive->UnlockVertexBuffer(); my_primitive->LockIndexBuffer(D3DLOCK_DISCARD,(void**)&index_buffer); for (auto this_index = 0; this_index != index_count; ++this_index) { index_buffer[this_index] = index[this_index]; } my_primitive->UnlockIndexBuffer(); return true; } void render() { my_primitive->DrawSubset(0); }};