I'm creating an MFC application that uses skia for rendering.
Now when I call wglMakeCurrent with no scroll (Scroll position is 0, 0) it works fine.
But when I change the scroll position, calling wglMakeCurrent failed and GetLastError returns 2004.
Note: My view is inherited from CScrollView
Here is the sample I'm using in OnDraw:
HDC hdc = pDC->m_hDC;
fHGLRC = SkCreateWGLContext(hdc, 0, kGLPreferCompatibilityProfile_SkWGLContextRequest);
if (wglMakeCurrent(hdc, fHGLRC))
{
const GrGLInterface* fInterface = GrGLCreateNativeInterface();
fContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)fInterface);
{
GrBackendRenderTargetDesc desc;
desc.fWidth = 2000;
desc.fHeight = 3000;
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
GrTextureProvider* provider = fContext->textureProvider();
fRenderTarget = provider->wrapBackendRenderTarget(desc);
}
surface = SkSurface::NewRenderTargetDirect(_fRenderTarget);
//Do Draw Stuff
surface->getCanvas();
....etc--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.