Exemplo n.º 1
0
void WrappedOpenGL::glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{
	m_Real.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
	
	if(m_State >= WRITING)
	{
		GLResourceRecord *record = GetResourceManager()->GetResourceRecord(TextureRes(texture));
		RDCASSERT(record);

		SCOPED_SERIALISE_CONTEXT(TEXSTORAGE2D);
		Serialise_glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);

		if(m_State == WRITING_CAPFRAME)
			m_ContextRecord->AddChunk(scope.Get());
		else
			record->AddChunk(scope.Get());
	}
}
Exemplo n.º 2
0
void WrappedOpenGL::glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{
	m_Real.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
	
	if(m_State >= WRITING)
	{
		GLResourceRecord *record = GetResourceManager()->GetResourceRecord(TextureRes(GetCtx(), texture));
		RDCASSERT(record);

		SCOPED_SERIALISE_CONTEXT(TEXSTORAGE2D);
		Serialise_glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);

		record->AddChunk(scope.Get());

		// illegal to re-type textures
		if(record->datatype == eGL_UNKNOWN_ENUM)
			record->datatype = target;
		else
			RDCASSERT(record->datatype == target);
	}
}