Changed the mpeg plugin to read movies the original way up rather than the
OpenGL way up to keep them consistent with the xine and quicktime movie codes
This commit is contained in:
parent
e5e2cf2d30
commit
3ce382fd45
@ -183,10 +183,10 @@ osg::Geometry* createTexturedQuadGeometry(const osg::Vec3& pos,float width,float
|
|||||||
bool useTextureRectangle = true;
|
bool useTextureRectangle = true;
|
||||||
if (useTextureRectangle)
|
if (useTextureRectangle)
|
||||||
{
|
{
|
||||||
osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(pos,
|
osg::Geometry* pictureQuad = createTexturedQuadGeometry(pos,
|
||||||
osg::Vec3(width,0.0f,0.0f),
|
osg::Vec3(width,0.0f,0.0f),
|
||||||
osg::Vec3(0.0f,0.0f,height),
|
osg::Vec3(0.0f,0.0f,height),
|
||||||
image->s(),image->t());
|
0.0f,image->t(), image->s(),0.0f);
|
||||||
|
|
||||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||||
new osg::TextureRectangle(image),
|
new osg::TextureRectangle(image),
|
||||||
@ -196,10 +196,10 @@ osg::Geometry* createTexturedQuadGeometry(const osg::Vec3& pos,float width,float
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(pos,
|
osg::Geometry* pictureQuad = createTexturedQuadGeometry(pos,
|
||||||
osg::Vec3(width,0.0f,0.0f),
|
osg::Vec3(width,0.0f,0.0f),
|
||||||
osg::Vec3(0.0f,0.0f,height),
|
osg::Vec3(0.0f,0.0f,height),
|
||||||
1.0f,1.0f);
|
0.0f,0.0f, 1.0f,1.0f);
|
||||||
|
|
||||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||||
new osg::Texture2D(image),
|
new osg::Texture2D(image),
|
||||||
|
@ -198,7 +198,12 @@ void MpegImageStream::swapData()
|
|||||||
unsigned char* dp = _videoWriteData;
|
unsigned char* dp = _videoWriteData;
|
||||||
for (int i = 0; i < t(); i++)
|
for (int i = 0; i < t(); i++)
|
||||||
{
|
{
|
||||||
|
// #define FLIP_VERTICAL_SO_ORIENTATED_LIKE_OPENGL_WITH_ORIGIN_AT_BOTTOM_LEFT
|
||||||
|
#ifdef FLIP_VERTICAL_SO_ORIENTATED_LIKE_OPENGL_WITH_ORIGIN_AT_BOTTOM_LEFT
|
||||||
_rows[t()-i-1] = dp;
|
_rows[t()-i-1] = dp;
|
||||||
|
#else
|
||||||
|
_rows[i] = dp;
|
||||||
|
#endif
|
||||||
dp += (s() * 4);
|
dp += (s() * 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user