Hola,
Usando OleDraw, que internamente llama a IViewObject::Draw()
...
hr = OleDraw(lpV, DVASPECT_TRANSPARENT, hdcDraw, &rTotal);
...
donde:
lpV – es una interfaz de IViewObject.
DVASPECT_TRANSPARENT dibuja usando alpha blenfing.
hdcDraw – offscreen HDC
rTotal – rectangulos cliente del total a pintar
El problema aparece cuando el hdcDraw lo quiero extraer de una textura de DirectX.
1.-Creo la textura vacia. (D3DFMT_A8R8G8B8)
2.-IDirect3DTexture9::GetSurfaceLevel
3.-IDirect3DSurface9::GetDC
falla el GetDC porque he creado una textura RGBA.
IDirect3DSurface9::GetDC is valid on the following formats only: D3DFMT_R5G6B5, D3DFMT_X1R5G5B5, D3DFMT_R8G8B8, and D3DFMT_X8R8G8B8. Formats that contain Alpha are not supported because the GDI implementations don't have a well-defined behavior on the alpha channel. For more information about formats, see D3DFORMAT.
Alguna idea de como puedo llegar a 'pintar' una textura con el contenido del hdcDraw con alpha ? el proceso deberia no ser muy lento, pues realizaria el proceso constantemente en el render.
Gracias.
Usando OleDraw, que internamente llama a IViewObject::Draw()
...
hr = OleDraw(lpV, DVASPECT_TRANSPARENT, hdcDraw, &rTotal);
...
donde:
lpV – es una interfaz de IViewObject.
DVASPECT_TRANSPARENT dibuja usando alpha blenfing.
hdcDraw – offscreen HDC
rTotal – rectangulos cliente del total a pintar
El problema aparece cuando el hdcDraw lo quiero extraer de una textura de DirectX.
1.-Creo la textura vacia. (D3DFMT_A8R8G8B8)
2.-IDirect3DTexture9::GetSurfaceLevel
3.-IDirect3DSurface9::GetDC
falla el GetDC porque he creado una textura RGBA.
IDirect3DSurface9::GetDC is valid on the following formats only: D3DFMT_R5G6B5, D3DFMT_X1R5G5B5, D3DFMT_R8G8B8, and D3DFMT_X8R8G8B8. Formats that contain Alpha are not supported because the GDI implementations don't have a well-defined behavior on the alpha channel. For more information about formats, see D3DFORMAT.
Alguna idea de como puedo llegar a 'pintar' una textura con el contenido del hdcDraw con alpha ? el proceso deberia no ser muy lento, pues realizaria el proceso constantemente en el render.
Gracias.