惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
D
DataBreaches.Net
腾讯CDC
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
罗磊的独立博客
月光博客
月光博客
MyScale Blog
MyScale Blog
U
Unit 42
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
G
Google Developers Blog
博客园 - 【当耐特】
D
Docker
I
InfoQ
雷峰网
雷峰网

博客园 - woaiusd

claude各种客户端的关系 pytorch对大模型推理,实现简单的对话 Agent原理与模拟 为红米Note 5 Pro编译Lineage OS 15.1的各种坑 OBS插件学习入门:一个非常简单的、调节音量的filter 从工程角度看C++观察者模式中的接口是否需要提供默认的实现 Windows音频SDK的发展历程 闲话__stdcall, __cdecl, __fastcall出现的历史背景以及各自解决的问题 为什么需要超出48K的音频采样率,以及PCM到DSD的演进 wireshark使用笔记 managed_shared_memory.construct造成的性能损失 java.lang.NullPointerException Ubuntu中QT使用FFmpeg的奇怪问题 QT开启C++11的支持 尝鲜CodeBlocks ops中set_sysclk set_clkdiv set_pll详解 在内核中异步请求设备固件firmware的测试代码 探究MaxxBass音效 Alsa驱动snd_soc_read的底层实现 Device Drivers Should Not Do Power Management 探究platform_driver中“多态”思想 探究platform_driver中的shutdown用途
C语言调用DIRECT3D的实例代码,通过lpVtbl字段进行
woaiusd · 2018-04-12 · via 博客园 - woaiusd

m_pDirect3D9 = Direct3DCreate9(D3D_SDK_VERSION);

    int w = 1920;
    int h = 1080;

    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory(&d3dpp, sizeof(d3dpp));
    d3dpp.BackBufferWidth = w;
    d3dpp.BackBufferHeight = h;
    d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
    d3dpp.BackBufferCount = 1;
    d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
    d3dpp.SwapEffect = D3DSWAPEFFECT_COPY;
    d3dpp.hDeviceWindow = NULL;
    d3dpp.Windowed = TRUE;
    d3dpp.EnableAutoDepthStencil = FALSE;
    d3dpp.Flags = D3DPRESENTFLAG_VIDEO;
    d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;

    LRESULT result = m_pDirect3D9->lpVtbl->CreateDevice(m_pDirect3D9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED, &d3dpp, &m_pDirect3DDevice);
    if (SUCCEEDED(result))
    {
        result = m_pDirect3DDevice->lpVtbl->CreateTexture(m_pDirect3DDevice, w, h, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &managedTexture, gc->shtex_data->tex_handle);
        if (result)
        {

        }
    }