I believe this is an example:
https://gist.github.com/FRex/b04a5de124d2ce82a2a859bc345ae1a1Basically what you gotta do is:
One) draw something that doesn't use cache but uses texturing.
Two) draw something that uses cache but doesn't use texturing.
Tri) draw something that uses both texturing and cache.
Using the cache just means drawing 4 or less vertices.
The first time a call is using the cache it will set all the pointers to cache, but if it's not using textures it'll not set the cache.
Next calls that use the cache will not set any pointers and thus reuse the stale pointer from before first cache call.
And if you only use cached drawings and never do a call that uses texturing (i.e. comment out 'one' in my example) then you don't ever set the texturing pointer but have texturing enabled.
If you comment out 'two' and leave 'one' and 'tri' in then it works.
You can try adding a call like 'one' before drawing a spirte or something else that's 4 or less vertices as a quick fix in game code if you want.
By the way, what is that game and when is it coming out, is it a stealth game?