1# This .cfg file is used to generate the interface to the EGL routines
2# used internally by the EGLContext implementation.
3JavaOutputDir gensrc/classes
4NativeOutputDir gensrc/native/jogl/egl
5
6Package com.jogamp.opengl.egl
7Style InterfaceAndImpl
8JavaClass EGLExt
9ImplPackage jogamp.opengl.egl
10ImplJavaClass EGLExtImpl
11# Shouldn't matter which one of these we pick up
12Include egl-common.cfg
13
14# Only NIO direct function, no arrays ..
15NIOOnly __ALL__
16NIODirectOnly __ALL__
17
18ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/com/jogamp/opengl/egl/EGL.java
19
20# Uses function pointer, need to add manual code iff supporting
21IgnoreExtension EGL_ANDROID_blob_cache
22
23HierarchicalNativeOutput false
24
25# Use a ProcAddressTable so we dynamically look up the routines
26EmitProcAddressTable true
27ProcAddressTableClassName EGLExtProcAddressTable
28GetProcAddressTableExpr _table
29AccessControl jogamp.opengl.egl.EGLExtProcAddressTable PACKAGE_PRIVATE
30
31Import com.jogamp.opengl.egl.EGLExt
32Import com.jogamp.opengl.egl.EGLClientPixmapHI
33
34CustomCCode #include <stdio.h> /* android */
35CustomCCode #include <gluegen_stdint.h>
36CustomCCode #include <gluegen_stddef.h>
37CustomCCode /* Define EGL_EGLEXT_PROTOTYPES so that the EGL extension prototypes in
38CustomCCode    "eglext.h" are parsed. */
39CustomCCode #define EGL_EGLEXT_PROTOTYPES
40CustomCCode
41CustomCCode #include <EGL/egl.h>
42CustomCCode #include <EGL/eglext.h>
43
44# There are some #defines in eglext.h that GlueGen and PCPP don't currently handle
45CustomJavaCode EGLExt      /** Part of <code>EGL_KHR_image</code> */
46CustomJavaCode EGLExt      public static final long EGL_NO_IMAGE = 0;
47#CustomJavaCode EGLExt      /** Part of <code>EGL_KHR_reusable_sync</code> */
48#CustomJavaCode EGLExt      public static final long EGL_FOREVER_KHR = 0xFFFFFFFFFFFFFFFFL ;
49CustomJavaCode EGLExt      /** Part of <code>EGL_KHR_reusable_sync</code> */
50CustomJavaCode EGLExt      public static final long EGL_NO_SYNC_KHR = 0;
51
52CustomJavaCode EGLExt      public boolean isFunctionAvailable(String glFunctionName);
53CustomJavaCode EGLExt      public boolean isExtensionAvailable(String glExtensionName);
54
55CustomJavaCode EGLExtImpl  public EGLExtImpl(EGLContext context, EGLExtProcAddressTable table) {
56CustomJavaCode EGLExtImpl    this._context = context;
57CustomJavaCode EGLExtImpl    this._table = table;
58CustomJavaCode EGLExtImpl  }
59
60CustomJavaCode EGLExtImpl  public boolean isFunctionAvailable(String glFunctionName)
61CustomJavaCode EGLExtImpl  {
62CustomJavaCode EGLExtImpl    return _context.isFunctionAvailable(glFunctionName);
63CustomJavaCode EGLExtImpl  }
64
65CustomJavaCode EGLExtImpl  public boolean isExtensionAvailable(String glExtensionName)
66CustomJavaCode EGLExtImpl  {
67CustomJavaCode EGLExtImpl    return _context.isExtensionAvailable(glExtensionName);
68CustomJavaCode EGLExtImpl  }
69
70CustomJavaCode EGLExtImpl  private final EGLContext _context;
71CustomJavaCode EGLExtImpl  private final EGLExtProcAddressTable _table;
72CustomJavaCode EGLExtImpl  final EGLExtProcAddressTable getProcAdressTable() { return _table; }
73
74