// IMPLEMENTATION
-Program* Program::New( const Integration::ResourceId& resourceId, Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry )
+Program* Program::New( const Integration::ResourceId& resourceId, Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry )
{
size_t shaderHash = shaderData->GetHashValue();
Program* program = context.GetCachedProgram( shaderHash );
return mModifiesGeometry;
}
-Program::Program(Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry )
+Program::Program(Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry )
: mContext( context ),
mGlAbstraction( context.GetAbstraction() ),
mProjectionMatrix( NULL ),
* @param [in] modifiesGeometry True if the shader modifies geometry
* @return pointer to the program
*/
- static Program* New( const Integration::ResourceId& resourceId, Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry );
+ static Program* New( const Integration::ResourceId& resourceId, Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry );
/**
* Takes this program into use
/**
* Constructor, private so no direct instantiation
- * @param[in] shaderData A pointer to a data structure containing the program source and binary
+ * @param[in] shaderData A smart pointer to a data structure containing the program source and binary
* @param[in] context The GL context state cache.
* @param[in] modifiesGeometry True if the vertex shader changes geometry
*/
- Program( Integration::ShaderData* shaderData, Context& context, bool modifiesGeometry );
+ Program( Integration::ShaderDataPtr shaderData, Context& context, bool modifiesGeometry );
public:
bool precompiledBinary = shaderData->HasBinary();
- Program* program = Program::New( resourceId, shaderData.Get(), *context, modifiesGeometry );
+ Program* program = Program::New( resourceId, shaderData, *context, modifiesGeometry );
ShaderSubTypes theSubType = subType;
if( subType == SHADER_SUBTYPE_ALL )