I've already tried visible=False and set_visible() but the fact is
that the window _has_ to be visible at some point in time (even if for
a fraction of a second) in order to not get BLACK from
pyglet.image.get_buffer_manager().get_color_buffe().get_texture()

Again, I have not tried this yet with dispatch_events(), which I
suspect _will_ solve the issue.

Also, one more thing as far as performance goes..
Say I _do_ have a 2048x2048 texture and am blitting it to a 640x480
window (every frame)..

Would it be more efficient to do texture.get_region(x,y,
640,480).get_texture()

or just blit the while 2048x2048 texture?

At this point it's kind of pre-mature optimization because pyglet has
serious FPS issues as it is.
( see http://code.google.com/p/pyglet/issues/detail?id=341 )

But, I'm still curious.

On Sep 8, 9:43 pm, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 9, 2008 at 12:31 PM, 3TATUK <[EMAIL PROTECTED]> wrote:
>
> > Ah! Thank you very much. Yes, window.Window.dispatch_events() certain
> > _does_ set it up properly so I can now use the active framebuffer as a
> > 'drawing board' for alpha blitting. So for example, say I have
> > 20,000x20,000 pixel texture.. it will take ``only'' 1302
> > blit_into()s.  This also assumes that the 'destination' texture
> > doesn't have any alpha in it :)
>
> All OpenGL implementations I'm aware of have a maximum texture size of
> 8192x8192, and most have maximum 4096x4096.  Older cards are limited
> to 2048x2048.  Also be aware that most older non-nvidia cards will not
> keep textures intact when swapped out of memory -- if you exceed your
> graphics memory you'll start getting blank textures.  (Newer cards
> don't have this problem).
>
> > Also, your suggestion of setting up a hidden window for use as this
> > 'temporary buffer' isn't quite a good idea because I've tested it
> > thoroughly and there's no obvious way to avoid that window having
> > 'popped up' at some time, for a fraction of a second.
>
> Use the visible=False parameter in the Window constructor.
>
>
>
> > Well, actually now that I think about it, I haven't tried it with
> > dispatch_events() which might help.. but even so it would be much
> > nicer if pyglet.image.Texture.blit_into() would call the necessary GL
> > for alpha preservation. :>
>
> It think you misunderstand: there _is_ no GL command that does this.
> blit_into uses glTexSubImage2D, which has no options for blending or
> masking.  OpenGL can only composite into a framebuffer or renderbuffer
> (using the framebuffer object extension), or by creating a separate
> context on a pbuffer rendering to the texture (not supported at all on
> Linux or older video cards; and pyglet does not (yet) have any pbuffer
> support).
>
> Alex.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to