package ru.dbotthepony.kstarbound.client.gl

import org.lwjgl.opengl.GL45.*

enum class GLType(
	val type: Int,
	val elementType: Int,
	val byteSize: Int,
	val elementSize: Int,
	// location(position) width
	val width: Int
) {
	INT(GL_INT, GL_INT, 4, 1, 1),
	UINT(GL_UNSIGNED_INT, GL_UNSIGNED_INT, 4, 1, 1),
	FLOAT(GL_FLOAT, GL_FLOAT, 4, 1, 1),
	DOUBLE(GL_DOUBLE, GL_DOUBLE, 8, 1, 1),

	VEC2F(GL_FLOAT_VEC2, GL_FLOAT,  8,          2, 1),
	VEC3F(GL_FLOAT_VEC3, GL_FLOAT,  12,         3, 1),
	VEC4F(GL_FLOAT_VEC4, GL_FLOAT,  16,         4, 1),

	VEC2I(GL_INT_VEC2, GL_INT,      8,          2, 1),
	VEC3I(GL_INT_VEC3, GL_INT,      12,         3, 1),
	VEC4I(GL_INT_VEC4, GL_INT,      16,         4, 1),

	MAT2F(GL_FLOAT_MAT2, GL_FLOAT,  2 * 2 * 4,  2 * 2, 2),
	MAT3F(GL_FLOAT_MAT3, GL_FLOAT,  3 * 3 * 4,  3 * 3, 3),
	MAT4F(GL_FLOAT_MAT4, GL_FLOAT,  4 * 4 * 4,  4 * 4, 4),
}
