On 10 December 2014 at 15:08, umesh ramesh <[email protected]> wrote:

> Hi Robert,
>
> OSG supports and displays RGB, RGB8 etc correctly, agreed. But whether it
> is "packing" the RGB components properly, I need to analyze


There is *nothing* to analyse, the OSG passes along to OpenGL what data is
osg::Image according to your settings.

You are wasting your time.




> I think now we are deviating from my simple question that I asked
> initially. I again give a short description:
> I had originally 32 Bit textures. I wrote the geometry with the texture
> data to IVE file. The IVE file size was 26 MB. Then I realized that I do
> not need true color textures, so I converted my images to 8 Bit images
> (RGBA8) reducing my image size from 4 mb to 1 mb (This can be easily done
> using Paint.Net Free App). Then I again wrote the data to IVE file
> expecting that now the IVE file size shall be far less as the image data
> has reduced. But the file size is same 26 MB.
> Thus I guess OSG stores the texture data in RGB or RGBA format only and
> not in the original file format (that is RGB8 or RGBA8 unsigned byte in my
> case).
>

The OSG stores data in whatever format you tell it to store, or what data
it loads from.



>
> If I set RGBA8 in image->setInternalTextureFormat does not affect size or
> view. But if I set RGB in image->setPixelFormat instead of RGBA, I see 1 MB
> less size in the IVE file (now 25 MB). Maybe because now alpha componenet
> is not written.
>

InternalTextureFormat is the hint to OepnGL what format to store the data
in on the GPU.



>
> My final objective is if my texture sizes are less I should have more
> texture memory available in graphics memory to load additional textures.
> And i am trying to verify whether OSG loads OpenGL with actual texture size
> (in my case RGBA8) or uses always RGB/RGBA format only. The display anyway
> will not be affected but unnecessary texture memory will be allocated I
> guess. The discussion above is on OSG with OpenGL & not OSG with OpenGL ES.
> I am using OSG for our Simulation research & I do not doubt its
> capabilities. But since I am neither a novice nor a full expert in OSG I
> came across above doubts that someone in forum can answer/reply.


If you want to minimize the texture object size on the GPU then you should
use OpenGL compressed textures.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to