os/graphics/openvg/openvgrefimplementation/sfopenvg/egl/egl.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2009 Symbian Foundation Ltd
sl@0
     3
* This component and the accompanying materials are made available
sl@0
     4
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
* which accompanies this distribution, and is available
sl@0
     6
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
*
sl@0
     8
* Initial Contributors:
sl@0
     9
* Symbian Foundation Ltd - initial contribution.
sl@0
    10
* 
sl@0
    11
* Contributors:
sl@0
    12
*
sl@0
    13
* Description:
sl@0
    14
* Implementation of EGL interface
sl@0
    15
*/
sl@0
    16
sl@0
    17
#include <egl.h>
sl@0
    18
#include "eglinternal.h"
sl@0
    19
#include <stdarg.h>
sl@0
    20
sl@0
    21
sl@0
    22
extern "C" {
sl@0
    23
sl@0
    24
EXPORT_C EGLint eglGetError(void)
sl@0
    25
	{
sl@0
    26
	return do_eglGetError();
sl@0
    27
	}
sl@0
    28
EXPORT_C EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id)
sl@0
    29
	{
sl@0
    30
	return do_eglGetDisplay(display_id);
sl@0
    31
	}
sl@0
    32
EXPORT_C EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
sl@0
    33
	{
sl@0
    34
	return do_eglInitialize(dpy, major, minor);
sl@0
    35
	}
sl@0
    36
EXPORT_C EGLBoolean eglTerminate(EGLDisplay dpy)
sl@0
    37
	{
sl@0
    38
	return do_eglTerminate(dpy);
sl@0
    39
	}
sl@0
    40
EXPORT_C const char* eglQueryString(EGLDisplay dpy, EGLint name)
sl@0
    41
	{
sl@0
    42
	return do_eglQueryString(dpy, name);
sl@0
    43
	}
sl@0
    44
EXPORT_C EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,EGLint config_size, EGLint *num_config)
sl@0
    45
	{
sl@0
    46
	return do_eglGetConfigs(dpy, configs,config_size, num_config);
sl@0
    47
	}
sl@0
    48
EXPORT_C EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,EGLConfig *configs, EGLint config_size,EGLint *num_config)
sl@0
    49
	{
sl@0
    50
	return do_eglChooseConfig(dpy, attrib_list,configs, config_size,num_config);
sl@0
    51
    }
sl@0
    52
EXPORT_C EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,EGLint attribute, EGLint *value)
sl@0
    53
	{
sl@0
    54
	return do_eglGetConfigAttrib(dpy, config,attribute, value);
sl@0
    55
	}
sl@0
    56
EXPORT_C EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,EGLNativeWindowType win,const EGLint *attrib_list)
sl@0
    57
	{
sl@0
    58
	return do_eglCreateWindowSurface(dpy, config,win,attrib_list);
sl@0
    59
	}
sl@0
    60
EXPORT_C EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,const EGLint *attrib_list)
sl@0
    61
	{
sl@0
    62
	return do_eglCreatePbufferSurface(dpy, config,attrib_list);
sl@0
    63
	}
sl@0
    64
EXPORT_C EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,EGLNativePixmapType pixmap,const EGLint *attrib_list)
sl@0
    65
	{
sl@0
    66
	return do_eglCreatePixmapSurface(dpy, config,pixmap,attrib_list);
sl@0
    67
	}
sl@0
    68
EXPORT_C EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
sl@0
    69
	{
sl@0
    70
	return do_eglDestroySurface(dpy, surface);
sl@0
    71
	}
sl@0
    72
EXPORT_C EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint *value)
sl@0
    73
	{
sl@0
    74
	return do_eglQuerySurface(dpy, surface,attribute, value);
sl@0
    75
	}
sl@0
    76
EXPORT_C EGLBoolean eglBindAPI(EGLenum api)
sl@0
    77
	{
sl@0
    78
	return do_eglBindAPI(api);
sl@0
    79
	}
sl@0
    80
EXPORT_C EGLenum eglQueryAPI(void)
sl@0
    81
	{
sl@0
    82
	return do_eglQueryAPI();
sl@0
    83
	}
