For context, I’m making a game and VboMesh, GlslProg, etc all are working great. My issue is that I’m rendering a simple screen-aligned background quad with a fragment shader to draw a debug coordinate system.
Ignoring the model matrix setup and uniform bindings, the following draw call works great:
gl::ScopedGlslProg sglp(_shader); gl::drawSolidRect(Rectf(-1,-1,1,1));
On the other hand, if I make a batch:
_batch = gl::Batch::create(geom::Plane().size(vec2(2,2)), _shader); // plane of size 2,2 centered on 0
And in my draw loop draw it:
Using Batch instead of the
gl::drawSolidRect I get no output. I’ve put in tests in my fragment shader to simply output a solid color and, nada.
I don’t know exactly what state is encapsulated in Batch. I did the tutorials, Batch seems nice. I know the overhead of drawing a single quad in “immediate mode” via
gl::drawSolidRect is essentially nil, but if I can fast path anything I will.
Any pointers are appreciated,