void BaseHierarchical::SetupStages (int targetW, int targetH,
					    iTextureHandle* measureTex)
	{
	  computeStages.Empty();
	  computeFX.ClearLayers();

	  int currentW = targetW;
	  int currentH = targetH;
	  const int minSize = 256; /* Arbitrary
	                              @@@ In fact I [res] don't know the cut
	                              off point after which the multi-stage
	                              approach is faster than a readback of
	                              the first stage, or if that exists at
	                              all... */
	  iTextureHandle* currentTex = measureTex;
	  bool iterateStage;
	  do
	  {
	    LuminanceComputeStage newStage;
	    iterateStage = SetupStage (newStage, currentW, currentH, minSize,
	      currentTex,
	      computeStages.GetSize() == 0 ? computeShader1 : computeShaderN);
	    computeStages.Push (newStage);
	    currentW = newStage.targetW;
	    currentH = newStage.targetH;
	    currentTex = newStage.target;
	  }
	  while (iterateStage);
	  
	  computeFX.SetEffectsOutputTarget (computeStages[0].target);
	  CS::Math::Matrix4 perspectiveFixup;
	  computeFX.SetupView (computeStages[0].targetW, computeStages[0].targetH,
	    perspectiveFixup);
	}
示例#2
0
// Constructor
// This is called once at the beginning of the game to
// set up the initial game state.
GameState::GameState() {
	// Setup the stage for level 1.
	SetupStage(kLevel_1);
}
示例#3
0
void GameState::Update_Title() {
	if (CheckKeyPress(KEY_START)) {
		SetupStage(kLevel_1);
	}
}
示例#4
0
// Constructor
// This is called once at the beginning of the game to
// set up the initial game state.
GameState::GameState() {
	// Start with the title screen.
	SetupStage(kLevel_Title);
}