Exemple #1
0
	template <class A> SIMD_INLINE Frame<A>::Frame(const Point<ptrdiff_t> & size, Format f)
		: width(0)
		, height(0)
		, format(None)
	{
		Recreate(size, f);
	}
Exemple #2
0
	template <class A> SIMD_INLINE Frame<A>::Frame(size_t w, size_t h, Format f)
		: width(0)
		, height(0)
		, format(None)
	{
		Recreate(w, h, f);
	}
Exemple #3
0
// Returns:
//   true if the mutex had to be recreated due to lock contention, or false if the mutex is safely
//   unlocked.
bool Threading::Mutex::RecreateIfLocked()
{
	if( !Wait(def_detach_timeout) )
	{
		Recreate();
		return true;
	}
	return false;
}
Exemple #4
0
LTRESULT CRenderTarget::Init(int nWidth, int nHeight, ERenderTargetFormat eRTFormat, EStencilBufferFormat eDSFormat)
{
	m_RenderTargetParams.Width = nWidth;
	m_RenderTargetParams.Height = nHeight;
	m_RenderTargetParams.RT_Format = eRTFormat;
	m_RenderTargetParams.DS_Format = eDSFormat;

	return Recreate();
}
SourceWindow::SourceWindow( MyFrame* pFrm )
	: wxFrame( NULL, -1, "Source code window", 
			   wxDefaultPosition, wxSize( 350, 460 ), wxDEFAULT_FRAME_STYLE ),
	  mpBox( NULL ),
	  mpParent( NULL ),
	  mpFrm( pFrm )
{
	Recreate();

}
void SourceWindow::SetSource( const wxString& src, const wxString& srcName )
{
	// FOR NOW:: need to recreate things since it's not possible
	//           to change the text of wxStaticBox (really?)

	mSrcName =  "Code for \"" + srcName + "\" sample";

	Recreate();

	mpSrc->SetValue( src );
}
Exemple #7
0
	void TryUpgradeDb(const Version& verApp) override {
		CoinEng& eng = Eng();

		if (CheckUserVersion() != verApp) {
	//!!!R		UpgradeTo(NAMECOIN_VER_DOMAINS_TABLE);
	//!!!R		UpgradeTo(VER_DUPLICATED_TX);
			if (CheckUserVersion() < VER_KEYS32) {
				Recreate();
				return;
			}
	//		UpgradeTo(VER_KEYS32);
		}
	}
Exemple #8
0
// Init -- load the pixel shader byte code from file.
//
bool LTPixelShaderImp::Init(ILTStream *pStream, bool bCompileShader)
{
    Term();

    ZeroMemory(m_Constants, sizeof(m_Constants));

    // The old LithTech pixel shader format is no longer supported.
    uint32 nTag;
    *pStream >> nTag;
    if (nTag == MAKEFOURCC('L', 'T', 'P', 'S'))
    {
        // not supported
        assert(!"LithTech pixel shader files are no longer supported. You must use DX9 pixel shader files!");
        return false;
    }
    else
    {
        //
        // This is a regular microsoft pixel shader.
        //

        pStream->SeekTo(0);

        // Allocate memory to read the pixel shader file.
        m_ByteCodeSize = pStream->GetLen();
        LT_MEM_TRACK_ALLOC(m_pByteCode = new uint8[m_ByteCodeSize + 4], LT_MEM_TYPE_RENDER_SHADER);
        if (m_pByteCode == NULL)
        {
            Term();
            return false;
        }
        ZeroMemory(m_pByteCode, m_ByteCodeSize + 4);

        // Read the pre-compiled pixel shader microcode
        if (pStream->Read(m_pByteCode, m_ByteCodeSize) != LT_OK)
        {
            Term();
            return false;
        }
    }

    // Save this for later.
    m_bCompileShader = bCompileShader;

    // Create the pixel shader handle.
    return Recreate();
}
Exemple #9
0
	template <class A> SIMD_INLINE void Frame<A>::Recreate(const Point<ptrdiff_t> & size, Format f)
	{
		Recreate(size.x, size.y, f);
	}
Exemple #10
0
 IntegerSet(const int n, const int *p) { Recreate(n, p); }
Exemple #11
0
		static SharedNodeNTS *Create(HANDLE_T hObj){
			return Recreate(nullptr, hObj);
		}