Skip to content

Commit 2f757d8

Browse files
Revert "Allow transparent backgrounds in webgl"
This reverts commit 2e8e2af.
1 parent 06eeabd commit 2f757d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/components/term.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,15 @@ export default class Term extends React.PureComponent<TermProps> {
131131
this.termWrapperRef?.appendChild(this.termRef);
132132

133133
if (!props.term) {
134+
const needTransparency = Color(props.backgroundColor).alpha() < 1;
134135
let useWebGL = false;
135136
if (props.webGLRenderer) {
136-
if (!isWebgl2Supported()) {
137+
if (needTransparency) {
138+
console.warn(
139+
'WebGL Renderer has been disabled since it does not support transparent backgrounds yet. ' +
140+
'Falling back to canvas-based rendering.'
141+
);
142+
} else if (!isWebgl2Supported()) {
137143
console.warn('WebGL2 is not supported on your machine. Falling back to canvas-based rendering.');
138144
} else {
139145
// Experimental WebGL renderer needs some more glue-code to make it work on Hyper.

0 commit comments

Comments
 (0)