@@ -246,6 +246,7 @@ class PrivateImpl
246246 void add3DTexture (const char * textureName,
247247 const char * samplerName,
248248 unsigned edgelen,
249+ GenericGpuShaderDesc::TextureType channel,
249250 Interpolation interpolation,
250251 const float * values)
251252 {
@@ -258,7 +259,7 @@ class PrivateImpl
258259 }
259260
260261 Texture t (textureName, samplerName, edgelen, edgelen, edgelen,
261- GpuShaderDesc::TEXTURE_RGB_CHANNEL , 3 ,
262+ channel , 3 ,
262263 interpolation, values);
263264 m_textures3D.push_back (t);
264265 }
@@ -267,6 +268,7 @@ class PrivateImpl
267268 const char *& textureName,
268269 const char *& samplerName,
269270 unsigned & edgelen,
271+ GenericGpuShaderDesc::TextureType& channel,
270272 Interpolation & interpolation) const
271273 {
272274 if (index >= m_textures3D.size ())
@@ -281,6 +283,7 @@ class PrivateImpl
281283 textureName = t.m_textureName .c_str ();
282284 samplerName = t.m_samplerName .c_str ();
283285 edgelen = t.m_width ;
286+ channel = t.m_type ;
284287 interpolation = t.m_interp ;
285288 }
286289
@@ -520,19 +523,21 @@ unsigned GenericGpuShaderDesc::getNum3DTextures() const noexcept
520523void GenericGpuShaderDesc::add3DTexture (const char * textureName,
521524 const char * samplerName,
522525 unsigned edgelen,
526+ TextureType channel,
523527 Interpolation interpolation,
524528 const float * values)
525529{
526- getImplGeneric ()->add3DTexture (textureName, samplerName, edgelen, interpolation, values);
530+ getImplGeneric ()->add3DTexture (textureName, samplerName, edgelen, channel, interpolation, values);
527531}
528532
529533void GenericGpuShaderDesc::get3DTexture (unsigned index,
530534 const char *& textureName,
531535 const char *& samplerName,
532536 unsigned & edgelen,
537+ TextureType & channel,
533538 Interpolation & interpolation) const
534539{
535- getImplGeneric ()->get3DTexture (index, textureName, samplerName, edgelen, interpolation);
540+ getImplGeneric ()->get3DTexture (index, textureName, samplerName, edgelen, channel, interpolation);
536541}
537542
538543void GenericGpuShaderDesc::get3DTextureValues (unsigned index, const float *& values) const
0 commit comments