~alcinnz/Mondrian

ref: eba0f9a2b54b1eb3c95775fd8437e958c0eeb0f4 Mondrian/lib/Graphics/Rendering/Rect/Backgrounds.hs -rw-r--r-- 634 bytes
eba0f9a2 — Adrian Cochrane Draft background-colour shader. 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Graphics.Rendering.Rect.Backgrounds(Backgrounds(..), renderBackgrounds) where

import Graphics.Rendering.Rect.CSS.Background
import Graphics.Rendering.Rect.Types
import qualified Data.ByteString.Char8  as B8

baseVertexShader = B8.pack $ unlines [
    "#version 330 core;",
    "uniform mat4 transform;",
    "in vec2 pos;",
    "void main() { gl_Position = pos * transform; }"
  ]
baseFragmentShader = B8.pack $ unlines [
    "#version 330 core;",
    "out vec4 fcolour;",
    "in vec4 colour;",
    "void main() { fcolour = colour; }"
  ]

renderBackgrounds :: Backgrounds -> Rects -> IO ()
renderBackgrounds _ _ = return ()