-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on some Windows 10 computers with a built-in graphics card. #4033
Comments
Updated to reflect that it is some built-in graphics. I have access to 3 windows computers with intel graphics and they work great. |
To reproduce the problem, try running an application written using the fyne framework on a computer with a pre-2013 graphics card, such as Intel(R) HD Graphics. And the app won't work, won't even be able to create the main window. |
I am facing the same issue on a notebook that has a 2012 Intel® Core™ i5-460M processor and utilizes Intel HD Graphics on Windows 10 Pro. Any program using the framework builds fine but fails to run. Here is the stack trace for reference:
|
Thanks @pedro-git-projects I think the error message is missing from the top of the stack though. It should have 1 or two lines above that point that explain what sort of error was encountered... |
Apologies for any confusion caused earlier. I have re-run the program and obtained the following stack trace:
Thus it is also an OpenGL issue. Note that this is my build recipe:
Finally, this program is working fine on another computer running the 6.3.9-arch1-1 kernel on Arch Linux. |
Thanks @pedro-git-projects i think this may be a different issue to the one initially reported. Yours may have been fixed on |
Created a binary using fyne install on the fyne_demo project from the develop branch using the devel version of the cli, however still got the same error. Because I need to deliver this app fast, I will be migrating my project to Gio, however, when I'm done I may comeback to try and help investigating this issue further. |
I don't know why those functions are being called - they are only present from OpenGL 3.2 onwards - and we only use 2.0. Is it possible that your GPU doesn't backwards support 2.0, or some other ways has limited gl compatibility? |
Without access to the hardware there isn't much the team can do to resolve this. If anyone can provide remote access or direct hardware we can progress this issue. |
Try unzipping the opengl32.dll from https://fdossena.com/?p=mesa/index.frag (32 or 64bit depending on what you are bulding) next to the built application. I distribute this file with some applications I make as some of my users has this exact problem. This DLL will software emulate opengl with a hit to performance, but at least makes the software work in VM's and on machines with graphics cards with broken / missing opengl support. Seems it's usually older machines with built in Intel graphics cards having this problem |
@roffe: Could you provide more details about the usage / installation of "opengl32.dll"? Background: My use case is to run a Fyne application on Citrix with a totally outdated OpenGL version 1.1. |
To answer the question @roffe by myself: The REAME.txt for MESA3D says this:
(Great) Test result: The solution works for me on Citrix with "Windows 10 Enterprise" (64 bit). |
Yeah that is a great result when your hardware does not support OpenGL >= 2.0. |
The solution proposed by @roffe helped solve this problem. In the future, you can embed this library into your application to solve the problem at the development level. |
+1 on this, same issue. |
Please test the |
@andydotxyz Output from the OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
attribute vec3 vert;
attribute vec2 vertTexCoord;
varying vec2 fragTexCoord;
void main() {
fragTexCoord = vertTexCoord;
gl_Position = vec4(vert, 1);
}
<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
uniform sampler2D tex;
varying vec2 fragTexCoord;
void main() {
gl_FragColor = texture2D(tex, fragTexCoord);
}
<<< SHADER SOURCE
OpenGL program linking output:
No errors.
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
attribute vec2 vert;
attribute vec2 normal;
uniform float lineWidth;
varying vec2 delta;
void main() {
delta = normal * lineWidth;
gl_Position = vec4(vert + delta, 0, 1);
}
<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
uniform vec4 color;
uniform float lineWidth;
uniform float feather;
varying vec2 delta;
void main() {
float alpha = color.a;
float distance = length(delta);
if (feather == 0.0 || distance <= lineWidth - feather) {
gl_FragColor = color;
} else {
gl_FragColor = vec4(color.r, color.g, color.b, mix(color.a, 0.0, (distance - (lineWidth - feather)) / feather));
}
}
<<< SHADER SOURCE
OpenGL program linking output:
No errors.
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
attribute vec2 vert;
attribute vec2 normal;
void main() {
gl_Position = vec4(vert+normal, 0, 1);
}
<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
/* scaled params */
uniform vec2 frame_size;
uniform vec4 rect_coords; //x1 [0], x2 [1], y1 [2], y2 [3]; coords of the rect_frame
uniform float stroke_width;
/* colors params*/
uniform vec4 fill_color;
uniform vec4 stroke_color;
void main() {
vec4 color = fill_color;
if (gl_FragCoord.x >= rect_coords[1] - stroke_width ){
color = stroke_color;
} else if (gl_FragCoord.x <= rect_coords[0] + stroke_width){
color = stroke_color;
} else if (gl_FragCoord.y <= frame_size.y - rect_coords[3] + stroke_width ){
color = stroke_color;
} else if (gl_FragCoord.y >= frame_size.y - rect_coords[2] - stroke_width ){
color = stroke_color;
}
gl_FragColor = color;
}
<<< SHADER SOURCE
OpenGL program linking output:
No errors.
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
attribute vec2 vert;
attribute vec2 normal;
void main() {
gl_Position = vec4(vert+normal, 0, 1);
}
<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.
>>> SHADER SOURCE
#version 110
/* scaled params */
uniform vec2 frame_size;
uniform vec4 rect_coords; //x1 [0], x2 [1], y1 [2], y2 [3]; coords of the rect_frame
uniform float stroke_width_half;
uniform vec2 rect_size_half;
uniform float radius;
/* colors params*/
uniform vec4 fill_color;
uniform vec4 stroke_color;
float calc_distance(vec2 p, vec2 b, float r)
{
vec2 d = abs(p) - b + vec2(r);
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0)) - r;
}
void main() {
vec4 frag_rect_coords = vec4(rect_coords[0], rect_coords[1], frame_size.y - rect_coords[3], frame_size.y - rect_coords[2]);
vec2 vec_centered_pos = (gl_FragCoord.xy - vec2(frag_rect_coords[0] + frag_rect_coords[1], frag_rect_coords[2] + frag_rect_coords[3]) * 0.5);
float distance = calc_distance(vec_centered_pos, rect_size_half, radius - stroke_width_half);
vec4 from_color = stroke_color; //Always the border color. If no border, this still should be set
vec4 to_color = stroke_color; //Outside color
if (stroke_width_half == 0.0)
{
from_color = fill_color;
to_color = fill_color;
}
to_color[3] = 0.0; // blend the fill colour to alpha
if (distance < 0.0)
{
to_color = fill_color;
}
distance = abs(distance) - stroke_width_half;
float blend_amount = smoothstep(-1.0, 1.0, distance);
// final color
gl_FragColor = mix(from_color, to_color, blend_amount);
}
<<< SHADER SOURCE
OpenGL program linking output:
No errors.
|
Excellent thanks. This fix will be in v2.4.2 |
Checklist
Describe the bug
The driver does not appear to support opengl
This error occurred on computers that use the Windows OS as the main one, and also use the built-in graphics card.
Unfortunately, the problem occurs on every computer that has an integrated video card, as I was able to find out, until 2013. At the same time, all drivers and OS were updated to the latest version. Moreover, on some computers, the OpenGL version was higher than 3.2.
To understand the scale of the problem, out of 10 computers with Windows OS on 4 with a built-in video card, the application did not start. Therefore, when the product is released, for a large part of users, this error will not allow using the application.
The following steps were taken to solve the problem:
To analyze the situation, the GPU-Z viewer program was installed, as a result, on several computers, it was found that OpenGL version 4.5 was installed on them, which is higher than the declared one. The screenshots below show the data of two graphics cards.
How to reproduce
Build the EXE file and run it on a Windows computer with an integrated graphics card such as Intel(R) HD Graphics 3000. The result will be the error you are looking for.
Screenshots
Example code
2023/07/05 08:08:14 Fyne error: window creation error
2023/07/05 08:08:14 Cause: APIUnavailable: WGL: The driver does not appear to support OpenGL
Fyne version
2.3.3
Go compiler version
1.20.4
Operating system and version
Windows 10 22H2
Additional Information
At the moment, I have not found any good solution to this problem that can help in the solution.
Is it possible to solve this error by adding some libraries to the code or installing third-party programs to minimize problems for users?
The text was updated successfully, but these errors were encountered: