I want to put a graphics on the screen ( say a logo), how i can do in  openSG
What i did was

// Load the foreground image
osg::ImagePtr  foreImageLoad=osg::Image::create();
beginEditCP(foreImageLoad);
if (foreImageLoad->read("we.jpg")==0){
std::cout << "Error loading filename" << std::endl;
}
foreImageLoad->read("we.jpg");
endEditCP(foreImageLoad)

now what has to be done?


 
Best Regards
Brajesh Lal 





----- Original Message ----
From: Carsten Neumann <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, May 18, 2007 2:35:44 PM
Subject: Re: [Opensg-users] triangle fans, strips, simple


Hi Enrico,

Enrico Borrione wrote:
> hi opensg users,
> 
> i am doing some operations on models imported 
>>from obj files. When i do some tasks with normals and
> indices, like swapping face normals, eventually i get
> stuck in wrong displayed geometries.
> 
> i.e. the famous knot model from 3ds is displayed with 
> most of the triangles missing or displaced.
> 
> Since i am having such problems just with OBJ imported
> models, I was wondering what must be wrong with them.

AFAIK the OBJ loader creates geometries that contain only GL_POLYGON
primitives.

> My best shot is something about how triangles are defined,
> like presence of TRIANGLES_STRIPS or TRIANGLES_FAN.
> Is there a fast way to check the geometry node
> vs triangle organization/indexing? And then for reducing
> the geometry to simple list of triangles (which i assume 
> would be safer to use during geometry manipulation)?

Do you disable the default GraphOps? By default the loaders apply a set
of optimizations to the loaded scene, among them striping of geometries.
You can disable them with:
SceneFileHandler::the().read("fileName", NULL)

    Hope it helps,
        Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users


       
____________________________________________________________________________________Pinpoint
 customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to