MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / makeMipmapBuffers

Method makeMipmapBuffers

src/main/java/net/optifine/Mipmaps.java:182–206  ·  view source on GitHub ↗
(Dimension[] mipmapDimensions, int[][] mipmapDatas)

Source from the content-addressed store, hash-verified

180 }
181
182 public static IntBuffer[] makeMipmapBuffers(Dimension[] mipmapDimensions, int[][] mipmapDatas)
183 {
184 if (mipmapDimensions == null)
185 {
186 return null;
187 }
188 else
189 {
190 IntBuffer[] aintbuffer = new IntBuffer[mipmapDimensions.length];
191
192 for (int i = 0; i < mipmapDimensions.length; ++i)
193 {
194 Dimension dimension = mipmapDimensions[i];
195 int j = dimension.width * dimension.height;
196 IntBuffer intbuffer = GLAllocation.createDirectIntBuffer(j);
197 int[] aint = mipmapDatas[i];
198 intbuffer.clear();
199 intbuffer.put(aint);
200 intbuffer.clear();
201 aintbuffer[i] = intbuffer;
202 }
203
204 return aintbuffer;
205 }
206 }
207
208 public static void allocateMipmapTextures(int width, int height, String name)
209 {

Callers 1

MipmapsMethod · 0.95

Calls 3

createDirectIntBufferMethod · 0.95
clearMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected