Dominik Rau wrote:
> Hi Marcus.
> 
> Am 14.08.2008 um 09:37 schrieb Marcus Lindblom:
> 
>> AFAIK, the various GrabForegrounds only grab the color buffer,  
>> although
>> you might try to add an Image with a depth-component pixel format.
> 
> 
> AFAICS, OSG::Image seems to know nothing about GL_DEPTH_COMPONENT  as  
> a pixel format.

True, but you can sometimes hack it by settings the pixelformat field 
yourself. (As long as you only call opensg functions that feeds this 
value directly to OpenGL).

>> I'd really like an 'update' call on a texturechunk, that downloads
>> texture data to the chunk's images.
> 
> 
> I tried to add something like this to TextureChunk - and failed (so  
> far). Everytime I try to add glGetTexImage after a call to  
> glBindTexture and setting all the texture parameters in the  
> TextureChunk I get a GL_INVALID_OPERATION, which doesn't really make  
> sense to me as this should be only generated if glGetTexImage is  
> called between glBegin/glEnd (at least that's what the man page says).  
> Has anybody some hints for me on how to implement this properly? This  
> is definitely a feature that might be useful for others, too...

You might need to activate the window, so that a GL context is active. 
(I think OSG::Window disables the context at end-of-frame, unless you're 
using a PassiveWindow...)

Ideally, you'd create something like a Foreground that has a list of 
texturechunks to update. Then you'll be sure that things happen at the 
right time with the right "settings".

Cheers,
/Marcus


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to