Copy link to clipboard
Copied
This sample is worked http://pastebin.com/B0eN8EGj
....
var texture:* = context3D.createTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);
...
fragmentShader.assemble(Context3DProgramType.FRAGMENT,
"tex ft1, v0, fs0 <2d, repeat, linear>\n"+
"mov oc, ft1"
);
.....
If creat RectangleTexture:
var texture:* = context3D.createRectangleTexture(bitmapData.width, bitmapData.height, Context3DTextureFormat.BGRA, false);
texture.uploadFromBitmapData(bitmapData);
context3D.setTextureAt(0, texture);
app does not display anything.
How do I create a repeating RectangleTexture ?