Java Code Examples for org.lwjgl.opengl.GL11#GL_CLAMP
The following examples show how to use
org.lwjgl.opengl.GL11#GL_CLAMP .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GeneratorHalos.java From tribaltrouble with GNU General Public License v2.0 | 6 votes |
public final Texture[] generate() { Channel channel_shadow = new Ring(size, size, shadow_parms, Ring.SMOOTH).toChannel(); Channel channel_ring = new Ring(size, size, ring_parms, Ring.LINEAR).toChannel(); Channel channel_black = new Channel(size, size).fill(0f); Channel channel_white = new Channel(size, size).fill(1f); Layer layers[] = new Layer[2]; layers[SHADOWED] = new Layer(channel_black, channel_black, channel_black, channel_shadow); layers[SELECTED] = new Layer(channel_white.copy(), channel_white.copy(), channel_white.copy(), channel_ring); layers[SELECTED] = layers[SHADOWED].copy().layerBlend(layers[SELECTED]); Texture[] textures = new Texture[layers.length]; for (int i = 0; i < layers.length; i++) { if (Landscape.DEBUG) new GLIntImage(layers[i]).saveAsPNG("generator_halos_" + i); textures[i] = new Texture(new GLImage[]{new GLIntImage(layers[i])}, GL11.GL_RGBA, GL11.GL_LINEAR, GL11.GL_LINEAR, GL11.GL_CLAMP, GL11.GL_CLAMP); } return textures; }
Example 2
Source File: GeneratorRing.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
public final Texture[] generate() { Channel channel_ring = new Ring(size, size, ring_parms, Ring.LINEAR).toChannel(); Channel channel_white = new Channel(size, size).fill(1f); Layer layer = new Layer(channel_white.copy(), channel_white.copy(), channel_white.copy(), channel_ring); Texture[] textures = new Texture[1]; textures[0] = new Texture(new GLImage[]{new GLIntImage(layer)}, GL11.GL_RGBA, GL11.GL_LINEAR, GL11.GL_LINEAR, GL11.GL_CLAMP, GL11.GL_CLAMP); return textures; }
Example 3
Source File: BuildingSiteRenderer.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
public BuildingSiteRenderer() { GLIntImage img = new GLIntImage(16, 16, GL11.GL_RGBA); for (int y = 1; y < img.getHeight() - 1; y++) for (int x = 1; x < img.getWidth() - 1; x++) img.putPixel(x, y, 0xffffffff); green = new Texture(new GLIntImage[]{img}, GL11.GL_RGBA, GL11.GL_LINEAR, GL11.GL_LINEAR, GL11.GL_CLAMP, GL11.GL_CLAMP); }
Example 4
Source File: Skin.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
private final static Texture loadTexture(String tex_file) { TextureFile file = new TextureFile(tex_file, GL11.GL_RGBA, GL11.GL_LINEAR, GL11.GL_LINEAR, GL11.GL_CLAMP, GL11.GL_CLAMP); return (Texture)Resources.findResource(file); }
Example 5
Source File: Icons.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
private final static Texture loadTexture(String tex_file) { TextureFile file = new TextureFile(tex_file, GL11.GL_RGBA, GL11.GL_LINEAR, GL11.GL_LINEAR, GL11.GL_CLAMP, GL11.GL_CLAMP); return (Texture)Resources.findResource(file); }
Example 6
Source File: Texture.java From tribaltrouble with GNU General Public License v2.0 | 4 votes |
private final static int bestWrap(int wrap) { if (wrap == GL12.GL_CLAMP_TO_EDGE && !GLContext.getCapabilities().OpenGL12) { return GL11.GL_CLAMP; } else return wrap; }