问各位一下,lpDD->CreateSurface(NULL,lpOffscreen,NULL)。发现lpOffscreen这个值为0X00000000。是我的显卡不支持YV12吗?再请问一下各位,如果我要显示直接显示YV12格式,那该怎么做?

解决方案 »

  1.   

    建议检查一下硬件的属性,可以参考下面的代码:
    DDCAPS  ddcaps;    
    ddcaps.dwSize  =  sizeof  DDCAPS;  
    lpDD->GetCaps(&ddcaps,  NULL);  
    然后再查看ddcaps的属性
      

  2.   

    many Display cards have supported YV12 using DDraw.
    if it is not supported by your Display Card, Maybe u have to converting the YV12 buffer to RGB buffer, and store the buffer in RGB directdrawsurface, then Blit it.