屏幕绘画的DirectX教程 [英] DirectX Tutorial for screen painting

查看:121
本文介绍了屏幕绘画的DirectX教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我将视频源绘制到WM_PAINT消息中的视频.

基本上,当我从源头收到框架时​​,我会调用Invalidate()并在OnPaint消息中使用
绘制框架 screenDC.BitBlt(clpRect.left,clpRect.top,clpRect.Width(),clpRect.Height(),&m_dbd.memDC,clpRect.left,clpRect.top,SRCCOPY);

当要显示许多fps时,对于这种体系结构,我会遇到性能问题,而另一个问题是,很多人建议我采用DirectX体系结构,以提高性能.我尝试在互联网上搜索一些教程,但是所有教程都非常复杂,它们教授如何使用复杂的几何对象,纹理,3d等...而是我需要更简单的东西,我只需要绘制bmp框架(存储在内存中)到屏幕上,就是这样,没有高级纹理,没有精灵,没有几何图形,没有3d,只适合我的bmp在屏幕上,完成.它不应该真的很复杂.在哪里可以找到教程或帮助?

Now I draw video sources to the video at WM_PAINT message.

basically when I receive a frame from my source, I call Invalidate() and in the OnPaint message I draw my frame with
screenDC.BitBlt( clpRect.left, clpRect.top, clpRect.Width(), clpRect.Height(), &m_dbd.memDC, clpRect.left, clpRect.top, SRCCOPY );

when I have many fps to show, with this architecture I have performance problem, in another question many people suggested me to pass to a directx architecture in order to improve performance. I try to search on internet some tutorial, but all of them are very complicated, they teach how to work with complex geometric objects, texture, 3d etc... rather I need something easier, I need just to paint my bmp frame (stored in memory) to the screen, that''s it, no advanced texture, no sprite, no geometrics draw, no 3d, just fit my bmp on screen, finish . It shouldn''t be really complicated. Where can I find a tutorial or help?

推荐答案

如果您还没有看过它,那将是一个很好的参考:
提高Direct2D应用程序的性能 [ ^ ]

这也很有用:
Direct2D:Windows 7绘图中的硬件加速 [ ^ ]

[更新]
对于XP和OpenGL,请查看 PicZoom:在OpenGL中创建的照片查看器 [ ^ ]

最好的问候
Espen Harlinn
If you haven''t looked at this, it''s a good reference:
Improving the Performance of Direct2D Applications[^]

This one is also useful:
Direct2D: Hardware Acceleration in Windows 7 Plotting[^]

[Update]
For XP and OpenGL have a look at PicZoom: A Photo Viewer Created in OpenGL[^]

Best regards
Espen Harlinn


这篇关于屏幕绘画的DirectX教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