Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
glest
Commits
a8752273
Commit
a8752273
authored
2 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Move EglException code to debug module
parent
4a8cba58
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Glest/Egl.hs
+0
-9
0 additions, 9 deletions
src/Glest/Egl.hs
src/Glest/Egl/Debug.hs
+15
-1
15 additions, 1 deletion
src/Glest/Egl/Debug.hs
with
15 additions
and
10 deletions
src/Glest/Egl.hs
+
0
−
9
View file @
a8752273
...
...
@@ -49,15 +49,6 @@ data Egl = Egl {
context
::
EGLContext
}
data
EglException
=
EglException
EGLint
deriving
(
Eq
,
Exception
)
instance
Show
EglException
where
show
(
EglException
value
)
=
toErrorMessage
value
eglGetError
::
IO
EglException
eglGetError
=
EglException
<$>
[
CU
.
exp
|
EGLint
{
eglGetError
()
}
|
]
initializeEgl
::
IO
Egl
initializeEgl
=
do
clientExtensionsString
<-
...
...
This diff is collapsed.
Click to expand it.
src/Glest/Egl/Debug.hs
+
15
−
1
View file @
a8752273
...
...
@@ -3,7 +3,10 @@
module
Glest.Egl.Debug
(
initializeEglDebugHandler
,
toErrorMessage
toErrorMessage
,
EglException
,
eglGetError
,
)
where
import
Data.List
(
intersperse
,
singleton
)
...
...
@@ -32,6 +35,16 @@ data EglDebugMsgType
|
EglDebugMsgInfo
-- ^ EGL_DEBUG_MSG_INFO_KHR
deriving
stock
Show
data
EglException
=
EglException
EGLint
deriving
(
Eq
,
Exception
)
instance
Show
EglException
where
show
(
EglException
value
)
=
toErrorMessage
value
eglGetError
::
IO
EglException
eglGetError
=
EglException
<$>
[
CU
.
exp
|
EGLint
{
eglGetError
()
}
|
]
toDebugMessageType
::
EGLint
->
IO
EglDebugMsgType
toDebugMessageType
0x33B9
=
pure
EglDebugMsgCritical
toDebugMessageType
0x33BA
=
pure
EglDebugMsgError
...
...
@@ -58,6 +71,7 @@ toErrorMessage 0x300d = "EGL_BAD_SURFACE"
toErrorMessage
0x300e
=
"EGL_CONTEXT_LOST"
toErrorMessage
value
=
mconcat
[
"Invalid EGL error enum value ("
,
show
value
,
")"
]
initializeEglDebugHandler
::
IO
()
initializeEglDebugHandler
=
do
-- Requires EGL_KHR_debug
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment