equal
deleted
inserted
replaced
198 else if(aExtensionBelongsTo == EIsVG) |
198 else if(aExtensionBelongsTo == EIsVG) |
199 { |
199 { |
200 INFO_PRINTF2(_L("thread %d: Calling vgGetString for VG_EXTENSIONS)"), iThreadIdx); |
200 INFO_PRINTF2(_L("thread %d: Calling vgGetString for VG_EXTENSIONS)"), iThreadIdx); |
201 |
201 |
202 // OpenVG needs a current VG context before it will allow the call to vgGetString |
202 // OpenVG needs a current VG context before it will allow the call to vgGetString |
203 TSgImageInfoOpenVgTarget imageInfo; |
203 EGLConfig currentConfig = GetConfigExactMatchL(EPBufferAttribsColor64K); |
204 imageInfo.iSizeInPixels = KPixmapSize; |
204 CreatePbufferSurfaceAndMakeCurrentL(currentConfig, TSize(1,1), EGL_OPENVG_API); |
205 imageInfo.iPixelFormat = EUidPixelFormatXRGB_8888; |
|
206 #ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE |
|
207 imageInfo.iUsage = ESgUsageBitOpenVgSurface; |
|
208 #else |
|
209 imageInfo.iUsage = ESgUsageOpenVgTarget; |
|
210 #endif |
|
211 CreatePixmapSurfaceAndMakeCurrentAndMatchL(imageInfo,CTestEglSession::EResourceCloseSgImageEarly); |
|
212 |
205 |
213 extensionsString = (const char*) vgGetString(VG_EXTENSIONS); |
206 extensionsString = (const char*) vgGetString(VG_EXTENSIONS); |
214 |
207 |
215 //cleanup the context & surface |
208 //cleanup the context & surface |
216 CleanupSurfaceSgImageL(); |
209 CleanupSurfaceSgImageL(); |
881 iSgImage.Close(); |
874 iSgImage.Close(); |
882 CloseSgDriver(); |
875 CloseSgDriver(); |
883 } |
876 } |
884 |
877 |
885 // Create a context for drawing to/reading from the pixmap surface and make it current |
878 // Create a context for drawing to/reading from the pixmap surface and make it current |
886 const EGLint KAttribsListCtxNone[] = { EGL_NONE };; |
879 const EGLint KAttribsListCtxNone[] = { EGL_NONE }; |
887 const EGLint KAttribsListCtxGles2[] = { EGL_CONTEXT_CLIENT_VERSION, aRenderVersionNumber, EGL_NONE }; |
880 const EGLint KAttribsListCtxGles2[] = { EGL_CONTEXT_CLIENT_VERSION, aRenderVersionNumber, EGL_NONE }; |
888 const EGLint* attrib_list_ctx = (aBindAPI == EGL_OPENGL_ES_API && aRenderVersionNumber == 2) ? KAttribsListCtxGles2 : KAttribsListCtxNone; |
881 const EGLint* attrib_list_ctx = (aBindAPI == EGL_OPENGL_ES_API && aRenderVersionNumber == 2) ? KAttribsListCtxGles2 : KAttribsListCtxNone; |
889 iContext = eglCreateContext(iDisplay, config, EGL_NO_CONTEXT, attrib_list_ctx); |
882 iContext = eglCreateContext(iDisplay, config, EGL_NO_CONTEXT, attrib_list_ctx); |
890 ASSERT_EGL_TRUE(iContext != EGL_NO_CONTEXT); |
883 ASSERT_EGL_TRUE(iContext != EGL_NO_CONTEXT); |
891 ASSERT_EGL_TRUE(eglMakeCurrent(iDisplay, iSurface, iSurface, iContext)); |
884 ASSERT_EGL_TRUE(eglMakeCurrent(iDisplay, iSurface, iSurface, iContext)); |