I'm having the same issue.
That error comes from having to tell the SWF container how to render Stage3D (for some reason, HTML or MXML for AIR has to be set to renderMode=direct)
I've forced the my SWF to render direct using
but Resolume still won't render the cube.
I've even gone as far as to add
Code: Select all
<use-direct-blit>true</use-direct-blit>
to the flex-config.xml file and still no luck rendering in Resolume.
My question is, how does Resolume render SWF files, does it take them as is or does it use the renderMode at all?
My code is below, you need the Flex SDK and Away3D framework to render (I use the gaming SDK from Adobe).
Code: Select all
package
{
// import Away3D classes to make a cube
import away3d.entities.Mesh;
import away3d.containers.View3D;
import away3d.lights.DirectionalLight;
import away3d.materials.ColorMaterial;
import away3d.primitives.CubeGeometry;
import away3d.primitives.WireframeCube;
import flash.display.Sprite;
import flash.events.Event;
// configure flash container
[SWF(frameRate = "60", backgroundColor = "0x000000", width = "800", height = "600", quality = "LOW", pageTitle = "boxTest45")]
public class Main extends Sprite
{
// variables for creating the 3D scene and cube
private var _view:View3D;
private var _color:ColorMaterial;
private var _cube:Mesh;
public function Main()
{
// setup a view for the 3D space
_view = new View3D();
addChild(_view);
// build scene
initScene();
}
private function initScene():void
{
initMaterials();
init3DObjects();
stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function initMaterials():void
{
// setup a color material
_color = new ColorMaterial(0xff0000,0.5);
// more materials
}
private function init3DObjects():void
{
// wireframe cube for testing, pass to _view.scene.addChild instead of _cube
var _wireCube:WireframeCube = new WireframeCube(300,300,50,0xff0000,1);
// make the cube
_cube = new Mesh(new CubeGeometry(300,300,50,3,3,3),_color);
// add the cube to the viewport
_view.scene.addChild(_cube);
}
private function enterFrameHandler(e:Event):void
{
// rotate the cube so we konw it's 3D
_cube.rotationX += 1.5;
_cube.rotationY += 1.5;
_view.render();
}
}
}