首页 > 其他 > 详细

GetSurfaceLevel

时间:2014-02-26 03:00:09      阅读:487      评论:0      收藏:0      [点我收藏+]
  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这个结构

用于 mipmap 或者cubetexture

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

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

 

 

GetSurfaceLevel

原文:http://www.cnblogs.com/minggoddess/p/3567251.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!