Jump to content
  • Advertisement
Sign in to follow this  
ajm113

Converting Pixel Format from Win32 to wxWidgets

This topic is 2897 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I'm trying to enable my wxGLCanvas to have alpha channel in it to allow me to create transparent images that I can save on my machine from a frame drawn in my software here is my pixel format from Win32 I use that works perfect for my needs:


static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER ,
PFD_TYPE_RGBA,
32, //Color Bits
8, // Bits for Red Channel
0, // ignored
8, // Bits for Green Channel
0, // ignored
8, // Bits for Blue Channel
0, // ignored
8, // Bits for Alpha Channel
0, // ignored
0,0,0,0,0,
32,
0,
0,
PFD_MAIN_PLANE,
0,
0,0,
};



So how can I convert from what I have up there to this?


static const int attribs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 32, 8, 8, 8, 8, 32};

canvas = new wxGLCanvas( this, -1, wxPoint(0,0), size,
GetWindowStyleFlag(), _T("GLCanvas"),
attribs, wxNullPalette );



Is it possible to do this in wxWidgets or is some reprogramming involved with it's source code to allow me to use alpha bit planes in the wxGLCanvas?

Thanks, Andrew.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!