{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{- |
 - Module      : Haskengl.Internal.Types
 - Description : All Haskengl types
 - Copyright   : Andromeda 2025
 - License     : WTFPL
 - Maintainer  : Matrix @Andromeda:tchncs.de
 - Stability   : Experimental
 -}
module Haskengl.Internal.Types where

import Relude

import qualified Haskengl.Internal.Bindings.OpenGL as GL

type DisplayableObjects = [DisplayableObject]

-- | Object to be displayed
data DisplayableObject =
  DisplayableObject
    GL.VertexArrayObject -- ^ VAO
    GL.NumArrayIndices -- ^ The length of the array / number of vertides
    GL.NumComponents -- ^ Dimensionality of the array element; 4 for vec4
    GL.PrimitiveMode -- ^ How to render the VAO

-- | state
data Model
  = Model
      { objects :: DisplayableObjects
      }

-- | 4 dimensional point without w value
data Point
  = Point
      { x :: Float
      , y :: Float
      , z :: Float
      , k :: Float
      }
