Archived

This topic is now archived and is closed to further replies.

Transparent stuff

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

Recommended Posts

I know this is not directly ogl related, but, lets ask anyway ... I am making a configurator utlity for a gl project, I want it to look HI TECH, and not square. How do I have a partially transparent window, like, based on a BlacknWhite image ? Les''t say I want a complex shape, with curves and stuff which is not possible to delimitate all points (that''s why I want it based on an image) ?

Share on other sites
alpha blending.
glEnable(GL_BLEND);//or something like that, don''t really remember
glColor4f(r,g,b,a);

JoeMont001@aol.com www.polarisoft.n3.net

Share on other sites
That''s not the question
I of course know how to blend gl stuff,
Blending in gl is only about the window content, not the window itself

Of course, as my configurator is up to setup the renderer, it does not uses gl itself, but pure win32 api

Share on other sites
Although I''m really no expert at Window$programming, I think you should use some kind of build in Window$ functions, although I don''t know if you would still be able to render in that window with OpenGL (if that''s what you want to do anyway).

Share on other sites
MMmh, but which function ???(and no, I don''t want gl render in it)

Share on other sites
Hey SK,

Check out the functions TransparentBlt(...) and AlphaBlend(...) ...I haven''t used them myself (I just looked them up on MSDN), but I can tell you that the first is for colour-keying, and the second is for images with an alpha channel.

Hope that helps

------------------------------------------------------
"You need a weapon. Look around you... can you construct some sort of rudimentary lathe?"
- Guy Fleegman, Security Officer, NSEA Protector

Share on other sites
like u say this has got nothing to do with gl, your best bet would be looking in msdn or one of the windows sdk''s, information about creating a transparent window

http://members.xoom.com/myBollux

Share on other sites
(german) PCMAGAZIN 2/00. If you''re interested,
i''d could mail you the sources for 2 programs
(vc6, projects&exe, full compilable), size
is 120k...

arno@hangelar.de

Share on other sites
you want to use regions. I think the API calls are something like
CreateRectRgn
CombineRgn
SelectObject

and there are other Create*Rgn for createing round regions, polygonal regions, etc. CombineRgn allows you to take 2 regions and combine them using logical operations (and, or, xor, etc.). SelectObject allows you to apply a constructed region to a window.

Share on other sites
There''s a way you can specify a shape that isn''t made from rectangles - look at the mp3 player sonique...

don''t ask me how it''s done tho, i only do opengl!

been doing more win32 stuff lately though - not that bad really when you start getting into it.

- peter
peter@digital-animations.com

• 11
• 18
• 12
• 22
• 9
• Forum Statistics

• Total Topics
631397
• Total Posts
2999822
×