1 // SPDX-FileCopyrightText: Copyright 2012 Intel Corporation
2 // SPDX-License-Identifier: BSD-2-Clause
6 #include "wcore_error.h"
7 #include "wcore_platform.h"
10 waffle_dl_check_enum(int32_t dl
)
13 case WAFFLE_DL_OPENGL
:
14 case WAFFLE_DL_OPENGL_ES1
:
15 case WAFFLE_DL_OPENGL_ES2
:
16 case WAFFLE_DL_OPENGL_ES3
:
19 wcore_errorf(WAFFLE_ERROR_BAD_PARAMETER
, "dl has bad value %#x",
26 waffle_dl_can_open(int32_t dl
)
28 if (!api_check_entry(NULL
, 0))
31 if (!waffle_dl_check_enum(dl
))
34 return api_platform
->vtbl
->dl_can_open(api_platform
, dl
);
38 waffle_dl_sym(int32_t dl
, const char *name
)
40 if (!api_check_entry(NULL
, 0))
43 if (!waffle_dl_check_enum(dl
))
46 return api_platform
->vtbl
->dl_sym(api_platform
, dl
, name
);