{-# OPTIONS_HADDOCK hide #-}
module Graphics.Rendering.OpenGL.GL.Shaders.Shader (
Shader(..)
) where
import Control.Monad.IO.Class
import Data.ObjectName
import Graphics.Rendering.OpenGL.GL.DebugOutput
import Graphics.Rendering.OpenGL.GL.GLboolean
import Graphics.Rendering.OpenGL.GL.QueryUtils
import Graphics.GL
newtype Shader = Shader { shaderID :: GLuint }
deriving ( Eq, Ord, Show )
instance ObjectName Shader where
isObjectName = liftIO . fmap unmarshalGLboolean . glIsShader . shaderID
deleteObjectName = liftIO . glDeleteShader . shaderID
instance CanBeLabeled Shader where
objectLabel = objectNameLabel GL_SHADER . shaderID