Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 1.74 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void NxRenderPipelineManager::DrawNonIndexed(NxRenderEffectPointer InEffect,
  2.                                                  NxRenderResourcePointer InVertexBuffer,
  3.                                                  int32 InVertexBufferOffset,
  4.                                                  int InInputLayout,
  5.                                                  D3D11_PRIMITIVE_TOPOLOGY InPrimitiveType,
  6.                                                  UINT InVertexStride,
  7.                                                  UINT InVertexCount,
  8.                                                  UINT InStartVertexLocation,
  9.                                                  INxRenderParameterManager* InParameterManager)
  10.     {
  11.         InputAssemblerStage.ClearDesiredState();
  12.  
  13.         // Specify the type of geometry that we will be dealing with.
  14.         InputAssemblerStage.DesiredState.SetPrimitiveTopology(InPrimitiveType);
  15.  
  16.         // Bind the vertex buffer.
  17.         InputAssemblerStage.DesiredState.SetVertexBuffer(0, InVertexBuffer->_Resource, InVertexBufferOffset, InVertexStride);
  18.  
  19.         // Bind the input layout.
  20.         InputAssemblerStage.DesiredState.SetInputLayout(InInputLayout);
  21.  
  22.         // Apply the state in this pipeline's input assembler
  23.         InputAssemblerStage.ApplyDesiredState(_Context);
  24.  
  25.         // Use the effect to load all of the pipeline stages here.
  26.         ClearPipelineResources();
  27.         InEffect->ConfigurePipeline(this, InParameterManager);
  28.         ApplyPipelineResources();
  29.  
  30.         if (InVertexCount == 0)
  31.         {
  32.             // GW-NEXUS: Cleaner way to do this?
  33.             _Context->DrawAuto();
  34.         }
  35.         else
  36.         {
  37.             _Context->Draw(InVertexCount, InStartVertexLocation);
  38.         }
  39.     }