67 EGLConfig config = iPlugin->EglConfig(0); |
67 EGLConfig config = iPlugin->EglConfig(0); |
68 |
68 |
69 // Create a context |
69 // Create a context |
70 iContext = eglCreateContext(iPlugin->EglDisplay(), config, |
70 iContext = eglCreateContext(iPlugin->EglDisplay(), config, |
71 iPlugin->EglSharedContext(), NULL); |
71 iPlugin->EglSharedContext(), NULL); |
72 ASSERT(iContext); |
72 |
|
73 if(iContext == EGL_NO_CONTEXT) |
|
74 { |
|
75 EGLint err = eglGetError(); |
|
76 RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::InitializeL() - EGLContext creation failed: EglError -- %04x"), err); |
|
77 User::Leave(KErrGeneral); |
|
78 } |
73 |
79 |
74 // Create a pbuffer surface |
80 // Create a pbuffer surface |
75 iSurface = eglCreatePbufferFromClientBuffer(iPlugin->EglDisplay(), EGL_OPENVG_IMAGE, |
81 CHuiVg10RenderPlugin& renderer = CHuiStatic::Vg10Renderer(); |
76 iImage, config, NULL); |
82 iSurface = renderer.CreatePBufferSurface(iPlugin->EglDisplay(), EGL_OPENVG_IMAGE, |
77 ASSERT(iSurface); |
83 iImage, config); |
78 |
84 |
|
85 if(iSurface == EGL_NO_SURFACE) |
|
86 { |
|
87 EGLint err = eglGetError(); |
|
88 RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::InitializeL() - EGLSurface creation failed: EglError -- %04x"), err); |
|
89 User::Leave(KErrGeneral); |
|
90 } |
|
91 |
79 // Initialize the context |
92 // Initialize the context |
80 iGc = iPlugin->CreateGcL(); |
93 iGc = iPlugin->CreateGcL(); |
81 this->InitGc(aSize); |
94 this->InitGc(aSize); |
82 |
95 |
83 PopEGLContext(); |
96 PopEGLContext(); |