blending

How to use 32bit alpha-blended BMP in .Net

Hi, Is there any way to use this kind of format in .Net (C#)? I want to use the same skin format that uTorrent uses in my app, but i can't get the transparent background. Any ideas? Thanks for your time. ...

BlendFunc for textured fonts with changing background

I am attempting to use Textured fonts as so that I can display text in my openGL scene. However I am having trouble finding glBlendFunc values that will work. The background that the text will be placed on is a grayscale image but will change throughout the execution. Because the background changes the text could possibly be on top of ...

What do the blend modes in pygame mean?

Surface.blit has a new parameter in 1.8: blend. The following values are defined: BLEND_ADD BLEND_SUB BLEND_MULT BLEND_MIN BLEND_MAX BLEND_RGBA_ADD BLEND_RGBA_SUB BLEND_RGBA_MULT BLEND_RGBA_MIN BLEND_RGBA_MAX BLEND_RGB_ADD BLEND_RGB_SUB BLEND_RGB_MULT BLEND_RGB_MIN BLEND_RGB_MAX Can someone explain what these modes mean? ...

How to remove black background from textures in OpenGL

Hi, I'm looking for a way to remove the background of a 24bit bitmap, while keeping the main image totally opaque, up until now blending has served the purpose but now I need to keep the main bit opaque. I've searched on Google but found nothing helpful, I think I'm probably searching for the wrong terms though, so any help would be gre...

Transparency/Blending issues with OpenGL ES/iPhone

Hi everyone. I have a simple 16x16 particle that goes from being opaque to transparent. Unfortunately is appears different in my iPhone port and I can't see where the differences in the code are. Most of the code is essentially the same. I've uploaded an image to here to show the problem The particle on the left is the incorrectly rend...

OpenGL ES. Scrolling 3 layer starfield textures gets me from 60 -> 40 FPS

I need to draw the background for a 2D space scrolling shooter. I need to implement 3 layers of stars: one distant nebula (moving really slow) in the background, one layer of far away stars (moving slow) and one layer of close stars (moving normal) on top of the other two. The way i first tried this was using 3 textures of 320 x 480 tha...

How to create Simple HLSL Silverlight filter for blending/playing with/mixing 2 images?

How to create Simple HLSL Silverlight filter for blending/playing with/mixing 2 images? I need some working example of a filter which would take as an input 2 images\objects and return 1 image - result of some calculations. I want to bring to Silverlight blend modes!) ...

How do I use a mask to punch out my image?

I have a mask (loaded from a 256 grey PNG) that I want to apply to an image that's being used as part of my process for drawing a UITableViewCell's imageView.image property. When the cell isn't selected/highlighted, I CGImageCreateWithMask with a square of the proper color and the mask, then drawAtPoint: it into the image I'm building. ...

Alpha masks with OpenGL

I want to use an alpha mask in OpenGL so that white(1)=visible and black(0)=hidden. So what I do is I write something in the alpha component of the framebuffer using glColorMask(False, False, False, True) (I'm using python, you see) and then draw some geometry above it using blending. But it isn't working: I tried filling the alpha buf...

What is the formula for extracting the src from a calculated blendmode?

How does one go about using a alpha blending formula to achieve the src rgb color from the resultant of the 2 blended together ...

Any undersandable description of glTexEnvi (OpenGL ES 1.x)?

I've seen as many different parameters as many source codes I saw. Is there a description can be found somewhere that refers all about those parameters in details? ...

WPF How to disable blend mode? Drawing on top of controls blends the colors like overlay mode.

I'm trying to draw a line on top of an existing control but it blends the colors together. All I find is tutorial on how to make fancy blending mode but all I want is draw a solid color line over my controls but even the solidColorBrush doesn't behave like I want. ...

CGContextDrawImage returning bad access

Hello guys, I've been trying to blend two UIImage for about 2 days now and I've been getting some BAD_ACCESS errors. First of all, I have two images that have the same orientation, basically I'm using the CoreGraphics to do the blending. One curious detail, everytime I modify the code, the first time I compile and run it on device, I g...

What can we use instead of blending in OpenGL ES?

I am doing my iphone graphics using Opengl. In one of my projects i need to use an image, which i need to be used as a texture in opengl. The png image is 512 * 512 in size, its background is transparent and the image has a thick blue line in its center. When i apply my image to a polygon in opengl, the texture appears as if, the trans...

opengl paint program based on Apple's 'glPaint' on a white background - how to blend?

Trying to write a simple paint program for iPhone, and I'm using Apple's glPaint sample as a guide. The only problem is, painting doesn't work on a white background, since white + colour = white. I've tried different blending functions, but haven't been able to hit on the right combination of settings and/or brushes to make this work. ...

Opengl: Problem with masking

Hey all, I'm working on creating a hole in a wall using masking in opengl, my code is quit simple like this, //Draw the mask glEnable(GL_BLEND); glBlendFunc(GL_DST_COLOR,GL_ZERO); glBindTexture(GL_TEXTURE_2D, texture[3]); glBegin(GL_QUADS); glTexCoord2d(0,0); glVertex3f(-20,40,-20); glTexCoord2d(0,1);glVertex...

Per-pixel per-component alpha blending in GDI

I have a 24-bit bitmaps with R, G, B color channels and a 24-bit bitmap with R, G, B alpha channels. I want to alpha blend the first bitmap to a HDC in GDI or RenderTarget in Direct2D with the alpha channels respectively. For example, suppose for one pixel, the bitmap color is (192, 192, 192), the HDC color is (0, 255, 255) and the alpha...

Masking in OpenGL ES

Hello all, reading #20 tutorial on Nehe and a question here about masking, I implemented masking using b/w image and opaque image, however the result is completely not what is expected (I'm using OpenGL ES 1 on iPhone, so can't use shaders). Source+Mask=Result As can be seen on the result picture what is white on mask isn't transparent ...

OpenGL blending (Java)

I'm writing some Java OpenGL code (though the principles are the same in C++ openGL). I have a situation where I want to render certain items on top of others. I can do that by disable the depth test or by setting it to GL_ALWAYS) for those items and that works well. The issue is that colors of those items on top seem to be darkened by t...

how to compile glblendequation in visual studio 2010?

how to compile glBlendEquation() in visual studio 2010? it say: error C3861: 'glBlendEquation': identifier not found ...