Jump to content

dxRotateTexture and dxScaleTexture


Piorun

Recommended Posts

Hi,

My suggestion is to create two functions: dxRotateTexture and dxScaleTexture (ofc. for oop is Texture:rotate() and Texture:scale()) which will return new rotated and scaled texture or will work on texture in parameter. 

Link to post

How are you using your texture? Functions such as dxDrawImage and dxDrawImage3D already have rotation arguments.

I don't work with shaders much either, but if you're using your texture with a shader I assume you can just rotate the texture using the shader itself.

Link to post

You can already do that with render targets, i.e.:

  1. Create the render target with suitable dimensions
  2. Call dxSetRenderTarget(renderTarget)
  3. Draw the texture once using dxDrawImage (+ scale/rotate)
  4. Reset the render target: dxSetRenderTarget(nil)
  5. The resulting render target is your scaled/rotated texture
Link to post
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...