I would expect the image to be rendered at approximately 40% opacity.? Instead, it shows up at 100% opacity!
Looking through the code, it appears that this is because GL_SetDrawingState, which is in charge of calling glColor, is called for rendering lines and points, but not for rendering textures.
I would expect the image to be rendered at approximately 40% opacity.
Instead, it shows up at 100% opacity!
Looking through the code, it appears that this is because
GL_SetDrawingState, which is in charge of calling glColor, is called for
rendering lines and points, but not for rendering textures.
Mason________________________________
From: Sik the hedgehog <sik.the.hedgehog at gmail.com>
To: Mason Wheeler <@Mason_Wheeler>; SDL Development List
Sent: Saturday, June 15, 2013 8:21 PM
Subject: Re: [SDL] Drawing translucent images on OpenGL renderer fails
Don’t textures have their own blending mode?
2013/6/15, Mason Wheeler <@Mason_Wheeler>:
Let’s say I have a texture loaded, and I run the following:
I would expect the image to be rendered at approximately 40% opacity.
Instead, it shows up at 100% opacity!
Looking through the code, it appears that this is because
GL_SetDrawingState, which is in charge of calling glColor, is called for
rendering lines and points, but not for rendering textures.