예제 #1
0
//////////////////////////////////////////////////////////////////////////
// createRenderState
bool RsContextNull::createRenderState(
	RsRenderState* RenderState )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( RenderState );
	return true;
}
예제 #2
0
//////////////////////////////////////////////////////////////////////////
// destroySamplerState
bool RsContextNull::destroySamplerState(
	RsSamplerState* SamplerState )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( SamplerState );
	return true;
}
예제 #3
0
//////////////////////////////////////////////////////////////////////////
// destroyBuffer
bool RsContextNull::destroyBuffer( 
	class RsBuffer* Buffer )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Buffer );
	return true;
}
예제 #4
0
//////////////////////////////////////////////////////////////////////////
// destroyTexture
bool RsContextNull::destroyTexture( 
	class RsTexture* Texture )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Texture );
	return true;
}
예제 #5
0
//////////////////////////////////////////////////////////////////////////
// drawPrimitives
void RsContextNull::drawPrimitives( RsTopologyType PrimitiveType, BcU32 IndexOffset, BcU32 NoofIndices )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( PrimitiveType );
	BcUnusedVar( IndexOffset );
	BcUnusedVar( NoofIndices );
}
예제 #6
0
//////////////////////////////////////////////////////////////////////////
// updateTexture
bool RsContextNull::updateTexture( 
	class RsTexture* Texture,
	const struct RsTextureSlice& Slice,
	RsResourceUpdateFlags Flags,
	RsTextureUpdateFunc UpdateFunc )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Texture );
	BcUnusedVar( Slice );
	BcUnusedVar( Flags );
	BcUnusedVar( UpdateFunc );
	const auto& TextureDesc = Texture->getDesc();
	std::unique_ptr< BcU8[] > TempBuffer;
		BcU32 Width = BcMax( 1, TextureDesc.Width_ >> Slice.Level_ );
		BcU32 Height = BcMax( 1, TextureDesc.Height_ >> Slice.Level_ );
		BcU32 Depth = BcMax( 1, TextureDesc.Depth_ >> Slice.Level_ );
		BcU32 DataSize = RsTextureFormatSize( 
			TextureDesc.Format_,
			Width,
			Height,
			Depth,
			1 );
	TempBuffer.reset( new BcU8[ DataSize ] );
	RsTextureLock Lock = 
	{
		TempBuffer.get(),
		TextureDesc.Width_,
		TextureDesc.Width_ * TextureDesc.Height_
	};	
	UpdateFunc( Texture, Lock );
	return true;
}
예제 #7
0
//////////////////////////////////////////////////////////////////////////
// setUniformBuffer
void RsContextNull::setUniformBuffer( 
	BcU32 Handle, 
	class RsBuffer* UniformBuffer )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Handle );
	BcUnusedVar( UniformBuffer );
}
예제 #8
0
//////////////////////////////////////////////////////////////////////////
// setVertexBuffer
void RsContextNull::setVertexBuffer( 
	BcU32 StreamIdx, 
	class RsBuffer* VertexBuffer,
	BcU32 Stride )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( StreamIdx );
	BcUnusedVar( VertexBuffer );
	BcUnusedVar( Stride );
}
예제 #9
0
//////////////////////////////////////////////////////////////////////////
// clear
void RsContextNull::clear( 
	const RsColour& Colour,
	BcBool EnableClearColour,
	BcBool EnableClearDepth,
	BcBool EnableClearStencil )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Colour );
	BcUnusedVar( EnableClearColour );
	BcUnusedVar( EnableClearDepth );
	BcUnusedVar( EnableClearStencil );
}
예제 #10
0
//////////////////////////////////////////////////////////////////////////
// instantEvent
//virtual
void SysProfilerChromeTracing::instantEvent( const std::string& Tag )
{
	if( ProfilingActive_ == 1 )
	{
		// New section.
		TProfilerEvent* Event = allocEvent();
		if( Event != nullptr )
		{
			// Setup section.
			Event->Tag_ = Tag;
			Event->Type_ = "I";
			Event->ThreadId_ = BcCurrentThreadId();
			Event->StartTime_ = Timer_.time();
		}
	}
}
예제 #11
0
//////////////////////////////////////////////////////////////////////////
// updateBuffer
bool RsContextNull::updateBuffer( 
	class RsBuffer* Buffer,
	BcSize Offset,
	BcSize Size,
	RsResourceUpdateFlags Flags,
	RsBufferUpdateFunc UpdateFunc )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( Buffer );
	BcUnusedVar( Offset );
	BcUnusedVar( Size );
	BcUnusedVar( Flags );
	BcUnusedVar( UpdateFunc );
	std::unique_ptr< BcU8[] > TempBuffer;
	TempBuffer.reset( new BcU8[ Buffer->getDesc().SizeBytes_ ] );
	RsBufferLock Lock = { TempBuffer.get() };
	UpdateFunc( Buffer, Lock );
	return true;
}
예제 #12
0
//////////////////////////////////////////////////////////////////////////
// invalidateTextureState
void RsContextNull::invalidateTextureState()
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #13
0
//////////////////////////////////////////////////////////////////////////
// setRenderState
void RsContextNull::setRenderState( RsRenderState* RenderState )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #14
0
//////////////////////////////////////////////////////////////////////////
// setSamplerState
void RsContextNull::setSamplerState( BcU32 Handle, class RsSamplerState* SamplerState )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #15
0
//////////////////////////////////////////////////////////////////////////
// setRenderState
void RsContextNull::setRenderState( RsRenderStateType State, BcS32 Value, BcBool Force )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #16
0
//////////////////////////////////////////////////////////////////////////
// getRenderState
BcS32 RsContextNull::getRenderState( RsRenderStateType State ) const
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	return 0;
}
예제 #17
0
//////////////////////////////////////////////////////////////////////////
// setFrameBuffer
void RsContextNull::setFrameBuffer( class RsFrameBuffer* FrameBuffer )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #18
0
//////////////////////////////////////////////////////////////////////////
// create
void RsContextNull::create()
{
	// Get owning thread so we can check we are being called
	// from the appropriate thread later.
	OwningThread_ = BcCurrentThreadId();
}
예제 #19
0
파일: BcMisc.cpp 프로젝트: Psybrus/Psybrus
void BcSetGameThread()
{
	GMainThreadID = BcCurrentThreadId();
}
예제 #20
0
//////////////////////////////////////////////////////////////////////////
// setProgram
void RsContextNull::setProgram( class RsProgram* Program )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #21
0
//////////////////////////////////////////////////////////////////////////
// setTexture
void RsContextNull::setTexture( BcU32 Handle, RsTexture* pTexture, BcBool Force )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #22
0
//////////////////////////////////////////////////////////////////////////
// setSamplerState
void RsContextNull::setSamplerState( BcU32 Handle, const RsTextureParams& Params, BcBool Force )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
}
예제 #23
0
파일: BcMisc.cpp 프로젝트: Psybrus/Psybrus
//////////////////////////////////////////////////////////////////////////
// BcIsGameThread
BcBool BcIsGameThread()
{
	return GMainThreadID == 0 ||						// Game thread not setup yet (static initialisers)
		   GMainThreadID == BcCurrentThreadId();		// Game thread matches.
}
예제 #24
0
//////////////////////////////////////////////////////////////////////////
// setVertexDeclaration
void RsContextNull::setVertexDeclaration( class RsVertexDeclaration* VertexDeclaration )
{
	BcAssertMsg( BcCurrentThreadId() == OwningThread_, "Calling context calls from invalid thread." );
	BcUnusedVar( VertexDeclaration );
}