我搜索过但没有发现任何与C ++代码和DX LPDIRECT3DTEXTURE9 ,我能找到的是其他引擎的每像素冲突,我需要原生的东西,现在我有一个边界框碰撞,按预期工作,但你知道当碰撞发生在两个alpha像素之间时,它也会将其报告为true,因此我需要增强它并按像素进行渲染。
所以目前我有两个Rects和两个LPDIRECT3DTEXTURE9 ,有了intersectRect函数我可以知道是否有碰撞,那么我需要进一步处理lockRect和pbits,但似乎我无法弄明白。
谢谢
I have searched and haven't found anything related to C++ code and DX LPDIRECT3DTEXTURE9, all i can find is per pixel collisions for other engines, i need something native , now i have a bounding box collisions which works as expected, but as you know when the collision happens between two alpha pixels it will also report it as true, so i need to enhance it and make it per pixel.
So currently i have two Rects and two LPDIRECT3DTEXTURE9, with intersectRect function i can know if there is a collision, then i need go further by dealing with lockRect and pbits but seems i cannot figure it out.
Thanks
最满意答案
没关系,我解决它,它与我描述的方式相同,锁定并循环在pbits上。
Never mind, i solve it, its the same way i described, lockrect and loop over pbits.
更多推荐
发布评论