f



[wx 2.5.3, mac os x 10.3.7, gcc 3.3] problem regarding wxGenericDirCtrl

hi all,

currently i am trying to make a wxGenericDirCtrl list files and
not just directories. The wxDIRCTRL_DIR_ONLY flag is *not* set,
but it just shows directories and no files at all except symlinks.

is this a bug, a feature or just my goofiness?

please let me know ...


tia + kind regards,
krystian

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

0
krystian
1/29/2005 6:12:26 PM
comp.soft-sys.wxwindows 21076 articles. 0 followers. Post Follow

3 Replies
793 Views

Similar Articles

[PageSpeed] 1

Hi,

Is there a simple way to get the screen image in a wxGLCanvas into a
wxBitmap or wxImage (so it can be saved to a file)? Ideally cross-platform,
but specifically I'm on wxMac.

Thanks,

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

0
robertlang
2/1/2005 2:22:13 AM
Robert J. Lang wrote:
> Hi,
> 
> Is there a simple way to get the screen image in a wxGLCanvas into a
> wxBitmap or wxImage (so it can be saved to a file)? Ideally cross-platform,
> but specifically I'm on wxMac.

If you don't mind reading wxPython code, this could help:

http://lists.wxwidgets.org/archive/wxPython-users/msg21060.html

The above omits one step:  before invoking glReadPixels be sure to call 
glPixelStorei(GL_PACK_ALIGNMENT, 1).

--
Mitch

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

0
mitch
2/1/2005 3:36:12 PM
on 2/1/05 7:35 AM, Mitch Chapman at mitch@predict.com wrote:

> Robert J. Lang wrote:
>> Is there a simple way to get the screen image in a wxGLCanvas into a
>> wxBitmap or wxImage (so it can be saved to a file)? Ideally cross-platform,
>> but specifically I'm on wxMac.
> 
> If you don't mind reading wxPython code, this could help:
> http://lists.wxwidgets.org/archive/wxPython-users/msg21060.html
> The above omits one step:  before invoking glReadPixels be sure to call
> glPixelStorei(GL_PACK_ALIGNMENT, 1).
> Mitch

Hey, that was pretty clear even in Python (;o)) and it works. Thanks! Here's
the C++ version:

    GLint view[4];
    glGetIntegerv(GL_VIEWPORT, view);
    void* pixels = malloc(3 * view[2] * view[3]);
    glPixelStorei(GL_PACK_ALIGNMENT, 1);
    glReadPixels(0, 0, view[2], view[3], GL_RGB, GL_UNSIGNED_BYTE, pixels);
    wxImage image((int) view[2], (int) view[3]);
    image.SetData((unsigned char*) pixels);
    image = image.Mirror(false);

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

0
robertlang
2/2/2005 5:43:15 PM
Reply: