Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 721 vs 722 for /trunk/Source Code/Geometry/Material/Material.cpp

Diff revisions: vs.
  @@ -317,9 +317,10 @@
317 317 if (_reflectionIndex > -1) {
318 318 GFXDevice::RenderTargetWrapper& reflectionTarget = GFX_DEVICE.reflectionTarget(index);
319 319 assert(reflectionTarget._target != nullptr);
320 - setTexture(ShaderProgram::TextureUsage::REFLECTION, reflectionTarget._target->getAttachment());
320 + const Texture_ptr& refTex = reflectionTarget._target->getAttachment(RTAttachment::Type::Colour, 0).asTexture();
321 + setTexture(ShaderProgram::TextureUsage::REFLECTION, refTex);
321 322 } else {
322 - setTexture(ShaderProgram::TextureUsage::REFLECTION, Texture_ptr());
323 + setTexture(ShaderProgram::TextureUsage::REFLECTION, nullptr);
323 324 }
324 325 }
325 326
  @@ -328,9 +329,10 @@
328 329 if (_refractionIndex > -1) {
329 330 GFXDevice::RenderTargetWrapper& refractionTarget = GFX_DEVICE.refractionTarget(index);
330 331 assert(refractionTarget._target != nullptr);
331 - setTexture(ShaderProgram::TextureUsage::REFRACTION, refractionTarget._target->getAttachment());
332 + const Texture_ptr& refTex = refractionTarget._target->getAttachment(RTAttachment::Type::Colour, 0).asTexture();
333 + setTexture(ShaderProgram::TextureUsage::REFRACTION, refTex);
332 334 } else {
333 - setTexture(ShaderProgram::TextureUsage::REFRACTION, Texture_ptr());
335 + setTexture(ShaderProgram::TextureUsage::REFRACTION, nullptr);
334 336 }
335 337 }
336 338