# Trouble using Batch - other render paths work

**URL:** <https://discourse.libcinder.org/t/trouble-using-batch-other-render-paths-work/663>\
**Category:** Using Cinder\
**Created:** [April 19, 2017, 3:30am UTC](https://discourse.libcinder.org/t/trouble-using-batch-other-render-paths-work/663 "2017-04-19T03:30:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShamylZakariya](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/shamylzakariya/32/341_2.png) [@ShamylZakariya](https://discourse.libcinder.org/u/ShamylZakariya)\
**Post date:** [April 19, 2017, 3:30am UTC](https://discourse.libcinder.org/t/trouble-using-batch-other-render-paths-work/663/1 "2017-04-19T03:30:10Z")

</div>

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:

```
_batch->draw()

```

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,

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [April 19, 2017, 5:31am UTC](https://discourse.libcinder.org/t/trouble-using-batch-other-render-paths-work/663/2 "2017-04-19T05:31:44Z")

</div>

A `geom::Plane()` is a 3d plane, which I believe is facing up by default. You can manipulate the normal with `geom::Plane().normal ( vec3 ( ... ) )`, but to draw analogous geometry to `gl::drawSolidRect()` you want to create your batch with a `geom::Rect().rect ( Rectf ( ... ) )`

---

<div class="post-metadata">

**Author:** ![ShamylZakariya](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/shamylzakariya/32/341_2.png) [@ShamylZakariya](https://discourse.libcinder.org/u/ShamylZakariya)\
**Post date:** [April 19, 2017, 1:38pm UTC](https://discourse.libcinder.org/t/trouble-using-batch-other-render-paths-work/663/3 "2017-04-19T13:38:43Z")

</div>

That worked! Thanks so much.