sl@0
    84
EXPORT_C EGLBoolean eglWaitClient(void)
sl@0
    85
	{
sl@0
    86
	return do_eglWaitClient();
sl@0
    87
	}
sl@0
    88
EXPORT_C EGLBoolean eglReleaseThread(void)
sl@0
    89
	{
sl@0
    90
	return do_eglReleaseThread();
sl@0
    91
	}
sl@0
    92
EXPORT_C EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,EGLConfig config, const EGLint *attrib_list)
sl@0
    93
	{
sl@0
    94
	return do_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer,config, attrib_list);
sl@0
    95
	}
sl@0
    96
EXPORT_C EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,EGLint attribute, EGLint value)
sl@0
    97
	{
sl@0
    98
	return do_eglSurfaceAttrib(dpy, surface,attribute, value);
sl@0
    99
	}
sl@0
   100
EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
sl@0
   101
	{
sl@0
   102
	return do_eglBindTexImage(dpy, surface, buffer);
sl@0
   103
	}
sl@0
   104
EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
sl@0
   105
	{
sl@0
   106
	return do_eglReleaseTexImage(dpy, surface, buffer);
sl@0
   107
	}
sl@0
   108
EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
sl@0
   109
	{
sl@0
   110
	return do_eglSwapInterval(dpy, interval);
sl@0
   111
	}
sl@0
   112
EXPORT_C EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,EGLContext share_context,const EGLint *attrib_list)
sl@0
   113
	{
sl@0
   114
	return do_eglCreateContext(dpy, config,share_context,attrib_list);
sl@0
   115
	}
sl@0
   116
EXPORT_C EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
sl@0
   117
	{
sl@0
   118
	return do_eglDestroyContext(dpy, ctx);
sl@0
   119
	}
sl@0
   120
EXPORT_C EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,EGLSurface read, EGLContext ctx)
sl@0
   121
	{
sl@0
   122
	return do_eglMakeCurrent(dpy, draw,read, ctx);
sl@0
   123
	}
sl@0
   124
EXPORT_C EGLContext eglGetCurrentContext(void)
sl@0
   125
	{
sl@0
   126
	return do_eglGetCurrentContext();
sl@0
   127
	}
sl@0
   128
EXPORT_C EGLSurface eglGetCurrentSurface(EGLint readdraw)
sl@0
   129
	{
sl@0
   130
	return do_eglGetCurrentSurface(readdraw);
sl@0
   131
	}
sl@0
   132
EXPORT_C EGLDisplay eglGetCurrentDisplay(void)
sl@0
   133
	{
sl@0
   134
	return do_eglGetCurrentDisplay();
sl@0
   135
	}
sl@0
   136
EXPORT_C EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx,EGLint attribute, EGLint *value)
sl@0
   137
	{
sl@0
   138
	return do_eglQueryContext(dpy, ctx,attribute, value);
sl@0
   139
	}
sl@0
   140
EXPORT_C EGLBoolean eglWaitGL(void)
sl@0
   141
	{
sl@0
   142
	return do_eglWaitGL();
sl@0
   143
	}
sl@0
   144
EXPORT_C EGLBoolean eglWaitNative(EGLint engine)
sl@0
   145
	{
sl@0
   146
	return do_eglWaitNative(engine);
sl@0
   147
	}
sl@0
   148
EXPORT_C EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
sl@0
   149
	{
sl@0
   150
	return do_eglSwapBuffers(dpy, surface);
sl@0
   151
	}
sl@0
   152
EXPORT_C EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,EGLNativePixmapType target)
sl@0
   153
	{
sl@0
   154
	return do_eglCopyBuffers(dpy, surface,target);
sl@0
   155
	}
sl@0
   156
sl@0
   157
typedef void (*eglfPtr)(...);
sl@0
   158
EXPORT_C void (*eglGetProcAddress(const char *procname))(...)
sl@0
   159
	{
sl@0
   160
    eglfPtr pname = do_eglGetProcAddress(procname);
sl@0
   161
    return pname;
sl@0
   162
	}
sl@0
   163
}
sl@0
   164