from .egl import EGL
import time


class BaseGLApp():
	def setup(self):
		pass

	def draw(self):
		pass

	def run(self):
		egl = EGL()
		self.width = egl.width
		self.height = egl.height
		self.setup()

		start_time = time.time()
		while 1:
			self.draw(time.time() - start_time)
			egl.swap_buffers()
