This commit is contained in:
mtgmonkey
2025-11-29 00:43:30 +01:00
parent d419b0f40d
commit be41a03eee
2 changed files with 153 additions and 1 deletions

View File

@@ -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