Example #1
0
void FragmentShaderCg::RestoreDeviceData(uint8 **ppBackup)
{
	// Restore data
	if (*ppBackup) {
		// The string class takes over the control of the string memory and also deletes it
		SetSourceCode(String(reinterpret_cast<char*>(*ppBackup), false), GetProfile(), m_sArguments, m_sEntry);
	}
}
void FragmentShaderGLSL::RestoreDeviceData(uint8 **ppBackup)
{
	// Restore data
	if (*ppBackup && !m_nOpenGLFragmentShader) {
		m_nOpenGLFragmentShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);

		// The string class takes over the control of the string memory and also deletes it
		SetSourceCode(String(reinterpret_cast<char*>(*ppBackup), false));
	}
}
void TessellationControlShaderGLSL::RestoreDeviceData(uint8 **ppBackup)
{
	// Restore data
	if (*ppBackup && !m_nOpenGLTessellationControlShader) {
		m_nOpenGLTessellationControlShader = glCreateShaderObjectARB(GL_TESS_CONTROL_SHADER);

		// The string class takes over the control of the string memory and also deletes it
		SetSourceCode(String(reinterpret_cast<char*>(*ppBackup), false));
	}
}
Example #4
0
	~SourceFileEntry()
	{
		SetSourceCode(NULL);
		fSourceFile->ReleaseReference();
	}