Changed GL_BGRA_EXT to GL_BGRA and added include of include/osg/Image to make sure define is declared

This commit is contained in:
Robert Osfield
2009-12-15 09:16:20 +00:00
parent 22de011107
commit ce2459a539
3 changed files with 6 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
*/
#include <osg/GL>
#include <osg/Endian>
#include <osg/Image>
#include <osgDB/FileNameUtils>
#include "MovieData.h"
@@ -158,7 +159,7 @@ void MovieData::_initImage(osg::Image* image)
image->setImage(_textureWidth,_textureHeight,1,
(GLint) GL_RGBA8,
(GLenum)GL_BGRA_EXT,
(GLenum)GL_BGRA,
internalFormat,
(unsigned char*) buffer,osg::Image::NO_DELETE,4);

View File

@@ -12,6 +12,7 @@
#include "QTUtils.h"
#include <osgDB/FileNameUtils>
#include <osg/Image>
/** small exception class bundling a error-message */
@@ -151,7 +152,7 @@ unsigned char* QuicktimeImportExport::prepareBufferForQuicktime(unsigned char* b
boffset = 2;
break;
case GL_BGRA_EXT:
case GL_BGRA:
aoffset = 0;
roffset = 1;
goffset = 2;

View File

@@ -14,6 +14,7 @@
#include <cstdlib>
#include <osg/Notify>
#include <osg/Image>
#include <osg/Timer>
#include <osg/ref_ptr>
#include <osg/Referenced>
@@ -113,7 +114,7 @@ void QuicktimeLiveImageStream::createImage()
GL_UNSIGNED_INT_8_8_8_8;
setImage(m_videoRectWidth,m_videoRectHeight,1,
(GLint) GL_RGBA8, (GLenum)GL_BGRA_EXT, internalFormat,
(GLint) GL_RGBA8, (GLenum)GL_BGRA, internalFormat,
(unsigned char*)buffer,osg::Image::NO_DELETE,4);
}