Re: [osg-users] Load dds as cubemap

2019-04-03 Thread lin hui
Hi,

Anybody help?
I found D3DXCreateCubeTextureFromFile but i really don't know how to use it 
within osg?
Or there is any other methods? 

Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75780#75780





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Load dds as cubemap

2019-04-03 Thread lin hui
Hi,

http://forum.openscenegraph.org/viewtopic.php?t=17263=dds
I found this topic because i want to load dds as cubemap,so what's the solution?

Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75772#75772





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Disable auto rotating

2018-07-16 Thread lin hui
Hi,

Anybody?


Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74347#74347





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [forum] Disable auto rotating

2018-07-10 Thread lin hui
Hi,

A small question.The model may auto rotate after I rotate it, how could I 
disable it?

Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74299#74299





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Android can't build osgdb_png

2018-07-05 Thread lin hui
Hi,

Thank you for your Reply ! I have sloved the issue.


Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74261#74261





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Android can't build osgdb_png

2018-07-03 Thread lin hui
Hi,

Anybody help!?


Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74249#74249





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Android can't build osgdb_png

2018-07-02 Thread lin hui
Hi,

upup


Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74240#74240





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [forum] Android can't build osgdb_png

2018-06-28 Thread lin hui
Hi,

I'm building Android libs on Windows, other 3rdparty libs like osgdb_jpeg  can 
all be build, except osgdb_png , is there something special and i missed?


Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74217#74217





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] geometry shader with opengles

2018-04-03 Thread lin hui
Hi,

I have succeeded on Android ,But not well on IOS,whether it is iphone4 or 6p or 
6sp...
they all show: version '310' is not supported 
(geometry shader only works on es3.1 later)
But version 300 is OK(but couldn't use geometry shader),So is there somthing i 
missed?

code now like this:
#version 310 es
#extension GL_EXT_geometry_shader : enable

uniform mat4 osg_ModelViewMatrix;
uniform mat4 osg_ViewMatrix;
uniform mat4 osg_ProjectionMatrix; 
uniform mat4 osg_ViewMatrixInverse;
uniform float TubeRadius;
uniform int EdgeCount;
uniform vec3 DirLightDir_V3;


layout(points) in;

layout(triangle_strip, max_vertices = 4) out;

out vec2 gf_uv;

void main()
{
vec4 offset0 = vec4(0,0,0,0);
vec4 offset1 = vec4(1,0,0,0);
vec4 offset2 = vec4(1,1,0,0);
vec4 offset3 = vec4(0,1,0,0);
gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset0);
gf_uv = offset0.xy;
EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset1);
gf_uv = offset1.xy;

EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset3);
gf_uv = offset3.xy;

EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset2);
gf_uv = offset2.xy;

EmitVertex();
EndPrimitive();
}

Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73246#73246





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] geometry shader with opengles

2018-04-02 Thread lin hui
Hi,

I want to know if osg support geometry shader with opengles3.2?I have changed 
the profile to GLES3.I'm now testing on IOS.
I have info like this:
GEOMETRY glCompileShader "" FAILED
GEOMETRY Shader "" infolog:
ERROR: 0:15: 'layout' : syntax error: syntax error

and this is my code:

#version 300 es

precision highp float;
precision highp int;

uniform mat4 osg_ModelViewMatrix;
uniform mat4 osg_ViewMatrix;
uniform mat4 osg_ProjectionMatrix; 
uniform mat4 osg_ViewMatrixInverse;
uniform float TubeRadius;
uniform int EdgeCount;
uniform vec3 DirLightDir_V3;


layout(points) in;

layout(triangle_strip, max_vertices = 4) out;

out vec2 gf_uv;

void main()
{
vec4 offset0 = vec4(0,0,0,0);
vec4 offset1 = vec4(1,0,0,0);
vec4 offset2 = vec4(1,1,0,0);
vec4 offset3 = vec4(0,1,0,0);
gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset0);
gf_uv = offset0.xy;
EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset1);
gf_uv = offset1.xy;

EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset3);
gf_uv = offset3.xy;

EmitVertex();

gl_Position = osg_ProjectionMatrix * (gl_in[0].gl_Position + offset2);
gf_uv = offset2.xy;

EmitVertex();
EndPrimitive();
}

Any help is welcome!

Thank you!

Cheers,
lin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73219#73219





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Win32ConditionPrivateData question.

2010-02-02 Thread hui
Hi, 

I want to use openthreads condition. and find in inline
{intwait (Mutex external_mutex, longtimeout_ms)// Prevent race conditions on 
the waiters_ count.InterlockedIncrement(waiters_);
..
}
 
if this way, is that means it will always return 0? 
 
Thanks, 
 
Huiintresult = 0;


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgtext::text::settext()

2009-11-16 Thread Wu Hui

Cyril Brulebois wrote:
 Wu Hui  (16/11/2009):
 
  I add an Text to the HUD, and want to updata this text every frame
  in a callback function using settext every frame. However, the
  program will crash, the error is  map/set not dereferenceable
  vector iterator not decrementable  or something in Wincore.cpp .I
  think this must have something to do with the source code of the
  Text implementation. Would someone tell me how this problem happen?
  
 
 IIRC it's possible to get errors that may look like bugs in OSG
 itself, but it also can mean you're not doing things right.
 
 Wild guess:
 - you're trying to update the text while it's being used elsewhere in
 the code, resulting in broken pointers/reference count, etc.
 
 You could try:
 - to set the Data Variance for this object to DYNAMIC, telling the
 framework you might update this text object at any moment.
 - to update the text at a more appropriate time, differentiating
 between the various traversals.
 
 That's based on my recollection before using proper callbacks. The
 former is probably a quick way to get things working. The latter is
 probably better in the long run once you're comfortable with various
 concepts in OSG.
 
 Cheers,
 -- 
 Cyril Brulebois
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum







Thank you a lot , your advice is really helpful.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19703#19703





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgtext::text::settext()

2009-11-15 Thread Wu Hui
Hi,

 I add an Text to the HUD, and want to updata this text every frame in a 
callback function using settext every frame. However,  the program will crash, 
the error is  map/set not dereferenceable vector iterator not decrementable 
 or something in Wincore.cpp .I think this must have something to do with the 
source code of the Text implementation. Would someone tell me how this problem 
happen ?

Thank you!

Cheers,
Wu

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19677#19677





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] DrawImplementation issue with Intel video card.

2009-03-12 Thread hui

Hi,

I meet a problem in function drawImplementation(osg::RenderInfo renderInfo) 
const

Actually the code works find with nvidia and ati video card, just when I run it 
in intel 965GM, it get problem.

Here is the code:
 void SubmeshDrawable::drawImplementation(osg::RenderInfo renderInfo) const
   {
  osg::State state = *renderInfo.getState();
  //bind the VBO's
  state.disableAllVertexArrays();

  bool initializedThisDraw = false;
  if (!mInitalized)
  {
 InitVertexBuffers(state);
 mInitalized = true;
 initializedThisDraw = true;
  }
-

// notice when first time run, then mInitalized is assigned as true, and it 
keeps as true in nvidia or ati video card.
// But in Intel card, the value of mInitalized will change back to false again 
when enter the function at second time, and keep in this way until the VBO 
crashed. 

Any reason for that?

Thanks a lot.

Hui



  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] gecko plugin working for windows?

2008-12-05 Thread hui
Thanks for helping me. I am also building it by cygwin follow the instruction, 
but since you mention it is a long time pain, could you provide more detail 
what instruction you follow to build it?

Hui


Hi Hui,

The gecko plugin should work on Windows, but you'll need the correct version
of XUL Runner (1.8 if I am not wrong). And be aware that building Gecko on
Windows can be a real pain, the first time I tried it took me several days
to have a correct build... :/

