Re: [osg-users] Setting a monochrome 2d texture from byte array

2019-11-05 Thread Steve Hardy
Hi, Thanks for the responses. I tried Robert's initial suggestions, but they get Code: Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..) on my system. Glenn's suggestion basically worked, although the image was literally shades of red. So I looked at the

[osg-users] OpenGL 4.4 and ARB_buffer_storage

2019-11-05 Thread Trajce Nikolov NICK
Hi Community, I am trying to implement 4.4 Persistent Mapping Streaming, within the context of OSG. Bellow is from the spec. I am struggling at the moment with making the buffer object sections, with the current OSG implementation and not sure if it is possible so I am asking here for hints if

Re: [osg-users] Setting a monochrome 2d texture from byte array

2019-11-05 Thread Glenn Waldron
Sandy, Try this instead. You probably want normalized [0..1] data on the GPU, not [0..255] integers. img->setImage(w, h, 1, GL_R8, GL_RED, GL_UNSIGNED_BYTE, data, osg::Image::USE_MALLOC_FREE); Glenn Waldron / osgEarth On Tue, Nov 5, 2019 at 2:14 AM Steve Hardy wrote: > Hi, > > I am trying

Re: [osg-users] Setting a monochrome 2d texture from byte array

2019-11-05 Thread Robert Osfield
Hi Steve, Using a monochrome texture should be as simple as using GL_ALPHA or GL_RED as the pixel format. The OpenSceneGraph/src/osgText/DefaultFont.cpp provides an example of a setting up a monochrome image. Robert. ___ osg-users mailing list