X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fshaders%2Fprogram.cpp;h=530b6292a8d4dac82d4a362256724736cb25779d;hb=4d75040ab200bd306ec5a48f2a617480062eef4c;hp=0f2275829088b1dfd1488a70c9a79cde8d0686ec;hpb=c0ef2e7a3a8d9e39339b00701d1e800cfd8f23ca;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/shaders/program.cpp b/dali/internal/render/shaders/program.cpp old mode 100644 new mode 100755 index 0f22758..530b629 --- a/dali/internal/render/shaders/program.cpp +++ b/dali/internal/render/shaders/program.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -248,7 +248,7 @@ void Program::GetActiveSamplerUniforms() mGlAbstraction.GetProgramiv( mProgramId, GL_ACTIVE_UNIFORM_MAX_LENGTH, &uniformMaxNameLength ); std::vector samplerNames; - char name[uniformMaxNameLength+1]; // Allow for null terminator + std::vector name(uniformMaxNameLength + 1); // Allow for null terminator std::vector< LocationPosition > samplerUniformLocations; { @@ -258,13 +258,13 @@ void Program::GetActiveSamplerUniforms() for( int i=0; i( i ), uniformMaxNameLength, + &nameLength, &number, &type, name.data() ); - if( type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE ) /// Is there a native sampler type? + if( type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES ) { - GLuint location = mGlAbstraction.GetUniformLocation( mProgramId, name ); - samplerNames.push_back(name); + GLuint location = mGlAbstraction.GetUniformLocation( mProgramId, name.data() ); + samplerNames.push_back( name.data() ); samplerUniformLocations.push_back(LocationPosition(location, -1)); } } @@ -277,7 +277,9 @@ void Program::GetActiveSamplerUniforms() int samplerPosition = 0; while( token ) { - if( ( strncmp( token, "sampler2D", 9u ) == 0 ) || ( strncmp( token, "samplerCube", 11u ) == 0 ) ) + if( ( strncmp( token, "sampler2D", 9u ) == 0 ) || + ( strncmp( token, "samplerCube", 11u ) == 0 ) || + ( strncmp( token, "samplerExternalOES", 18u ) == 0 ) ) { bool found( false ); token = strtok_r( NULL, " ;\n", &nextPtr );