I'm attempting per pixel collision detection for 2D sprites drawn as textured quads on a Samsung Galaxy S6 Edge+. Using C# and OpenTK.
glGenQueries always returns no query names (array 'queries' is unchanged) and the test to see if a query was made always fails and my exception hits.
The OpenGL error returned is 1282 (INVALID_OPERATION). The spec says that this occurs between glBegin and glEnd which I'm not even using (ES doesnt support them).
I dont think I'm doing anything wrong in this code, but the problem is either in device capabilities or the setup of the framebuffer/graphics mode.
uint error = 0;
int[] queries = new int[1];
ES30.GL.GenQueries(1, queries);
if (!ES30.GL.IsQuery(queries[0]))
{
error = (uint)GL.GetError();
throw new Exception("ES30.GL.GenQueries returned no query name");
}
My framebuffer is setup like this (8 stencil bits, I've tried 1. no depth (2d game))
ColorFormat f = new ColorFormat(32);
GraphicsMode = new AndroidGraphicsMode(f, 0, 8, 4, 0, false);
Any help appreciated, I've brickwalled in google for ages.
Regards
Matt