Move the #defines into the main generated header.

I initially thought I was going to have two sets of defines you chose
from using #include, but that never ended up being necessary.
macos/v1.5.9
Eric Anholt 11 years ago
parent 3d2a2b3c80
commit 982e39f188
  1. 4
      .gitignore
  2. 1
      include/epoxy/egl.h
  3. 1
      include/epoxy/gl.h
  4. 1
      include/epoxy/glx.h
  5. 1
      include/epoxy/wgl.h
  6. 4
      src/Makefile.am
  7. 6
      src/gen_dispatch.py

4
.gitignore vendored

@ -84,16 +84,12 @@ test-driver
gl_generated_dispatch.c
gl_generated.h
gl_generated_vtable_defines.h
glx_generated_dispatch.c
glx_generated.h
glx_generated_vtable_defines.h
egl_generated_dispatch.c
egl_generated.h
egl_generated_vtable_defines.h
wgl_generated_dispatch.c
wgl_generated.h
wgl_generated_vtable_defines.h

@ -51,7 +51,6 @@ extern "C" {
#pragma once
#include "epoxy/egl_generated.h"
#include "epoxy/egl_generated_vtable_defines.h"
bool epoxy_has_egl_extension(EGLDisplay *dpy, const char *extension);
int epoxy_egl_version(EGLDisplay *dpy);

@ -78,7 +78,6 @@ extern "C" {
#endif
#include "epoxy/gl_generated.h"
#include "epoxy/gl_generated_vtable_defines.h"
bool epoxy_has_gl_extension(const char *extension);
bool epoxy_is_desktop_gl(void);

@ -54,7 +54,6 @@ extern "C" {
#pragma once
#include "epoxy/glx_generated.h"
#include "epoxy/glx_generated_vtable_defines.h"
bool epoxy_has_glx_extension(Display *dpy, int screen, const char *extension);
int epoxy_glx_version(Display *dpy, int screen);

@ -49,7 +49,6 @@ extern "C" {
#pragma once
#include "epoxy/wgl_generated.h"
#include "epoxy/wgl_generated_vtable_defines.h"
bool epoxy_has_wgl_extension(HDC hdc, const char *extension);

@ -52,22 +52,18 @@ endif
GENERATED_GL_INCLUDES = \
$(builddir)/../include/epoxy/gl_generated.h \
$(builddir)/../include/epoxy/gl_generated_vtable_defines.h \
$()
GENERATED_GLX_INCLUDES = \
$(tuilddir)/../include/epoxy/glx_generated.h \
$(builddir)/../include/epoxy/glx_generated_vtable_defines.h \
$()
GENERATED_EGL_INCLUDES = \
$(tuilddir)/../include/epoxy/egl_generated.h \
$(builddir)/../include/epoxy/egl_generated_vtable_defines.h \
$()
GENERATED_WGL_INCLUDES = \
$(tuilddir)/../include/epoxy/wgl_generated.h \
$(builddir)/../include/epoxy/wgl_generated_vtable_defines.h \
$()
GENERATED_GL_SOURCE = gl_generated_dispatch.c

@ -519,11 +519,8 @@ class Generator(object):
func.args_decl))
self.outln('')
def write_proto_define_header(self, file, style):
self.write_header_header(file)
for func in self.sorted_functions:
self.outln('#define {0} epoxy_{1}{0}'.format(func.name, style))
self.outln('#define {0} epoxy_{0}'.format(func.name))
def write_function_ptr_resolver(self, func):
self.outln('static {0}'.format(func.ptr_type))
@ -776,5 +773,4 @@ for file in args.files:
generator.prepare_provider_enum()
generator.write_header(incdir + name + '_generated.h')
generator.write_proto_define_header(incdir + name + '_generated_vtable_defines.h', '')
generator.write_source(srcdir + name + '_generated_dispatch.c')

Loading…
Cancel
Save