Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
c29e4455
Commit
c29e4455
authored
Feb 04, 2018
by
Camilla Löwy
Browse files
Move more context logic out of glfwCreateWindow
parent
9bfa499d
Changes
2
Show whitespace changes
Inline
Side-by-side
src/context.c
View file @
c29e4455
...
...
@@ -46,6 +46,16 @@
//
GLFWbool
_glfwIsValidContextConfig
(
const
_GLFWctxconfig
*
ctxconfig
)
{
if
(
ctxconfig
->
share
)
{
if
(
ctxconfig
->
client
==
GLFW_NO_API
||
ctxconfig
->
share
->
context
.
client
==
GLFW_NO_API
)
{
_glfwInputError
(
GLFW_NO_WINDOW_CONTEXT
,
NULL
);
return
GLFW_FALSE
;
}
}
if
(
ctxconfig
->
source
!=
GLFW_NATIVE_CONTEXT_API
&&
ctxconfig
->
source
!=
GLFW_EGL_CONTEXT_API
&&
ctxconfig
->
source
!=
GLFW_OSMESA_CONTEXT_API
)
...
...
src/window.c
View file @
c29e4455
...
...
@@ -182,16 +182,6 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
wndconfig
.
title
=
title
;
ctxconfig
.
share
=
(
_GLFWwindow
*
)
share
;
if
(
ctxconfig
.
share
)
{
if
(
ctxconfig
.
client
==
GLFW_NO_API
||
ctxconfig
.
share
->
context
.
client
==
GLFW_NO_API
)
{
_glfwInputError
(
GLFW_NO_WINDOW_CONTEXT
,
NULL
);
return
NULL
;
}
}
if
(
!
_glfwIsValidContextConfig
(
&
ctxconfig
))
return
NULL
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment