equal
deleted
inserted
replaced
67 /*! \internal \brief OpenGL surface record */ |
67 /*! \internal \brief OpenGL surface record */ |
68 typedef struct { |
68 typedef struct { |
69 EGLSurface handle; |
69 EGLSurface handle; |
70 M3Gbitmask bufferBits; |
70 M3Gbitmask bufferBits; |
71 M3Gbitmask type; |
71 M3Gbitmask type; |
|
72 M3Guint width; |
|
73 M3Guint height; |
|
74 M3Guint format; |
72 M3Guint targetHandle; |
75 M3Guint targetHandle; |
|
76 void* pixels; |
73 M3Guint lastUseTime; |
77 M3Guint lastUseTime; |
74 } GLSurfaceRecord; |
78 } GLSurfaceRecord; |
75 #endif /*!M3G_NGL_CONTEXT_API*/ |
79 #endif /*!M3G_NGL_CONTEXT_API*/ |
76 |
80 |
77 /*! |
81 /*! |
80 typedef struct |
84 typedef struct |
81 { |
85 { |
82 M3Gbitmask type; |
86 M3Gbitmask type; |
83 M3GPixelFormat format; |
87 M3GPixelFormat format; |
84 M3Gint width, height; |
88 M3Gint width, height; |
85 # if defined(M3G_NGL_CONTEXT_API) |
|
86 M3Guint stride; |
89 M3Guint stride; |
87 /*@shared@*/ void *pixels, *lockedPixels; |
90 /*@shared@*/ void *pixels, *lockedPixels; |
88 # else |
|
89 EGLSurface surface; |
91 EGLSurface surface; |
90 # endif |
|
91 M3Guint handle; |
92 M3Guint handle; |
92 M3Guint userData; |
93 M3Guint userData; |
93 |
94 |
94 /*! |
95 /*! |
95 * \internal |
96 * \internal |
1322 * release any GL resources that might have been release since the |
1323 * release any GL resources that might have been release since the |
1323 * last time we rendered, then release the GL context so we don't |
1324 * last time we rendered, then release the GL context so we don't |
1324 * hog resources */ |
1325 * hog resources */ |
1325 # if !defined(M3G_NGL_CONTEXT_API) |
1326 # if !defined(M3G_NGL_CONTEXT_API) |
1326 if (ctx->target.type != SURFACE_EGL) { |
1327 if (ctx->target.type != SURFACE_EGL) { |
1327 m3gSwapBuffers(ctx->target.surface); |
1328 // m3gSwapBuffers(ctx->target.surface); |
1328 } |
1329 } |
1329 # endif |
1330 # endif |
1330 m3gCollectGLObjects(M3G_INTERFACE(ctx)); |
1331 m3gCollectGLObjects(M3G_INTERFACE(ctx)); |
1331 # if !defined(M3G_NGL_CONTEXT_API) |
1332 # if !defined(M3G_NGL_CONTEXT_API) |
1332 m3gMakeGLCurrent(NULL); |
1333 m3gMakeGLCurrent(NULL); |