Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/ShaderProgram.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | if (fragmentFile.Load(g_VFS, m_FragmentFile) != PSRETURN_OK) | ||||
return; | return; | ||||
CPreprocessorWrapper preprocessor; | CPreprocessorWrapper preprocessor; | ||||
preprocessor.AddDefines(m_Defines); | preprocessor.AddDefines(m_Defines); | ||||
CStr vertexCode = preprocessor.Preprocess(vertexFile.GetAsString()); | CStr vertexCode = preprocessor.Preprocess(vertexFile.GetAsString()); | ||||
CStr fragmentCode = preprocessor.Preprocess(fragmentFile.GetAsString()); | CStr fragmentCode = preprocessor.Preprocess(fragmentFile.GetAsString()); | ||||
// printf(">>>\n%s<<<\n", vertexCode.c_str()); | |||||
// printf(">>>\n%s<<<\n", fragmentCode.c_str()); | |||||
if (!Compile(GL_VERTEX_PROGRAM_ARB, "vertex", m_VertexProgram, m_VertexFile, vertexCode)) | if (!Compile(GL_VERTEX_PROGRAM_ARB, "vertex", m_VertexProgram, m_VertexFile, vertexCode)) | ||||
return; | return; | ||||
if (!Compile(GL_FRAGMENT_PROGRAM_ARB, "fragment", m_FragmentProgram, m_FragmentFile, fragmentCode)) | if (!Compile(GL_FRAGMENT_PROGRAM_ARB, "fragment", m_FragmentProgram, m_FragmentFile, fragmentCode)) | ||||
return; | return; | ||||
m_IsValid = true; | m_IsValid = true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 803 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator