Revision: 62852
http://sourceforge.net/p/brlcad/code/62852
Author: starseeker
Date: 2014-09-18 21:12:37 +0000 (Thu, 18 Sep 2014)
Log Message:
-----------
In principle, it should be possible to fall back on the older drawing approach
if texture rectangles aren't supported...
Modified Paths:
--------------
brlcad/trunk/include/fb/fb_osgl.h
brlcad/trunk/src/libfb/if_osgl.cpp
Modified: brlcad/trunk/include/fb/fb_osgl.h
===================================================================
--- brlcad/trunk/include/fb/fb_osgl.h 2014-09-18 20:59:52 UTC (rev 62851)
+++ brlcad/trunk/include/fb/fb_osgl.h 2014-09-18 21:12:37 UTC (rev 62852)
@@ -85,6 +85,7 @@
#include <osg/TextureRectangle>
#include <osg/Geode>
#include <osg/Geometry>
+#include <osg/DrawPixels>
#include <osg/StateSet>
#include <osg/Timer>
Modified: brlcad/trunk/src/libfb/if_osgl.cpp
===================================================================
--- brlcad/trunk/src/libfb/if_osgl.cpp 2014-09-18 20:59:52 UTC (rev 62851)
+++ brlcad/trunk/src/libfb/if_osgl.cpp 2014-09-18 21:12:37 UTC (rev 62852)
@@ -1230,6 +1230,19 @@
memcpy(scanline, pixelp, scan_count*3);
+#if 0
+ osg::ref_ptr<osg::Image> scanline_image = new osg::Image;
+ scanline_image->allocateImage(ifp->if_width, 1, 1, GL_RGB,
GL_UNSIGNED_BYTE);
+ scanline = (void *)scanline_image->data();
+ memcpy(scanline, pixelp, scan_count*3);
+ osg::ref_ptr<osg::DrawPixels> scanline_obj = new osg::DrawPixels;
+ scanline_obj->setPosition(osg::Vec3(0, y, 0));
+ scanline_obj->setImage(scanline_image);
+ osg::ref_ptr<osg::Geode> new_geode = new osg::Geode;
+ new_geode->addDrawable(scanline_obj.get());
+ OSGL(ifp)->root->addChild(new_geode.get());
+#endif
+
ret += scan_count;
pix_count -= scan_count;
x = 0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits