Ejemplo n.º 1
0
 public EglSurface WrapDirect3D11Texture(EglPlatformOpenGlInterface egl, IntPtr handle)
 {
     if (PlatformApi != AngleOptions.PlatformApi.DirectX11)
     {
         throw new InvalidOperationException("Current platform API is " + PlatformApi);
     }
     return(egl.CreatePBufferFromClientBuffer(EGL_D3D_TEXTURE_ANGLE, handle, new[] { EGL_NONE, EGL_NONE }));
 }
Ejemplo n.º 2
0
 public EglSurface WrapDirect3D11Texture(EglPlatformOpenGlInterface egl, IntPtr handle, int offsetX, int offsetY, int width, int height)
 {
     if (PlatformApi != AngleOptions.PlatformApi.DirectX11)
     {
         throw new InvalidOperationException("Current platform API is " + PlatformApi);
     }
     return(egl.CreatePBufferFromClientBuffer(EGL_D3D_TEXTURE_ANGLE, handle, new[] { EGL_WIDTH, width, EGL_HEIGHT, height, EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE, EGL_TRUE, EGL_TEXTURE_OFFSET_X_ANGLE, offsetX, EGL_TEXTURE_OFFSET_Y_ANGLE, offsetY, EGL_NONE }));
 }