From 6bfd01502b209260900d1b77155ff0e4a58c0218 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Mon, 11 Jul 2005 17:05:11 +0000 Subject: [PATCH] way simple icon test --- .../org/lwjgl/test/WindowCreationTest.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/java/org/lwjgl/test/WindowCreationTest.java b/src/java/org/lwjgl/test/WindowCreationTest.java index e5643d0f..6211e6fc 100644 --- a/src/java/org/lwjgl/test/WindowCreationTest.java +++ b/src/java/org/lwjgl/test/WindowCreationTest.java @@ -31,6 +31,9 @@ */ package org.lwjgl.test; +import java.nio.ByteBuffer; + +import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.Display; @@ -91,7 +94,25 @@ public class WindowCreationTest { window_x = window_y = 100; Display.setLocation(window_x, window_y); + // Icon test + ByteBuffer size16 = BufferUtils.createByteBuffer(16 * 16 * 4); + for(int i=0; i<16; i++) { + for(int j=0; j<16; j++) { + size16.putInt(0xffffffff); + } + } + size16.flip(); + + ByteBuffer size32 = BufferUtils.createByteBuffer(32 * 32 * 4); + for(int i=0; i<32; i++) { + for(int j=0; j<32; j++) { + size32.putInt(0xff0000ff); + } + } + size32.flip(); + Display.create(); + Display.setIcon(new ByteBuffer[] { size16, size32 }); return true; } catch (LWJGLException le) { le.printStackTrace();