I can’t draw full-screen quad

Software: Away3D 4.x

skywalker, Newbie
Posted: 07 May 2013 04:39 PM   Total Posts: 1

Hi, i am implementing deferred lighting in away3d, and i want to draw a screen quad but not using filter. I made a test in DefaultRenderer like that:

protected override function executeRender(entityCollector EntityCollectortarget TextureBase nullscissorRect Rectangle nullsurfaceSelector int 0) : void
  {
   updateLights
(entityCollector);

   
// otherwise RTT will interfere with other RTTs
   
if (target{
    drawRenderables
(entityCollector.opaqueRenderableHeadentityCollectorRTT_PASSES);
    
drawRenderables(entityCollector.blendedRenderableHeadentityCollectorRTT_PASSES);
   
}

   super
.executeRender(entityCollectortargetscissorRectsurfaceSelector);
   
   
// test for draw a full screen quad
   ////////////////////////////////////////////////////////////////
   
   
var _rttManager RTTBufferManager RTTBufferManager.getInstance(_stage3DProxy);
   var 
vertexBuffer VertexBuffer3D _rttManager.renderToScreenVertexBuffer;
   var 
indexBuffer IndexBuffer3D _rttManager.indexBuffer;
   
_context.setVertexBufferAt(0vertexBuffer0Context3DVertexBufferFormat.FLOAT_2);
   
_context.setVertexBufferAt(1vertexBuffer2Context3DVertexBufferFormat.FLOAT_2);
   
   
_context.setDepthTest(falseContext3DCompareMode.ALWAYS);
   
_context.clear(0.00.20.01.0);
   if(!
_program)
   
{
    
var vCode String "mov op, va0\n"+
     
"mov v0, va1\n";
    var 
fCode String "mov ft0, v0\n"+
     
"mov oc, ft0\n";
    
    
_program _context.createProgram();
    
_program.upload( new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.VERTEXvCode),//, Debug.active),
     
new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.FRAGMENTfCode));//, Debug.active));
   
}
   
   _context
.setProgram(_program);
   
_context.drawTriangles(indexBuffer02);
   
   
////////////////////////////////////////////////////////////////
  

but i get nothing, does anyone know how to draw a sceen quad.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X