"My DrawItem corresponds to one glDraw* / Draw* call, plus all the state that needs to be set immediately prior the draw.
One model will usually have one DrawItem per sub-mesh (where a sub-mesh is a portion of that model that uses a material), per pass (where as pass is e.g. drawing to gbuffer, drawing to shadow-map, forward rendered, etc). When drawing a model, it will find all the DrawItems for the current pass, and push them into a render list, which can then be sorted.
A DrawItem which contains the full pipeline state, the resource bindings, and the draw-call parameters could look like this in a naive D3D11 implementation:
struct DrawItem
{
//pipeline state:
ID3D11PixelShader* ps;
ID3D11VertexShader* vs;
ID3D11BlendState* blend;
ID3D11DepthStencilState* depth;
ID3D11RasterizerState* raster;
D3D11_RECT* scissor;
//input assembler state
D3D11_PRIMITIVE_TOPOLOGY primitive;
ID3D11InputLayout* inputLayout;
ID3D11Buffer* indexBuffer;
vector<tuple<int/*slot*/,ID3D11Buffer*,uint/*stride*/,uint/*offset*/>> vertexBuffers;
//resource bindings:
vector<pair<int/*slot*/, ID3D11Buffer*>> cbuffers;
vector<pair<int/*slot*/, ID3D11SamplerState*>> samplers;
vector<pair<int/*slot*/, ID3D11ShaderResourceView*>> textures;
//draw call parameters:
int numVerts, numInstances, indexBufferOffset, vertexBufferOffset;
};
That structure is extremely unoptimized though. It's a base size of ~116 bytes, plus the memory used by the vectors, which could be ~1KiB!
I'd aim to compress them down to 28-100 bytes in a single contiguous allocation, e.g. by using ID's instead of pointers, by grouping objects together (e.g. referencing a PS+VS program pair, instead of referencing each individually), and by using variable length arrays built into that structure instead of vectors.
When porting to Mantle/Vulkan/D3D12, that "pipeline state" section all gets replaced with a single "pipeline state object" and the "input assembler" / "resource bindings" sections get replaced by a "descriptor set". Alternatively, these new APIs also allow for a DrawItem to be completely replaced by a very small native command buffer!