OK,
Got this working for some cases. For example, I used Lightwave to create a
box with a colorbar texture placed on it so I would know for sure that the
color returned was correct. The texture I used was a plain jpg. The problem is
when using some other .ive , ost, or .osgt files. These
Hi Mike,
OK, the next complication is probably that the osg::Texture has the
probably unref'd the Image assigned to it after it's download to GL, the
method that control it is in include/osg/Texture:
/** Sets whether or not the apply() function will unreference the
image
*
OK, fixed that - loaded an .ive file and was able to get correct looking
texture coordinates. In a .ive file with embedded textures, is there a
textureName? Probably not - not really important.
But the code does say that there is one image in the texture. But doing the
getImage(0) does not
Hi Mike,
The osgparticleeffects demo uses a ShapeDrawable for rendering the terrain,
this keeps the code straight forward but it does mean there isn't an
osg::Geometry for the vertices and tex coords to hang off as all the
geometry data is created on the fly and embedded in a display list.
Yes, a null texture is the problem. I am using the osgparticleeffects example,
as I know the object does have a texture. It is the example where you click on
the terrain and at that point an explosion and smoke effect starts.
But when printing out the coordinates of hit in the code above, they
Hi,
using the example, osgparticleeffects.cpp, I added the following lines of code
to the pick function (inside the //MGREENE section):
Code:
void pick(osgViewer::Viewer* viewer, const osgGA::GUIEventAdapter ea)
{
osg::Group* root = dynamic_castosg::Group*(viewer-getSceneData());
Hi,
Hi,
using the example, osgparticleeffects.cpp, I added the following lines of code
to the pick function (inside the //MGREENE section):
Code:
void pick(osgViewer::Viewer* viewer, const osgGA::GUIEventAdapter ea)
{
osg::Group* root =
Thank you guys very much!
Cheers,
Mike
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64867#64867
___
osg-users mailing list
osg-users@lists.openscenegraph.org
Hi Mike
Hi,
I am wanting to do a dust cloud when an entity (helicopter) lands on a terrain. Ideally,
would like the color of the dust cloud to be similar to the material/texture that the
entity is on. Is there a way to do a material/texture color query based on an
entity position, kind of
Hi Mike,
In the osgUtil::LineSegmentItersector::Intersection object there is now (in
OSG-3.2 onwards) the convenience method:
/** Convenience function for mapping the intersection point to
any textures assigned to the objects intersected.
* Returns the Texture pointer
10 matches
Mail list logo