Ejemplo n.º 1
0
//-----------------------------------------------------------------------------
// Purpose: Process any callbacks we may have
//-----------------------------------------------------------------------------
void CSteam3Client::RunFrame()
{
#if !defined( NO_STEAM )
	VPROF_BUDGET( "CSteam3Client::RunFrame", VPROF_BUDGETGROUP_STEAM );
	SteamAPI_RunCallbacks();
#endif
}
Ejemplo n.º 2
0
void SteamObject::update()
{
#ifdef CHOWDREN_ENABLE_STEAM
    if (!global_steam_obj.initialized)
        return;
    SteamAPI_RunCallbacks();
    ugc_upload.check_callbacks();
#endif
}
Ejemplo n.º 3
0
void SteamVR::RenderVR(CCamera* vrCam)
{
  // Run Steam client callbacks
  SteamAPI_RunCallbacks();

  Renderer* pRender = Renderer::getInstance();

  // Must clear to black
  pRender->ClearFrameBuffer(mVR_RT.GetRenderTargetView(), COLOR::BLACK);
  Vector3 origCamPos = vrCam->gameObject->transform->GetGlobalPosition();

  // Scene render - left / right eyes
  for (int i = 0; i < EyeCount; ++i)
  {
    vr::Hmd_Eye eye = (vr::Hmd_Eye)i;
    mCurrentEyeIndex = eye;

    // Update eye pos and view matrix based on head tracker
    UpdateCamFromTracker(vrCam, eye);
    
    // Render the scene
    pRender->RenderScene(vrCam);
    
    // Set viewport to left/right eye and render
    pRender->SetBlendState(CRenderer::NO_BLEND_DEPTH_LESS);

    // Tone Mapping / Gamma correction
    pRender->FinalImageProcessing(vrCam->GetRenderTarget(), &mVR_RT);

    // Distortion render
    GetViewportFromHmd(eye, mFinalVR_VP);
    pRender->SetViewport(mFinalVR_VP);
    pRender->PostProcess(&mVR_RT, &mDistortionRT[i], &pRender->mVRFinalRT, Shader::DISTORTION_RENDER, false);
    
    // Set back original head position
    vrCam->gameObject->transform->SetPosition(origCamPos);

    // End Scene
    pRender->Clear();
    pRender->ClearRenderQueues();
  }

  // Swap buffers
  if (mVsyncEnabled)
    pRender->GetOculusSwapChain()->Present(1, 0);
  else
    pRender->GetOculusSwapChain()->Present(0, 0);
}
Ejemplo n.º 4
0
// ====================================================================================================================================================================================================
// Update and render achievement. Called every frame
void hedGameAchievements::Render(hedClassTextWindow* window, hedClassTextWindow* msgWindow)
{
	int i;

// STEAM achievements callback
#ifdef BUILD_STEAM
    SteamAPI_RunCallbacks();
#endif

	// Update achievement status images
	for(i = 0; i < HED_ACHIEVEMENT_COUNT; i++)
	{
        // Unlocked?
        //Robert if(achievementValue[i] >= 100 && achievementStatus[0] == 0)
        if(achievementValue[i] >= 100 && achievementStatus[i] == 0)
        {
    		//Robert achievementStatus[0] = 1;
	    	//Robert msgWindow->PrintTextN("[ACHIEVEMENT UNLOCKED] - %s",achievementDescription[0]);
    		achievementStatus[i] = 1;
	    	msgWindow->PrintTextN("[ACHIEVEMENT UNLOCKED] - %s",achievementDescription[i]);
		    SaveAchievements();

#ifdef BUILD_STEAM
            if (g_SteamAchievements)
            {
                sysLogPrint("hedGameAchievements::Render() - Unlocking achievement on STEAM. [%s]",g_Achievements[i].m_pchAchievementID);
                g_SteamAchievements->SetAchievement(g_Achievements[i].m_pchAchievementID);
                sysLogPrint("hedGameAchievements::Render() - Done!");
            }
#endif
        }

		window->attachedImageX[i] = buttonX[i];
		window->attachedImageY[i] = buttonY[i];
		window->attachedImageVisible[i] = 1;
		window->attachedImage[i] = g_InterfaceManager.skinWindowAchievementsStatus[achievementStatus[i]];

		if(achievementStatus[i] == 0)
			window->RenderText(buttonX[i] + 45, buttonY[i] + 8,0.5f,0.5f,0.5f,HED_FONT_NORMAL,"%s (%d to go). ",achievementDescription[i],100 - achievementValue[i]);
		else
			window->RenderText(buttonX[i] + 45, buttonY[i] + 8,0.67f,0.88f,0.01f,HED_FONT_NORMAL,achievementDescription[i]);
	}
}
Ejemplo n.º 5
0
void TPortal_Think()
{
	SteamAPI_RunCallbacks();
}
Ejemplo n.º 6
0
SB_API void S_CALLTYPE RunCallbacks() {
	SteamAPI_RunCallbacks();
}
Ejemplo n.º 7
0
	void runStep()
	{
		// Run Steam client callbacks
		SteamAPI_RunCallbacks();
	}
Ejemplo n.º 8
0
// To dispatch callbacks to registered listeners, call the function SteamAPI_RunCallbacks(). 
// It's best to call this at >10Hz, the more time between calls, the more potential latency 
// between receiving events or results from the Steam API. Most games call this once per render-frame. 
// All registered listener functions will be invoked during this call, in the callers thread context.
void System_RunCallbacks(){SteamAPI_RunCallbacks();};
Ejemplo n.º 9
0
	void SteamAPI::RunCallbacks()
	{
		SteamAPI_RunCallbacks();
	}
Ejemplo n.º 10
0
// ====================================================================================================================================================================================================
void hedGameAchievements::STEAM_RunCallbacks()
{
#ifdef BUILD_STEAM
	SteamAPI_RunCallbacks();
#endif
}