From Johannes Baeurele, "The osg::Image class now contains a 'supportsTextureSubloading()' method that is used inside the Texture2D::apply method. For now it only checks for the etc1 format in which case it returns 'false'. All other formats lead to a return value of 'true'.
Without the change the application does not work properly. First I get the notification that an OpenGL error occured. After some more of this error messages I see broken textures on the screen. With the changes attached to this message my application works as intended." Note from Robert Osfield, changed the Image::supportsTextureSubloading() to be const and to be implemented in the .cpp rather than inline.
This commit is contained in:
@@ -92,6 +92,10 @@
|
||||
#define GL_UNPACK_IMAGE_HEIGHT 0x806E
|
||||
#endif
|
||||
|
||||
#ifndef GL_OES_compressed_ETC1_RGB8_texture
|
||||
#define GL_ETC1_RGB8_OES 0x8D64
|
||||
#endif
|
||||
|
||||
namespace osg {
|
||||
|
||||
// forward declare
|
||||
@@ -396,6 +400,9 @@ class OSG_EXPORT Image : public BufferData
|
||||
return _data+getMipmapOffset(mipmapLevel);
|
||||
}
|
||||
|
||||
/** returns false for texture formats that do not support texture subloading */
|
||||
bool supportsTextureSubloading() const;
|
||||
|
||||
/** Return true if this image is translucent - i.e. it has alpha values that are less 1.0 (when normalized). */
|
||||
virtual bool isImageTranslucent() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user