On Thu, Dec 4, 2008 at 8:11 PM, hui [EMAIL PROTECTED] wrote:

 Hi,

 Is that true that gecko plugin so far only work under linux? I download
 win32 gecko sdk but cannot fine xul library file, also mozjs library file.
 How to make it working?

 Thanks

 Hui



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] gecko plugin working for windows?

2008-12-04 Thread hui
Hi, 
 
Is that true that gecko plugin so far only work under linux? I download win32 
gecko sdk but cannot fine xul library file, also mozjs library file. How to 
make it working? 
 
Thanks
 
Hui


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] multiple texture mix with glsl

2008-10-24 Thread hui
Hi, 

I assign two geometry (same vertex) with two texture and want to blend them by 
glsl. The problem is even I get the texture sampler and use function mix to mix 
them, Then still cannot be blended together.
as: 
uniform sampler2D baseTexture;\n
uniform sampler2D shadowTexture;\n
void main(void)\n
{\n
vec3 ct;\n
vec3 basetexel, texel, color;\n
basetexel = vec3(texture2D(baseTexture,gl_TexCoord[0].st).r);\n
texel = texture2D(shadowTexture,gl_TexCoord[1].st).rgb;\n
color = mix(texel, basetexel, basetexel.r);\n
gl_FragColor = vec4(color, 1.0);\n
}\n

Thanks for any help. 

Hui


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ShadowMap question.

2008-10-07 Thread hui
Hi, 

I work on project need shadow between avatar and model, and I add shadowmap as 
the example code but it doesn't work. I read the shadow example and seems that 
the glsl shader only has two texture unit, one for shadowbase and one for 
shadowTexture. Do I need to assign my own texture unit for the shadow receiver? 
Another question, do I need to create a vertext shader to calculate the matrix 
transformation between two camera(one light, one main cam)? 

Thanks a lot. 

Hui


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] when should use GraphicsWindowWin32

2008-07-07 Thread hui
Hi, 

A quick question, when I should use class GraphicsWindowWin32? I can understand 
if we have a windows class with hwnd, and then I can assign the hwnd to 
WindowData(hwnd). But it means we already create a windows handler either in 
win32 or mfc class. So, when we should use GraphicWindowWin32 class? 

Thanks

Hui


  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem of qt plugin for rtsp real time streaming

2008-07-06 Thread hui
, 
GetMoviePreferredRate(*m),NewMoviePrePrerollCompleteProc(MyMoviePrePrerollCompleteProc),
 //,(void *)0L);
 never return -1 error. 
 beside, this example cannot make http working because of buffer conflict 
but 
 that is another issue.  
I check the qt plugin code, looks nothing can affect the PrePrerollMovie 
function, 
So, why rtsp cannot work with osg? 
There is some setting in loadURL like: newMovieIdleImportOK and newMovieActive 
| newMovieAsyncOK, but even I change it still doesn't work.  
Since I am not familiar with quicktime API, it really confused me. 

Thanks for any help.  


Hui 




  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem of qt plugin for rtsp real time streaming

