1 // Generated Code - DO NOT EDIT !!
2 // generated by 'emugen'
5 #include "renderControl_client_context.h"
9 GLint rcGetRendererVersion();
10 EGLint rcGetEGLVersion(EGLint* major, EGLint* minor);
11 EGLint rcQueryEGLString(EGLenum name, void* buffer, EGLint bufferSize);
12 EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize);
13 EGLint rcGetNumConfigs(uint32_t* numAttribs);
14 EGLint rcGetConfigs(uint32_t bufSize, GLuint* buffer);
15 EGLint rcChooseConfig(EGLint* attribs, uint32_t attribs_size, uint32_t* configs, uint32_t configs_size);
16 EGLint rcGetFBParam(EGLint param);
17 uint32_t rcCreateContext(uint32_t config, uint32_t share, uint32_t glVersion);
18 void rcDestroyContext(uint32_t context);
19 uint32_t rcCreateWindowSurface(uint32_t config, uint32_t width, uint32_t height);
20 void rcDestroyWindowSurface(uint32_t windowSurface);
21 uint32_t rcCreateColorBuffer(uint32_t width, uint32_t height, GLenum internalFormat);
22 void rcOpenColorBuffer(uint32_t colorbuffer);
23 void rcCloseColorBuffer(uint32_t colorbuffer);
24 void rcSetWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer);
25 int rcFlushWindowColorBuffer(uint32_t windowSurface);
26 EGLint rcMakeCurrent(uint32_t context, uint32_t drawSurf, uint32_t readSurf);
27 void rcFBPost(uint32_t colorBuffer);
28 void rcFBSetSwapInterval(EGLint interval);
29 void rcBindTexture(uint32_t colorBuffer);
30 void rcBindRenderbuffer(uint32_t colorBuffer);
31 EGLint rcColorBufferCacheFlush(uint32_t colorbuffer, EGLint postCount, int forRead);
32 void rcReadColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels);
33 int rcUpdateColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels);
38 static renderControl_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
39 void renderControl_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
40 #define GET_CONTEXT renderControl_client_context_t * ctx = getCurrentContext()
43 GLint rcGetRendererVersion()
46 return ctx->rcGetRendererVersion(ctx);
49 EGLint rcGetEGLVersion(EGLint* major, EGLint* minor)
52 return ctx->rcGetEGLVersion(ctx, major, minor);
55 EGLint rcQueryEGLString(EGLenum name, void* buffer, EGLint bufferSize)
58 return ctx->rcQueryEGLString(ctx, name, buffer, bufferSize);
61 EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize)
64 return ctx->rcGetGLString(ctx, name, buffer, bufferSize);
67 EGLint rcGetNumConfigs(uint32_t* numAttribs)
70 return ctx->rcGetNumConfigs(ctx, numAttribs);
73 EGLint rcGetConfigs(uint32_t bufSize, GLuint* buffer)
76 return ctx->rcGetConfigs(ctx, bufSize, buffer);
79 EGLint rcChooseConfig(EGLint* attribs, uint32_t attribs_size, uint32_t* configs, uint32_t configs_size)
82 return ctx->rcChooseConfig(ctx, attribs, attribs_size, configs, configs_size);
85 EGLint rcGetFBParam(EGLint param)
88 return ctx->rcGetFBParam(ctx, param);
91 uint32_t rcCreateContext(uint32_t config, uint32_t share, uint32_t glVersion)
94 return ctx->rcCreateContext(ctx, config, share, glVersion);
97 void rcDestroyContext(uint32_t context)
100 ctx->rcDestroyContext(ctx, context);
103 uint32_t rcCreateWindowSurface(uint32_t config, uint32_t width, uint32_t height)
106 return ctx->rcCreateWindowSurface(ctx, config, width, height);
109 void rcDestroyWindowSurface(uint32_t windowSurface)
112 ctx->rcDestroyWindowSurface(ctx, windowSurface);
115 uint32_t rcCreateColorBuffer(uint32_t width, uint32_t height, GLenum internalFormat)
118 return ctx->rcCreateColorBuffer(ctx, width, height, internalFormat);
121 void rcOpenColorBuffer(uint32_t colorbuffer)
124 ctx->rcOpenColorBuffer(ctx, colorbuffer);
127 void rcCloseColorBuffer(uint32_t colorbuffer)
130 ctx->rcCloseColorBuffer(ctx, colorbuffer);
133 void rcSetWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer)
136 ctx->rcSetWindowColorBuffer(ctx, windowSurface, colorBuffer);
139 int rcFlushWindowColorBuffer(uint32_t windowSurface)
142 return ctx->rcFlushWindowColorBuffer(ctx, windowSurface);
145 EGLint rcMakeCurrent(uint32_t context, uint32_t drawSurf, uint32_t readSurf)
148 return ctx->rcMakeCurrent(ctx, context, drawSurf, readSurf);
151 void rcFBPost(uint32_t colorBuffer)
154 ctx->rcFBPost(ctx, colorBuffer);
157 void rcFBSetSwapInterval(EGLint interval)
160 ctx->rcFBSetSwapInterval(ctx, interval);
163 void rcBindTexture(uint32_t colorBuffer)
166 ctx->rcBindTexture(ctx, colorBuffer);
169 void rcBindRenderbuffer(uint32_t colorBuffer)
172 ctx->rcBindRenderbuffer(ctx, colorBuffer);
175 EGLint rcColorBufferCacheFlush(uint32_t colorbuffer, EGLint postCount, int forRead)
178 return ctx->rcColorBufferCacheFlush(ctx, colorbuffer, postCount, forRead);
181 void rcReadColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels)
184 ctx->rcReadColorBuffer(ctx, colorbuffer, x, y, width, height, format, type, pixels);
187 int rcUpdateColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels)
190 return ctx->rcUpdateColorBuffer(ctx, colorbuffer, x, y, width, height, format, type, pixels);