string AudioDevice::registerSound(ci::DataSourceRef dataSource, bool looping, bool is3d, bool asStream) { ci::fs::path relativePath = dataSource->getFilePath(); if( relativePath.empty() ) relativePath = ci::fs::path( dataSource->getFilePathHint() ); return registerSound(relativePath, is3d, looping, asStream); }
void Shader::loadShader( ci::DataSourceRef shaderSourceRef, GLint shaderType, GLint geometryInputType, GLint geometryOutputType, GLint geometryOutputVertices ) { if( shaderSourceRef ){ mSource[shaderType] = shaderSourceRef; mLastTime[shaderType] = ci::fs::last_write_time( shaderSourceRef->getFilePath() ); GlslProg::loadShader( shaderSourceRef->getBuffer(), shaderType ); if( shaderType == GL_GEOMETRY_SHADER_EXT ){ glProgramParameteriEXT(mObj->mHandle, GL_GEOMETRY_INPUT_TYPE_EXT, geometryInputType); glProgramParameteriEXT(mObj->mHandle, GL_GEOMETRY_OUTPUT_TYPE_EXT, geometryOutputType); glProgramParameteriEXT(mObj->mHandle, GL_GEOMETRY_VERTICES_OUT_EXT, geometryOutputVertices); mGeometryData = GeomData( geometryInputType, geometryOutputType, geometryOutputVertices ); } } }