2008-07-05 Thread hui
=port-portPixMap[0]-bounds.bottom; image = (unsigned char *) 
pixels; width = pixels_width; height = pixels_height; userDisplayFunc0();    
Sleep(1);}}void initTexture(){loadPPMImage(); // read image first. 
glGenTextures(1, textureUnit);glBindTexture(GL_TEXTURE_2D, 
textureUnit);glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 
GL_NEAREST);glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 
GL_NEAREST);//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, 
GL_UNSIGNED_BYTE,image); glBindTexture(GL_TEXTURE_2D, 0); }// just leave one 
main function here then add glvu int main(){OSErr
 err;err = InitializeQTML(0);//err = EnterMovies ();// check verlong 
version;OSErr result;result = Gestalt(gestaltQuickTime,version);if ((result == 
noErr)  (version = 0x0502)){/* we have version 5.0.2 or later 
*/}elsereturn 0;// get the movie from url or file pathconst char* 
url=rtsp://141.161.16.105:554/igp/isip2of5011206.mov;if 
(!LoadMovieFromURL(theMovie,url))return 
0;//SetMovieDrawingCompleteProc(theMovie,movieDrawingCallWhenChanged, 
MyMovieDrawingCompleteProc, 0/*refCon*/);Rect box2; 
GetMovieNaturalBoundsRect(theMovie,box);GetMovieBox(theMovie, box2); 
SetMovieRate(theMovie, 0); float timeScale = GetMovieTimeScale(theMovie); DWORD 
bias=GetTickCount();glvu.Init(Quicktime Basic Example,GLUT_DOUBLE | 
GLUT_DEPTH | GLUT_RGBA,50,50,512,512);GLenum erra = glewInit();if (GLEW_OK != 
erra){/* Problem: glewInit failed, something is seriously wrong. 
*fprintf(stderr, Error: %s\n,
 
glewGetErrorString(err));//...}  //glEnable(GL_LIGHTING);//glEnable(GL_LIGHT0);//glEnable(GL_COLOR_MATERIAL);glEnable(GL_DEPTH_TEST);initTexture();
 glutDisplayFunc(userDisplayFunc0);glutIdleFunc(idle0); Vec3f 
ModelMin(-1,-1,-1), ModelMax(1,1,1); Vec3f LookAtCntr( ModelMin+ModelMax ); 
LookAtCntr*=0.5;Vec3f mintoCtr( LookAtCntr - ModelMin );Vec3f Up(0,1,0);Vec3f 
Eye(LookAtCntr - 3*(mintoCtr - Up * (mintoCtr * Up) ));float Yfov = 45;float 
Aspect = 1; // WIDTH OVER HEIGHTfloat Near = 0.1f; // NEAR PLANE DISTANCE 
RELATIVE TO MODEL DIAGONAL LENGTHfloat Far = 10.0f; // FAR PLANE DISTANCE (ALSO 
RELATIVE)glvu.SetAllCams(ModelMin,ModelMax, Eye,LookAtCntr,Up, Yfov,Aspect, 
Near,Far);//--//
 (3) start the viewer event 
loop.//--glutMainLoop();return
 0; }  you can see I use exactly same code, but at here the
 function:error=PrePrerollMovie(*m, 0, 
GetMoviePreferredRate(*m),NewMoviePrePrerollCompleteProc(MyMoviePrePrerollCompleteProc),
 //,(void *)0L); never return -1 error.  beside, this example cannot make 
http working because of buffer conflict but  that is another issue.  I 
check the qt plugin code, looks nothing can affect the PrePrerollMovie 
function, So, why rtsp cannot work with osg? There is some setting in loadURL 
like: newMovieIdleImportOK and newMovieActive | newMovieAsyncOK, but even I 
change it still doesn't work.  Since I am not familiar with quicktime API, it 
really confused me.  Thanks for any help.  Hui 


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Quicktime plugin for real time streaming

2008-07-03 Thread hui
Hi, 
 
Anyone try use quicktime plugin to work for rtsp streaming? I try the idea 
one user provide here and it really works on http streaming, but not for 
rtsp. 
 
Thanks
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] how osg quicktime plugin handle quicktime message?

2008-06-27 Thread hui
Hi, 
 
I am working on quicktime real time streaming and hope can make it work as the 
osg plugin. But I cannot find any part that osg qt plugin handle quicktime 
message. For network streaming, I think quicktime need to contact with windows 
system to get message. Is that right? 
 
Thanks in advance
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] render video stream with dynamic size

2008-06-26 Thread hui
Hi, 
 
I am trying render video stream into osg texture, but the stream will change 
size during at least once, is there any machanism such like callback that I can 
use to tell the osg texture2D the change size? otherwise I have to save the 
texture pointer into my class but it not good. 
 
Thanks
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Quick question: how to change the color of a node

2008-06-24 Thread hui
Message: 9
Date: Mon, 23 Jun 2008 14:41:55 -0400
From: Gordon Tomlinson [EMAIL PROTECTED]
Subject: Re: [osg-users] Quick question: how to change the color of a
    node.
To: 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Some possibilities 

1) Could use a shader

2) You could apply a material color

3) You traverse the nodes scene graph, finds it geometry, retrieves the
color arrays and change their values

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of hui
Sent: Monday, June 23, 2008 2:18 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Quick question: how to change the color of a node.




Hi, 
Just ask a quick question: 
if I use readNodeFile load the cow.osg model, how can I change the color of
the model?
is there any fuction that I can call like in opengl call glColor3f()
something?
Thanks in Advance. 

Hui
 
Thanks Gordon
 
I check the Node reference, if I load a cow.osg file, how could I get the 
geometry stuff from it, I still not sure? could you tell me? 
 
Thanks
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem of traverse two layer groups

2008-06-20 Thread hui
Hi, 
 
The nodevisitor seems cannot reach the leaf node when I add two layers of 
groups. like this: 
 
 root (group)
/   |  \
  group ... group
    / |  \
 geode. 
my code is like this, basiclly this is the example of texture2D example: 
virtual void apply(osg::Geode geode)
{
apply(geode.getStateSet());
for(unsigned int i=0;igeode.getNumDrawables();++i)
{
apply(geode.getDrawable(i)-getStateSet());
}

traverse(geode);
}
 
//
 
virtual void apply(osg::Group group)
{
apply(group.getStateSet());
for(unsigned int i = 0; i  group.getNumChildren(); ++i)
{
apply(*(group.getChild(i)));    // here is the code for group maybe get 
trouble.  
}
traverse(group); 
}
 
/
 
virtual void apply(osg::Node node)
{

apply((osg::Geode )(node)); // this is nothing. 

apply(node.getStateSet());
traverse(node);
}
 
 

inline void apply(osg::StateSet* stateset)
{
if (!stateset) return;

osg::StateAttribute* attr = 
stateset-getTextureAttribute(0,osg::StateAttribute::TEXTURE);
if (attr)
{
osg::Texture2D* texture2D = dynamic_castosg::Texture2D*(attr);
if (texture2D) apply(dynamic_castosg::ImageStream*(texture2D-getImage()));
osg::TextureRectangle* textureRec = dynamic_castosg::TextureRectangle*(attr);
if (textureRec) apply(dynamic_castosg::ImageStream*(textureRec-getImage()));
}
}
 
 
// and when create scene as: 
 
osg::Node* createZYloadWall(osg::BoundingBox bb)
{
 
// then the original code use a group then add geode by addchild 
// then return the first layer group. 
 
// osg::Group* group = new osg::Group;

osg::Geometry* geom = new osg::Geometry;
 
osg::Geode* geom_geode = new osg::Geode;
geom_geode-addDrawable(geom);
 
// group-addChild(geom); 
 

return geom_geode;

//return group;

}
 
 
// then later add another layer of root. 
{
  
osg::Group* root = new osg::Group();
 
root-addchild(createZYloadWall(osg::BoundingBox bb)); 
}
 
 
// the problem is that if do it with two layer group, the nodevisitor still can 
go to geod 
by code: 
virtual void apply(osg::Group group)
{
apply(group.getStateSet());
for(unsigned int i = 0; i  group.getNumChildren(); ++i)
{
apply(*(group.getChild(i)));    // here is the code for group maybe get 
trouble.  
traverse(group); 
}
 
// but the geode looks not right. 
I finally remove one group layer then directly add geode into root, 
then it works, 
So my question is how to traverse with two layer of group, is my code right?
 
Thanks. 
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem set quicktime environment variable

2008-06-20 Thread hui
Hi, 
 
I want to use quicktime to display movie, but in registry code it need to set 
environment variable as: 
#if defined(DARWIN_QUICKTIME)
 
or 
#if defined(USE_QUICKTIME)
 
I set the variable in windows but seem doesn't work, 
finally I have to hard code the quicktime inside the regirstry.cpp, 
 
Could you tell me how to may these two variable working? 
 
Thanks
 
Hui


  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org