/
opengles.cabal
155 lines (140 loc) · 4.87 KB
/
opengles.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: opengles
version: 0.8.3
synopsis: Functional interface for OpenGL 4.1+ and OpenGL ES 2.0+
description: A functional OpenGL [ES] wrapper library.
Made complicated OpenGL APIs easy yet keep flexible enough.
Resulting binary size is relatively small so that apps
launches faster. Works on both desktop and mobile.
homepage: https://github.com/capsjac/opengles#readme
license: LGPL-3
license-file: LICENSE
author: capsjac <capsjac at gmail.com>
maintainer: capsjac <capsjac at gmail.com>
copyright: 2014-2016 capsjac
category: Graphics
build-type: Simple
extra-source-files:
CHANGELOG.md
README.md
cabal-version: >=1.10
-- cabal-version: >=1.24 -- for os(android) support
flag UseEGL
description:
By default, EGL APIs are used to get OpenGL function pointers.
If Disabled, use native library instead of EGL. e.g. WGL, GLX or dlsym.
default: True
flag StaticLinkES3
description:
By default, OpenGL ES 3.0 APIs are dynamic linked.
If Enabled, may cause runtime link error on unsupported environment.
OpenGL ES 2.0 APIs are always statically linked.
default: False
flag StaticLinkEGL15
description:
By default, EGL 1.5 APIs are dynamic linked.
If Enabled, may cause runtime link error on unsupported environment.
EGL 1.4 APIs are always statically linked.
default: False
flag BuildExample
default: True
library
hs-source-dirs: src
exposed-modules:
Graphics.EGL,
Graphics.EGL.Base,
Graphics.OpenGL.CoreArb,
Graphics.OpenGL.Types,
Graphics.OpenGLES,
Graphics.OpenGLES.Base,
Graphics.OpenGLES.Base.Proc,
Graphics.OpenGLES.Buffer,
Graphics.OpenGLES.Caps,
Graphics.OpenGLES.Core,
Graphics.OpenGLES.Framebuffer,
Graphics.OpenGLES.Internal,
Graphics.OpenGLES.PixelFormat,
Graphics.OpenGLES.State,
Graphics.OpenGLES.Sync,
Graphics.OpenGLES.Texture,
Graphics.OpenGLES.Types,
Graphics.TextureContainer.KTX,
Graphics.TextureContainer.PKM,
Linear.Graphics
build-depends: base >= 4.7 && < 5
, ghc-prim >= 0.4 && < 0.5
, bytestring
, distributive
, transformers
, vector
, linear >= 1.20
, lens
, half
, fixed
, future-resource == 0.4.0.0
, packer >= 0.1.9 && < 0.2
default-language: Haskell2010
--if os(android)
-- if flag(StaticLinkES3)
-- cpp-options: -DSTATIC_ES3
-- cpp-options: -DSTATIC_ES2 -DEGL_GETPROC
-- extra-libraries: EGL, GLESv2
if os(linux)
if flag(StaticLinkES3)
cpp-options: -DSTATIC_ES3
if flag(UseEGL)
cpp-options: -DSTATIC_ES2 -DEGL_GETPROC
extra-libraries: EGL, GLESv2
else
-- GLX 1.3 provides glXGetProcAddressARB
-- GLX 1.4 provides glXGetProcAddress
cpp-options: -DSTATIC_ES2 -DGLX_GETPROC
extra-libraries: GL
if os(ios)
cpp-options: -DSTATIC_ES2 -DSTATIC_ES3 -DNOEGL -DDLSYM_GETPROC
frameworks: QuartzCore, OpenGLES
if os(darwin)
cpp-options: -DSTATIC_ES2 -DSTATIC_ES3 -DNOEGL -DGLX_GETPROC
frameworks: OpenGL
if os(windows)
if flag(UseEGL)
-- Static_ES{2,3} is needed because ANGLE does not provide these APIs
-- via eglGetProcAddress except extensions.
cpp-options: -DEGL_GETPROC -DSTATIC_ES2 -DSTATIC_ES3
-- NOTE: make sure that ANGLE dlls are found in %Path%
extra-libraries: libEGL libGLESv2
else
cpp-options: -DNOEGL -DWGL_GETPROC
extra-libraries: opengl32
if flag(StaticLinkEGL15)
cpp-options: -DSTATIC_EGL15
executable windmill
hs-source-dirs: examples
main-is: windmill.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
if !flag(BuildExample)
buildable: False
build-depends: base
, opengles
, random, GLFW-b, time, bytestring, future-resource
default-language: Haskell2010
executable glsl-sandbox-player
hs-source-dirs: examples
main-is: glsl-sandbox-player.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
if !flag(BuildExample)
buildable: False
build-depends: base
, opengles
, GLFW-b, time, bytestring, future-resource
default-language: Haskell2010
test-suite opengles-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, opengles
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
source-repository head
type: git
location: https://github.com/capsjac/opengles