zoukankan      html  css  js  c++  java
  • 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我那么理解差不多是那个意思

  • 相关阅读:
    logback
    GC
    常用JVM配置参数
    JVM
    linux
    简单的webService 实例
    [转载]Java 工程师成神之路
    ActiveMQ 在mac 上的安装与运行
    subline3 + emmet 加快前端开发效率
    Spring WebMVC 4.1.4返回json时导致的 406(Not Acceptable)
  • 原文地址:https://www.cnblogs.com/minggoddess/p/3567251.html
Copyright © 2011-2022 走看看