Beispiel #1
0
// called by GOS when you need to draw
//---------------------------------------------------------------------------
void __stdcall UpdateRenderers()
{
	uint32_t bColor = 0x0;
	gos_SetupViewport(1, 1.0, 1, bColor, 0.0, 0.0, 1.0, 1.0);  //ALWAYS FULL SCREEN for now
	gos_SetRenderState(gos_State_Filter, gos_FilterBiLinear);
	gos_SetRenderState(gos_State_AlphaMode, gos_Alpha_AlphaInvAlpha);
	gos_SetRenderState(gos_State_AlphaTest, TRUE);
	gos_SetRenderState(gos_State_Clipping, TRUE);
	gos_SetRenderState(gos_State_TextureAddress, gos_TextureClamp);
	gos_SetRenderState(gos_State_Dither, 1);
	float viewMulX, viewMulY, viewAddX, viewAddY;
	gos_GetViewport(&viewMulX, &viewMulY, &viewAddX, &viewAddY);
	//------------------------------------------------------------
	gos_SetRenderState(gos_State_Filter, gos_FilterNone);
	pMechlopedia->render();
	gos_SetRenderState(gos_State_Filter, gos_FilterNone);
	userInput->setViewport(viewMulX, viewMulY, viewAddX, viewAddY);
	userInput->render();
}
Beispiel #2
0
void UpdateRenderers()
{
	hasGuardBand = gos_GetMachineInformation(gos_Info_HasGuardBandClipping) != 0;

	//---------------------------------------------------------------------------------
	//Doesn't work.  Always returns 0 for TNT in Win2K build 2183 with 3.55 detonator
	//Assume worst case is +/- 8.0 for now.
	//MaxMinUV = gos_GetMachineInformation(gos_Info_GetMaximumUVSize);

	DWORD bColor = 0x0;
	if (eye)
		bColor = eye->fogColor;
		
	gos_SetupViewport(1,1.0,1,bColor, 0.0, 0.0, 1.0, 1.0 );		//ALWAYS FULL SCREEN for now
	gos_SetRenderState( gos_State_Filter, gos_FilterBiLinear );

	gos_SetRenderState( gos_State_AlphaMode, gos_Alpha_AlphaInvAlpha );

	gos_SetRenderState( gos_State_AlphaTest, TRUE );

	gos_SetRenderState( gos_State_Clipping, TRUE);

	gos_SetRenderState( gos_State_TextureAddress, gos_TextureClamp );

	gos_SetRenderState( gos_State_Dither, 1);

	if (logistics)
	{
		float viewMulX, viewMulY, viewAddX, viewAddY;
		gos_GetViewport(&viewMulX, &viewMulY, &viewAddX, &viewAddY);
		//userInput->setViewport(viewMulX,viewMulY,viewAddX,viewAddY);

		logistics->render();
	}

	//------------------------------------------------------------
	gos_SetRenderState( gos_State_Filter, gos_FilterNone );
	//userInput->render();

	//------------------------------------------------------------
	gos_SetRenderState( gos_State_Filter, gos_FilterNone );
}