MCPcopy Index your code
hub / github.com/PavelDoGreat/WebGL-Fluid-Simulation / createDoubleFBO

Function createDoubleFBO

script.js:1079–1106  ·  view source on GitHub ↗
(w, h, internalFormat, format, type, param)

Source from the content-addressed store, hash-verified

1077}
1078
1079function createDoubleFBO (w, h, internalFormat, format, type, param) {
1080 let fbo1 = createFBO(w, h, internalFormat, format, type, param);
1081 let fbo2 = createFBO(w, h, internalFormat, format, type, param);
1082
1083 return {
1084 width: w,
1085 height: h,
1086 texelSizeX: fbo1.texelSizeX,
1087 texelSizeY: fbo1.texelSizeY,
1088 get read () {
1089 return fbo1;
1090 },
1091 set read (value) {
1092 fbo1 = value;
1093 },
1094 get write () {
1095 return fbo2;
1096 },
1097 set write (value) {
1098 fbo2 = value;
1099 },
1100 swap () {
1101 let temp = fbo1;
1102 fbo1 = fbo2;
1103 fbo2 = temp;
1104 }
1105 }
1106}
1107
1108function resizeFBO (target, w, h, internalFormat, format, type, param) {
1109 let newFBO = createFBO(w, h, internalFormat, format, type, param);

Callers 1

initFramebuffersFunction · 0.85

Calls 1

createFBOFunction · 0.85

Tested by

no test coverage detected