/**
 * Copyright (c) 2021 Dominic Masters
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

#include "world.h"

void pokerWorldInit(poker_t *poker) {
  // Poker Table
  pokerTableInit(&poker->tablePrimitive);
  assetTextureLoad(&poker->tableTexture, "pokertable.png");
}

void pokerWorldRender(poker_t *poker) {
  // Poker Table
  shaderUsePositionAndScale(&poker->shader,
    0, -0.01, 0,
    0, 0, 0,
    3.4, 3.4, 3.4
  );
  shaderUseTexture(&poker->shader, &poker->tableTexture);
  primitiveDraw(&poker->tablePrimitive, 0, -1);
}

void pokerWorldDispose(poker_t *poker) {
  textureDispose(&poker->tableTexture);
  primitiveDispose(&poker->tablePrimitive);
}