Commit a033273c authored by Michele Bosi's avatar Michele Bosi

Vivid: fixed support to multiple texture dimensions

parent c6343422
......@@ -113,7 +113,7 @@ struct vl_VividParameters {
// <automatic>
// Whether the texture is a 1D, 2D or 3D texture
bool textureDimension;
int textureDimension;
// <per-Shader>
// Whether to render points as textured point sprites
......@@ -495,7 +495,8 @@ public:
// These must be present as part of the default Vivid material
VL_CHECK( fx->shader()->getTextureSampler( vl::Vivid::UserTexture ) )
VL_CHECK( fx->shader()->getTextureSampler( vl::Vivid::UserTexture )->texture() )
VL_CHECK( fx->shader()->getUniform("vl_UserTexture")->getUniformI() == vl::Vivid::UserTexture );
VL_CHECK( fx->shader()->getUniform("vl_UserTexture2D") );
VL_CHECK( fx->shader()->getUniform("vl_UserTexture2D")->getUniformI() == vl::Vivid::UserTexture );
ref<vl::Texture> texture = fx->shader()->getTextureSampler( vl::Vivid::UserTexture )->texture();
// Recreate new texture (TexParameter is not reset so we can keep the current defaults)
texture->createTexture2D( vl_img.get(), vl::TF_UNKNOWN, false, false );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment