package com.example.cmpt362_group30_maze_game.game

import android.content.Context
import android.opengl.GLSurfaceView
import android.util.AttributeSet

// This class is a custom implementation of GLSurfaceView
class GameSurfaceView(context : Context, attrs : AttributeSet) : GLSurfaceView(context, attrs) {
    var gameRenderer : GameRenderer = GameRenderer()

    // This must be called once before calling request render on this object
    fun initRendering(){
        // Defines that this class uses open gl 3.0+?
        setEGLContextClientVersion(3)

        setRenderer(gameRenderer)

        // Tells renderer to update view only when requestRender() is called
        renderMode = RENDERMODE_WHEN_DIRTY
    }
}