DrawImageRect in D3D
BlitzMax Forums/BlitzMax Programming/DrawImageRect in D3D
| ||
So I've been using Noel's excellent DrawImageRect function from the code archives, but now that we have the option to use Direct3D I'm sort of stuck as Noel's code is very OpenGL specific. Has anyone worked out a way to do a DrawImageRect with the Direct3D driver? And I know about the viewport tricks that people have been using but those don't allow you to rotate the resulting quad so I can't really use those... |
| ||
So I take it from the silence that we still don't have any official way of drawing pieces of an image? What's the deal with this? Seems like very baseline funtionality to me. |
| ||
Set viewport so that only the desired part of the image is draw? |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=49107 This allows you to define what part of the texture is drawn on the quad, just use normal rotate commands etc after you set the UV. et Voila. This works in both DirectX and OpenGL and is of course platform compatible. |
| ||
Ugh. Thanks all. I wish Mark would realize that this is sort of an important feature. You can't claim you have a language that is useful for developing games without it. |
| ||
I've added a DrawImageRect like B3D function to the end of Indies thread which works with DX and OpenGL. Hope it will help all those having such problems as well :) *its in the code archives as well* |