nerf Main
This commit is contained in:
47
src/Main.hs
47
src/Main.hs
@@ -1,47 +0,0 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Main (main) where
|
||||
|
||||
-- IMPORTS --
|
||||
|
||||
import Text.Pretty.Simple
|
||||
|
||||
import Relude
|
||||
|
||||
import Types
|
||||
|
||||
-- MAIN --
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
let a = generateCheckedGLSL fragShader
|
||||
let b = generateCheckedGLSL vertShader
|
||||
pPrint a
|
||||
pPrint b
|
||||
return ()
|
||||
|
||||
fragShader :: Program
|
||||
fragShader =
|
||||
[ VersionDeclaration 450 Core
|
||||
, VariableDeclaration Nothing In fragColorIn
|
||||
, VariableDeclaration Nothing Out fragColorOut
|
||||
, MainStart
|
||||
, VariableAssignment fragColorOut fragColorIn
|
||||
]
|
||||
|
||||
vertShader :: Program
|
||||
vertShader =
|
||||
[ VersionDeclaration 450 Core
|
||||
, VariableDeclaration (Just $ Location 0) In vertexPosition
|
||||
, VariableDeclaration (Just $ Location 1) In vertexColor
|
||||
, VariableDeclaration Nothing Out fragColorOut
|
||||
, MainStart
|
||||
, VariableAssignment GL_POSITION vertexPosition
|
||||
, VariableAssignment fragColorOut vertexColor
|
||||
]
|
||||
|
||||
fragColorIn = Variable "fragColorIn" $ GLSLVec4 GLSLFloat
|
||||
fragColorOut = Variable "fragColorOut" $ GLSLVec4 GLSLFloat
|
||||
vertexPosition = Variable "vertexPosition" $ GLSLVec4 GLSLFloat
|
||||
vertexColor = Variable "vertexColor" $ GLSLVec4 GLSLFloat
|
||||
Reference in New Issue
Block a user