It is not much information out there how to do a 2d camera in Pyglet. I assume its not a good idea to move all sprites so I look for something similar to a Surface in Pygame that I could move instead. But the is no such thing in Pyglet? Is this the way it should be done in openGl? or am I missing something important? I don't know what the gl command do but it is working.
def on_draw(self):
#camera start
glMatrixMode(gl.GL_PROJECTION)
glLoadIdentity()
glOrtho(self.camera.x, self.camera.x2, self.camera.y, self.camera.y2, -1, 1)
#camera end
self.clear()
self.batch.draw()# draw stuff