Deforming images...

BlitzMax Forums/BlitzMax Beginners Area/Deforming images...

ragtag(Posted 2006) [#1]
Is there a way to move the vertices on the corner of images in BlitzMax, preferebly without having to resort to doing it directly in OpenGL.

Ragnar


LosButcher(Posted 2006) [#2]
Are you talking about MidhandleImage() or alike?


ragtag(Posted 2006) [#3]
No. MidHandleImage just sets the handle or rotational pivot of the image. That's not what I'm looking for.

What I'm talking about is that BlitzMax uses OpenGL to draw images. Therefore I'm assuming images are drawn onto either single quad polygons or two triangular polygons. What I want to do is to be able to move each corners of the polygon independently, effectivly stretching the image, skewing it, turning it in perspective etc. Having access to the vertex coloring too would be a bonus. Unless there is something I've missed Max2D doesn't cover this, so I would have to figure out how to use OpenGL...so is there something I missed?

Ragnar


tonyg(Posted 2006) [#4]
Is this what TD3D7ImageFrame setuv method does?
Not sure about the OGL method but somebody posted some code here


Haramanai(Posted 2006) [#5]
Images drawn onto a quad. But I don't thing that you can trasform them...
Check the TQuad type in the Max2d.Bmx
I thing TQuads are oriented boxies. So there must be always orthogonal. This abandon the possibility to do the deformation you have in you mind.
I tried to draw textured quads or triangles but sometimes I get wierd results when I involve Max2D drawing.


TeaVirus(Posted 2006) [#6]
Sounds like you need Indiepath's modules:

http://www.blitzmax.com/Community/posts.php?topic=55716

Take a look at textured poly.