GetSurfaceLevel

  if( SUCCEEDED( g_pTexture->GetSurfaceLevel( 0, &pSurface) ) )
    {
        pd3dDevice->SetRenderTarget( 0, pSurfac );
        SAFE_RELEASE( pSurfac );
    }
GetSurfaceLevel这个是不是 把 一个surface和texture给关联起来了 
对那个suiface的修改 就是对texture的修改?
 SetRenderTarget 然后又把这个surface 设置到和 backbuffer关联 
所以 最后 屏幕显示的内容 被自动存进了 g_pTexture


Parameters
Level [in]
UINT
Identifies a level of the texture resource. This method returns a surface for the level specified by this parameter. The top-level surface is denoted by 0.

ppSurfaceLevel [out]
IDirect3DSurface9
Address of a pointer to an IDirect3DSurface9 interface, representing the returned surface.

这个猜想对不对呢

]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

texture里面有surface这个结构

用于 mipmaps

一个texture里面有很多surface 用level 来标识

得到了其中一个的指针 指定给render target我那么理解差不多是那个意思

 

 

转载于:https://www.cnblogs.com/minggoddess/p/3567251.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值