mvp
This commit is contained in:
32
src/Main.hs
32
src/Main.hs
@@ -7,7 +7,37 @@ module Main (main) where
|
||||
|
||||
import Relude
|
||||
|
||||
import Types
|
||||
|
||||
-- MAIN --
|
||||
|
||||
main :: IO ()
|
||||
main = putTextLn "hallo Welt"
|
||||
main = do
|
||||
putTextLn "hallo Welt"
|
||||
putStrLn $ generateGLSL vertShader
|
||||
putStrLn $ generateGLSL fragShader
|
||||
|
||||
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 fragColorIn 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