Exemplo n.º 1
0
	void ShaderManager::Gui()
	{
		static bool show_gui = false;
		
		Imgui::Separator();
		Imgui::CheckBox("Show Shaders", show_gui );
		
		if ( show_gui )
		{
			Imgui::Header("Shaders");
			Imgui::FillBarInt("Shader Programs", m_map_programs.size(), 0 , 16 );
			Imgui::FillBarInt("Vertex Shaders", m_map_vs.size(), 0 , 16 );
			Imgui::FillBarInt("Frag Shaders", m_map_fs.size(), 0 , 16 );
			if ( Imgui::Button("Reload Shaders (F6)") ) ReloadAll();
		}
	}
Exemplo n.º 2
0
void LiveTVChain::LoadFromExistingChain(const QString &id)
{
    m_id = id;
    ReloadAll();
}
Exemplo n.º 3
0
/**
 *  \brief Returns the recording we should switch to
 *
 *   This returns a ProgramInfo* and tells us if this is a discontiuous
 *   switch and whether the recording type is changing.
 *
 *   This also clears the NeedsToSwitch()/NeedsToJump() state.
 *
 *   NOTE: The caller is resposible for deleting the ProgramInfo
 */
ProgramInfo *LiveTVChain::GetSwitchProgram(bool &discont, bool &newtype,
                                           int &newid)
{
    ReloadAll();
    QMutexLocker lock(&m_lock);

    if (m_switchid < 0 || m_curpos == m_switchid)
    {
        ClearSwitch();
        return NULL;
    }

    LiveTVChainEntry oldentry, entry;
    GetEntryAt(m_curpos, oldentry);

    ProgramInfo *pginfo = NULL;
    while (!pginfo && m_switchid < (int)m_chain.count() && m_switchid >= 0)
    {
        GetEntryAt(m_switchid, entry);

        bool at_last_entry = 
            ((m_switchid > m_curpos) &&
             (m_switchid == (int)(m_chain.count()-1))) ||
            ((m_switchid <= m_curpos) && (m_switchid == 0));

        // Skip dummy recordings, if possible.
        if (at_last_entry || (entry.cardtype != "DUMMY"))
            pginfo = EntryToProgram(entry);

        // Skip empty recordings, if possible
        if (pginfo && (0 == pginfo->GetFilesize()) &&
            m_switchid < (int)(m_chain.count()-1))
        {
            LOG(VB_GENERAL, LOG_WARNING,
                QString("Skipping empty program %1")
                .arg(pginfo->MakeUniqueKey()));
            delete pginfo;
            pginfo = NULL;
        }

        if (!pginfo)
        {
            if (m_switchid > m_curpos)
                m_switchid++;
            else
                m_switchid--;
        }
    }

    if (!pginfo)
    {
        ClearSwitch();
        return NULL;
    }

    discont = true;
    if (m_curpos == m_switchid - 1)
        discont = entry.discontinuity;

    newtype = (oldentry.cardtype != entry.cardtype);

    // Some cards can change their streams dramatically on a channel change...
    if (discont)
        newtype |= CardUtil::IsChannelChangeDiscontinuous(entry.cardtype);

    newid = m_switchid;

    ClearSwitch();

    return pginfo;
}
Exemplo n.º 4
0
		void CRenderPass::SetTexture(string const & Name, SharedPointer<Graphics::ITexture> Texture)
		{
			Textures[Name] = Texture;
			ReloadAll();
		}
Exemplo n.º 5
0
		void CRenderPass::SetUniform(string const & Name, SharedPointer<Graphics::IUniform> Uniform)
		{
			Uniforms[Name] = Uniform;
			ReloadAll();
		}
Exemplo n.º 6
0
		void CRenderPass::RemoveLight(ILight * Light)
		{
			EraseRemove(Lights["u" + Light->GetLightType() + "s"], Light);
			ReloadAll();
		}
Exemplo n.º 7
0
		void CRenderPass::AddLight(ILight * Light)
		{
			Lights["u" + Light->GetLightType() + "s"].push_back(Light);
			ReloadAll();
		}