Use RectangleTexture with setRenderToTexture
Has anyone had any luck with using context3D.setRenderToTexture with an instance of the RectangleTexture that is not a power of two? When I create a RectangleTexture with the dimensions of the screen (in my test environment 1440 x 900) and assign it using context3D.setRenderToTexture nothing is drawn to the texture. This problem does not occur if I use a Texture (power of two).
Steps to Reproduce:
- Create a rectangle texture the dimensions of the screen.
- Set the context to use the texture.
- Use drawTriangles to draw the vertex and index data to the texture.
- Set the context to use the back buffer
- Draw the texture into the back buffer and nothing will appear
This is the shader I am using to draw the render texture into the back buffer:
Vertex:
mov op, va0
mov v0, va1
Fragment:
tex ft0, v0, fs0 <2d, nomip, clamp, linear>
mov oc, ft0
If you create an instance of Texture and follow the above steps correctly the problem goes away.
