访问变换后的纹理的像素数据 [英] accessing a transformed texture's pixel data
本文介绍了访问变换后的纹理的像素数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
在通过D3DXMatrixTransformation2D()和texture-> SetTransform()转换纹理后,如何访问纹理的TRANSFORMED像素数据?
我正在尝试进行2D像素完美碰撞检测,如果您只能使用texture-> LockRect()访问未转换的像素数据,那是不可能的.
任何人有任何想法吗?
Hello everyone
How do i access the TRANSFORMED pixel data for a texture, after it has been transformed by D3DXMatrixTransformation2D() and texture->SetTransform()?
I''m trying to do 2D pixel perfect collision detection and it''s impossible if you can only access the untransformed pixel data using texture->LockRect().
Anybody got any ideas?
推荐答案
将其绘制在内存dc上并执行GetPixel()
paint it on a memory dc and do GetPixel()
这篇关于访问变换后的纹理的像素数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文