Can you brief me in what the actual problem is? So I won't have to dig it out myself
Current 2D code of D3D11Client works this way:
There're 2 types of textures;
1."Texture". these textures have mipmaps number specified by user and no restrictions to format (D3DX11GetImageInfoFromFile() decides what format a texture will have, usually it is same format that was in file) These textures are being used as vessel mesh textures and can be created only by loading from file.They can work only as SRs.
2."Surface" can be used as SRs as well as RTs in 2D code. They must have B8G8R8A8_UNORM format only, have no mipmaps, have GDI-compatibility flag, and must have SampleCount == 1. These "surface"s are being used as HUD, MFD, any 2D buffers, GDI-buffer for back buffer etc."surface"s can be created by conversion from "texture"s, by clbkCreateSurface() or from bitmap. "surface" can be used as mesh texture. (examples: HUD/MFDs)
Blit/Fill and similar functions works only with "surfaces" and if they encounter "texture" they create "surface" of the same size, render "texture" to "surface", and switch these 2 objects with memcpy(). then original "texture" (that have pointer of new "surface") is deleted. (See TextureMgr::ConvertSurfaceToTexture() function ).
in new beta there're:
render params:
RP_ISTLDEVICE or T&L. since it is ancient thing, and FL10/FL11 devices doesn't have problems with it, we may set it to 1 always
RP_REQUIRETEXPOW2 I didn't encouner any problems with power of 2 (all sizes works), so we don't need this.
clbkCreateSuraceEx()
if by CPU access is meant GDI then:
OAPISURFACE_RO all "surface"s can be rad by both CPU & GPU.
OAPISURFACE_RW all "surface"s can be updated by GPU as well, and may work as RTs
OAPISURFACE_GDI all "surface"s can be read by GPU and be blit()'ed to other "surface"s
OAPISURFACE_MIPMAPS "surface" can't have mipmap it is required for D3D11/GDI compatibility
OAPISURFACE_NOALPHA we can't choose format for "surface" it B8G8R8A8 required
clbkLoadSurface()
we can add a method for Texture class to do this, or just create "texture" that will be converted to "surface" anyway.
clbkBeginBltGroup and clbkEndBltGroup
we don't need this. current blitting is done by ID3D11DeviceContext::CopySubresourceRegion() that doesn't require such params.
So, I think in order to make D3D11Client compatible with 2010P2 we need to recompile it and just connect new functions to old 2D code. I see in debugger that the client currently CTDs on things like tex->bTex where tex is NULL (FillSurface()). may be it is because new functions aren't implemented or Orbiter want to fill entire back buffer with some color.