From 7b2ec0e4b076a660e2848145761f93c884eb5076 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 8 Aug 2019 19:28:16 +0100 Subject: [PATCH] Populate jaggl_alpha_bits with cAlphaBits from selected pixel format --- gl-natives/src/main/c/jaggl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index fd28a75d40..a0c8035e32 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -521,7 +521,11 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc goto dsi_free; } - // TODO(gpe): get actual number of alpha bits + if (!DescribePixelFormat(jaggl_device, format, sizeof(pfd), &pfd)) { + goto dsi_free; + } + + jaggl_alpha_bits = pfd.cAlphaBits; result = JNI_TRUE; #else