mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Add GLFW_TRANSPARENT attribute and documentation
This completes support for window framebuffer transparency on Windows, macOS and X11. Note that the hint/attribute may be renamed before release to clarify its relationship to GLFW_OPACITY. Fixes #197. Closes #1079. Related to #663. Related to #715. Related to #723. Related to #1078.
This commit is contained in:
@@ -172,7 +172,7 @@ static GLfloat angle = 0.f;
|
||||
/* OpenGL draw function & timing */
|
||||
static void draw(void)
|
||||
{
|
||||
glClearColor(0., 0., 0., 0.);
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
@@ -312,7 +312,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
glfwWindowHint(GLFW_DEPTH_BITS, 16);
|
||||
glfwWindowHint(GLFW_ALPHA_BITS, 8);
|
||||
glfwWindowHint(GLFW_TRANSPARENT, GLFW_TRUE);
|
||||
|
||||
window = glfwCreateWindow( 300, 300, "Gears", NULL, NULL );
|
||||
|
||||
Reference in New Issue
Block a user