File tree 2 files changed +12
-0
lines changed
glad/generator/c/templates
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ extern "C" {
66
66
{% block commands %}
67
67
{{ template_utils .write_function_typedefs (feature_set .commands ) }}
68
68
{% if not options .mx %}
69
+ #ifdef __INTELLISENSE__
70
+ {{ template_utils .write_function_definitions (feature_set .commands ) }}
71
+ #else
69
72
{{ template_utils .write_function_declarations (feature_set .commands , debug = options .debug ) }}
73
+ #endif
70
74
{ % else %}
71
75
typedef struct Glad {{ feature_set .name |api }}Context {
72
76
void * userptr ;
@@ -93,9 +97,13 @@ GLAD_API_CALL Glad{{ feature_set.name|api }}Context* glad_{{ feature_set.name }}
93
97
#define GLAD_ {{ extension.name }} (glad_{{ feature_set.name }}_context->{{ extension.name|no_prefix }})
94
98
{% endfor %}
95
99
100
+ #ifdef __INTELLISENSE__
101
+ {{ template_utils .write_function_definitions (feature_set .commands ) }}
102
+ #else
96
103
{% for command in feature_set .commands %}
97
104
#define {{ command .name }} (glad_ {{ feature_set .name }}_context -> {{ command .name |no_prefix }})
98
105
{% endfor %}
106
+ #endif
99
107
{% endif %}
100
108
101
109
{% endif %}
Original file line number Diff line number Diff line change 10
10
{{ template_utils .write_function_typedefs (feature_set .commands ) }}
11
11
{# these are already defined in windows.h #}
12
12
{% set blacklist = feature_set .features [0 ].get_requirements (spec , feature_set = feature_set ).commands %}
13
+ #ifdef __INTELLISENSE__
14
+ {{ template_utils .write_function_definitions (feature_set .commands |reject ('existsin' , blacklist )) }}
15
+ #else
13
16
{{ template_utils .write_function_declarations (feature_set .commands |reject ('existsin' , blacklist )) }}
17
+ #endif
14
18
{% endblock %}
15
19
16
20
You can’t perform that action at this time.
0 commit comments