Hi Enrico,
On Wed, 2004-03-24 at 09:32, Enrico Borrione wrote:
> hello,
> first of all, thank u for your help so far.
> Now I succesfully loaded my cube map in memory... unfortunatety the
> texcoords seem to be fully messed...
> i am trying to tex map a simple sphere, just to see if the 6 tiles are
> loaded with the right orientation.
> I am using a
> geosfera = makeSphereGeo(1, 1.5);
> to build the sphere, so where may i say to OpenSG that i want to use
> normals as texcoords?
The texcoords for the subdivision sphere are messed up, if you want to
texture a sphere, try the LatLongSphere or a torus (my favorite ;).
> i am trying to use opengl's vertex and fragment programs too. Right now
> i accomplished the loading and parsing fase, but for some reason they
> don't seem to be used. (my fragment program should set everything to
> black, but still i see the scene rendered -> OSG is still using the
> fixed pipeline).
> I set up the programs this way:
>
> //this part loads the
> vp = VertexProgramChunk::create();
> fp = FragmentProgramChunk::create();
>
> beginEditCP(vp);
> vp->read("vertex2.txt");
> endEditCP(vp);
>
> beginEditCP(fp);
> fp->read("fragment2.txt");
> endEditCP(fp);
>
> and then i squeeze em into a chunkmaterial this way:
>
> diffCubeMap->addChunk(cubemap);
>
> diffCubeMap->addChunk(vp);
> diffCubeMap->addChunk(fp);
>
> so, what's missing? I guess i am not setting them to active, but even
> looking at the specs, i can't find a suitable method to do that...
Nope, just adding them is all you need to do, see
testVertexProgramRender.cpp.
Are you sure the loading succeeded? If not, the ProgramChunk should
print a warning.
Hope it helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users