#!/usr/bin/env python3

import sobek

from misc import (
    statsbar,
    common
)

from sobek.glm import vec4, mat4


WIDTH = 1024
HEIGHT = 100


if __name__ == "__main__":
    window = sobek.window.create_window(WIDTH, HEIGHT, title="Statsbar")
    scene = sobek.Scene()
    transform = sobek.Transform()

    transform.append(statsbar.StatsBar())
    transform.attributes.append(sobek.Uniform("texture", 0))
    transform.attributes.append(sobek.Blend())
    transform.attributes.append(common.assets.load("textured-cairo-quad.glsl"))

    scene.append(transform)

    scene.matrix = mat4.ortho(0.0, window.width, 0.0, window.height, 0.0, 1.0)
    scene.viewport = vec4(0.0, 0.0, window.width, window.height)
    scene.clear_color = vec4(0.2, 0.4, 0.6, 1.0)

    window.main_loop(scene, sobek.RenderTraversal())
