[osg-users] Texture is rendered strange

Colin Steinberg colin.steinberg at googlemail.com
Mon Nov 9 01:39:46 PST 2009


On Mon, Nov 9, 2009 at 09:50, Ulrich Hertlein <u.hertlein at sandbox.de> wrote:
> On 7/11/09 10:18 PM, Thorsten Werner wrote:
>>
>>     osg::Vec2Array* texcoords = new osg::Vec2Array(4);
>>     (*texcoords)[0].set(0.0f, 0.0f);
>>     (*texcoords)[0].set(1.0f, 0.0f);
>>     (*texcoords)[0].set(1.0f, 1.0f);
>>     (*texcoords)[0].set(0.0f, 1.0f);
>
> Is this a cut&paste error?
>

Hi Thorsten,

You're assigning the texture coordinates only to the first element ([0]).

Colin


More information about the osg-users mailing list