Merge branch 'master' of https://github.com/highfidelity/hifi into temp1

This commit is contained in:
Sam Gateau 2015-01-29 17:14:11 -08:00
commit 264435b695
3 changed files with 11 additions and 3 deletions

View file

@ -45,7 +45,6 @@ ImageOverlay::~ImageOverlay() {
// TODO: handle setting image multiple times, how do we manage releasing the bound texture? // TODO: handle setting image multiple times, how do we manage releasing the bound texture?
void ImageOverlay::setImageURL(const QUrl& url) { void ImageOverlay::setImageURL(const QUrl& url) {
_imageURL = url; _imageURL = url;
if (url.isEmpty()) { if (url.isEmpty()) {
_isLoaded = true; _isLoaded = true;
_renderImage = false; _renderImage = false;

View file

@ -254,7 +254,16 @@ bool Texture::assignStoredMip(uint16 level, const Element& format, Size size, co
} }
// THen check that the mem buffer passed make sense with its format // THen check that the mem buffer passed make sense with its format
if (size == evalStoredMipSize(level, format)) { Size expectedSize = evalStoredMipSize(level, format);
if (size == expectedSize) {
_storage->assignMipData(level, format, size, bytes);
_stamp++;
return true;
} else if (size > expectedSize) {
// NOTE: We are facing this case sometime because apparently QImage (from where we get the bits) is generating images
// and alligning the line of pixels to 32 bits.
// We should probably consider something a bit more smart to get the correct result but for now (UI elements)
// it seems to work...
_storage->assignMipData(level, format, size, bytes); _storage->assignMipData(level, format, size, bytes);
_stamp++; _stamp++;
return true; return true;

View file

@ -387,7 +387,7 @@ NetworkTexture::NetworkTexture(const QUrl& url, TextureType type, const QByteArr
if (!url.isValid()) { if (!url.isValid()) {
_loaded = true; _loaded = true;
} }
// default to white/blue/black // default to white/blue/black
/* glBindTexture(GL_TEXTURE_2D, getID()); /* glBindTexture(GL_TEXTURE_2D, getID());
switch (type) { switch (type) {