List of usage examples for org.lwjgl.opengl GL12 GL_CLAMP_TO_EDGE
int GL_CLAMP_TO_EDGE
To view the source code for org.lwjgl.opengl GL12 GL_CLAMP_TO_EDGE.
Click Source Link
From source file:com.adavr.player.globjects.Texture.java
License:Open Source License
public static Texture create(int internalFormat, int width, int height, int format, int type, ByteBuffer pixels) {/*from ww w. ja va2 s.c o m*/ int id = GL11.glGenTextures(); int target = GL11.GL_TEXTURE_2D; GL11.glBindTexture(target, id); GL11.glTexImage2D(target, 0, internalFormat, width, height, 0, format, type, pixels); GL11.glTexParameteri(target, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(target, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(target, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); GL11.glTexParameteri(target, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); return new Texture(id, target); }
From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java
License:Open Source License
public static int getGLWrap(final WrapMode wrap, final ContextCapabilities caps) { switch (wrap) { case Repeat:/*from w w w. ja v a 2s . c om*/ return GL11.GL_REPEAT; case MirroredRepeat: if (caps.isTextureMirroredRepeatSupported()) { return ARBTextureMirroredRepeat.GL_MIRRORED_REPEAT_ARB; } else { return GL11.GL_REPEAT; } case MirrorClamp: if (caps.isTextureMirrorClampSupported()) { return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_EXT; } // FALLS THROUGH case Clamp: return GL11.GL_CLAMP; case MirrorBorderClamp: if (caps.isTextureMirrorBorderClampSupported()) { return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_TO_BORDER_EXT; } // FALLS THROUGH case BorderClamp: if (caps.isTextureBorderClampSupported()) { return ARBTextureBorderClamp.GL_CLAMP_TO_BORDER_ARB; } else { return GL11.GL_CLAMP; } case MirrorEdgeClamp: if (caps.isTextureMirrorEdgeClampSupported()) { return EXTTextureMirrorClamp.GL_MIRROR_CLAMP_TO_EDGE_EXT; } // FALLS THROUGH case EdgeClamp: if (caps.isTextureEdgeClampSupported()) { return GL12.GL_CLAMP_TO_EDGE; } else { return GL11.GL_CLAMP; } } throw new IllegalArgumentException("invalid WrapMode type: " + wrap); }
From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java
License:Apache License
public final void glTexParameterf(int target, int pname, float param) { // LwjglGraphics.major is should to be 1 if we are in LwjglGL10. if (LwjglGraphics.minor < 2 && param == GL12.GL_CLAMP_TO_EDGE) param = GL11.GL_CLAMP;// ww w . j a va 2 s . c o m GL11.glTexParameterf(target, pname, param); }
From source file:com.badlogic.gdx.backends.lwjgl.swt.LwjglGL10.java
License:Apache License
public final void glTexParameterf(int target, int pname, float param) { // LwjglGraphics.major is should to be 1 if we are in LwjglGL10. if (SwtLwjglGraphics.minor < 2 && param == GL12.GL_CLAMP_TO_EDGE) param = GL11.GL_CLAMP;/* www .jav a 2s . c om*/ GL11.glTexParameterf(target, pname, param); }
From source file:com.dinasgames.engine.graphics.GL.java
public static int clampToEdge() { if (version >= 12) { return GL12.GL_CLAMP_TO_EDGE; }// w w w. j a va 2 s .c o m if (version >= 11) { return GL11.GL_CLAMP; } return -1; }
From source file:com.github.begla.blockmania.world.horizon.Skysphere.java
License:Apache License
private void loadStarTextures() { int internalFormat = GL11.GL_RGBA8, format = GL12.GL_BGRA; GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, _textureIds.get(0)); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL12.GL_TEXTURE_WRAP_R, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); for (int i = 0; i < 6; i++) { byte[] data = TextureManager.getInstance().getTexture("stars" + (i + 1)).getTextureData(); ByteBuffer byteBuffer = BufferUtils.createByteBuffer(data.length); byteBuffer.put(data);/*from www . ja v a2s .co m*/ byteBuffer.flip(); GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internalFormat, 256, 256, 0, format, GL11.GL_UNSIGNED_BYTE, byteBuffer); } }
From source file:com.grillecube.engine.renderer.world.WorldRenderer.java
private void createShadowFBO() { this._shadow_fbo = GLH.glhGenFBO(); this._shadow_fbo.bind(); this._shadow_fbo.createDrawBuffer(GL11.GL_NONE); this._shadow_map = GLH.glhGenTexture(); this._shadow_map.bind(GL11.GL_TEXTURE_2D); this._shadow_map.image2D(GL11.GL_TEXTURE_2D, 0, GL14.GL_DEPTH_COMPONENT16, SHADOW_FBO_WIDTH, SHADOW_FBO_HEIGHT, 0, GL11.GL_DEPTH_COMPONENT, GL11.GL_FLOAT, (ByteBuffer) null); this._shadow_map.parameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); this._shadow_map.parameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); this._shadow_map.parameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); this._shadow_map.parameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); this._shadow_fbo.createTextureAttachment(this._shadow_map, GL30.GL_DEPTH_ATTACHMENT); this._shadow_fbo.unbind(); }
From source file:com.mtbs3d.minecrift.VRRenderer.java
License:LGPL
public void renderGUIandWorld(float renderPartialTicks) { this.farPlaneDistance = (float) this.mc.gameSettings.ofRenderDistanceFine; if (Config.isFogFancy()) { this.farPlaneDistance *= 0.95F; }// w w w . j a va 2 s . c o m if (Config.isFogFast()) { this.farPlaneDistance *= 0.83F; } if (this.prevFarPlaneDistance != this.farPlaneDistance) { _FBOInitialised = false; this.prevFarPlaneDistance = this.farPlaneDistance; } //Ensure FBO are in place and initialized if (!setupFBOs()) return; boolean guiShowingThisFrame = false; int mouseX = 0; int mouseY = 0; ScaledResolution var15 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); int var16 = var15.getScaledWidth(); int var17 = var15.getScaledHeight(); if ((this.mc.theWorld != null && !this.mc.gameSettings.hideGUI && this.mc.thePlayer.getSleepTimer() == 0) || this.mc.currentScreen != null || this.mc.loadingScreen.isEnabled()) { //Render all UI elements into guiFBO mouseX = Mouse.getX() * var16 / this.mc.displayWidth; mouseY = var17 - Mouse.getY() * var17 / this.mc.displayHeight - 1; guiFBO.bindRenderTarget(); GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight); GL11.glClearColor(0, 0, 0, 0); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0.0D, var15.getScaledWidth_double(), var15.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glTranslatef(0.0F, 0.0F, -2000.0F); guiShowingThisFrame = true; } // Display loading / progress window if necessary if (this.mc.loadingScreen.isEnabled()) { this.mc.loadingScreen.vrRender(var16, var17); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); } else if (this.mc.theWorld != null && !this.mc.gameSettings.hideGUI && !this.blankGUIUntilWorldValid) { //Disable any forge gui crosshairs and helmet overlay (pumkinblur) if (Reflector.ForgeGuiIngame_renderCrosshairs.exists()) { Reflector.ForgeGuiIngame_renderCrosshairs.setValue(false); Reflector.ForgeGuiIngame_renderHelmet.setValue(false); } //Draw in game GUI this.mc.ingameGUI.renderGameOverlay(renderPartialTicks, this.mc.currentScreen != null, mouseX, mouseY); guiAchievement.updateAchievementWindow(); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); } if (this.blankGUIUntilWorldValid) { if (this.mc.theWorld != null) this.blankGUIUntilWorldValid = false; } if (this.mc.loadingScreen.isEnabled() == false && this.mc.currentScreen != null && !this.blankGUIUntilWorldValid) { try { this.mc.currentScreen.drawScreen(mouseX, mouseY, renderPartialTicks); } catch (Throwable var13) { CrashReport var11 = CrashReport.makeCrashReport(var13, "Rendering screen"); throw new ReportedException(var11); } GL11.glDisable(GL11.GL_LIGHTING); //inventory messes up fog color sometimes... This fixes GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); drawMouseQuad(mouseX, mouseY); } //Setup render target if (mc.vrSettings.useDistortion) { preDistortionFBO.bindRenderTarget(); } else if (this.mc.vrSettings.useSupersample) { postDistortionFBO.bindRenderTarget(); eyeRenderParams._renderScale = 1.0f; } else { unbindFBORenderTarget(); eyeRenderParams._renderScale = 1.0f; } GL11.glClearColor(0, 0, 0, 1); GL11.glEnable(GL11.GL_SCISSOR_TEST); if (this.mc.theWorld != null) { //If we're in-game, render in-game stuff this.mc.mcProfiler.startSection("level"); if (this.mc.renderViewEntity == null) { this.mc.renderViewEntity = this.mc.thePlayer; } EntityLivingBase renderViewEntity = this.mc.renderViewEntity; this.mc.mcProfiler.endStartSection("center"); //Used by fog comparison, 3rd person camera/block collision detection renderOriginX = renderViewEntity.lastTickPosX + (renderViewEntity.posX - renderViewEntity.lastTickPosX) * (double) renderPartialTicks; renderOriginY = renderViewEntity.lastTickPosY + (renderViewEntity.posY - renderViewEntity.lastTickPosY) * (double) renderPartialTicks; renderOriginZ = renderViewEntity.lastTickPosZ + (renderViewEntity.posZ - renderViewEntity.lastTickPosZ) * (double) renderPartialTicks; if (this.mc.currentScreen == null) { this.mc.mcProfiler.endStartSection("pick"); getPointedBlock(renderPartialTicks); } // Update sound engine setSoundListenerOrientation(); } //Update gui Yaw if (guiShowingThisFrame && !guiShowingLastFrame) { guiHeadYaw = this.cameraYaw - this.mc.lookaimController.getBodyYawDegrees(); } guiShowingLastFrame = guiShowingThisFrame; //Now, actually render world for (int renderSceneNumber = 0; renderSceneNumber < 2; ++renderSceneNumber) { setupEyeViewport(renderSceneNumber); this.mc.mcProfiler.endStartSection("camera"); //transform camera with pitch,yaw,roll + neck model + game effects setupCameraTransform(renderPartialTicks, renderSceneNumber); if (this.mc.theWorld != null) { GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPushMatrix(); this.renderWorld(renderPartialTicks, 0L, renderSceneNumber); this.disableLightmap(renderPartialTicks); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPopMatrix(); } else { GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer on the framebuffer to black GL11.glDisable(GL11.GL_BLEND); } if (guiShowingThisFrame) { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_TEXTURE_2D); guiFBO.bindTexture(); // Prevent black border at top / bottom of GUI GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); if (this.mc.theWorld != null && this.mc.vrSettings.hudLockToHead) { GL11.glLoadIdentity(); if (renderSceneNumber == 0) GL11.glMultMatrix(eyeRenderParams.gl_getLeftViewportTransform()); else GL11.glMultMatrix(eyeRenderParams.gl_getRightViewportTransform()); GL11.glRotatef(180f - this.mc.vrSettings.hudYawOffset, 0f, 1f, 0f); GL11.glRotatef(-this.mc.vrSettings.hudPitchOffset, 1f, 0f, 0f); // GL11.glRotatef(cameraRoll, 0f, 0f, 1f); GL11.glTranslatef(0.0f, 0.0f, this.mc.vrSettings.hudDistance - this.mc.vrSettings.eyeProtrusion); GL11.glRotatef(180f, 0f, 1f, 0f);//Not sure why this is necessary... normals/backface culling maybe? } else { float guiYaw = 0f; if (this.mc.theWorld != null) { if (this.mc.vrSettings.lookMoveDecoupled) guiYaw = this.mc.lookaimController.getBodyYawDegrees(); else guiYaw = guiHeadYaw + this.mc.lookaimController.getBodyYawDegrees(); guiYaw -= this.mc.vrSettings.hudYawOffset; } else guiYaw = guiHeadYaw + this.mc.lookaimController.getBodyYawDegrees(); GL11.glRotatef(-guiYaw, 0f, 1f, 0f); float guiPitch = 0f; if (this.mc.theWorld != null) guiPitch = -this.mc.vrSettings.hudPitchOffset; // if( this.mc.vrSettings.allowMousePitchInput) // guiPitch += this.mc.lookaimController.getBodyPitchDegrees(); GL11.glRotatef(guiPitch, 1f, 0f, 0f); GL11.glTranslatef(0.0f, 0.0f, this.mc.vrSettings.hudDistance); GL11.glRotatef(180f, 0f, 1f, 0f);//Not sure why this is necessary... normals/backface culling maybe? } GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (this.mc.theWorld != null) GL11.glColor4f(1, 1, 1, this.mc.vrSettings.hudOpacity); else GL11.glColor4f(1, 1, 1, 1); if (!this.mc.vrSettings.hudOcclusion) GL11.glDisable(GL11.GL_DEPTH_TEST); drawQuad2(this.mc.displayWidth, this.mc.displayHeight, this.mc.vrSettings.hudScale * this.mc.vrSettings.hudDistance); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glPopMatrix(); unbindTexture(); //mc.checkGLError("GUI"); } if (calibrationHelper != null) { float x = lookX * mc.vrSettings.hudDistance; float y = lookY * mc.vrSettings.hudDistance; float z = lookZ * mc.vrSettings.hudDistance; GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glPushMatrix(); GL11.glTranslatef(x, y, z); GL11.glRotatef(-this.cameraYaw, 0.0F, 1.0F, 0.0F); GL11.glRotatef(this.cameraPitch, 1.0F, 0.0F, 0.0F); GL11.glRotatef(this.cameraRoll, 0.0F, 0.0F, 1.0F); float textScale = (float) Math.sqrt((x * x + y * y + z * z)); GL11.glScalef(-INITIAL_CALIBRATION_TEXT_SCALE * textScale, -INITIAL_CALIBRATION_TEXT_SCALE * textScale, -INITIAL_CALIBRATION_TEXT_SCALE * textScale); String calibrating = "Calibrating " + calibrationHelper.currentPlugin.getName() + "..."; mc.fontRenderer.drawStringWithShadow(calibrating, -mc.fontRenderer.getStringWidth(calibrating) / 2, -8, /*white*/16777215); String calibrationStep = calibrationHelper.calibrationStep; // mc.fontRenderer.drawStringWithShadow(calibrationStep, -mc.fontRenderer.getStringWidth(calibrationStep)/2, 8, /*white*/16777215); int column = 8; ArrayList<String> wrapped = new ArrayList<String>(); Utils.wordWrap(calibrationStep, CALIBRATION_TEXT_WORDWRAP_LEN, wrapped); for (String line : wrapped) { mc.fontRenderer.drawStringWithShadow(line, -mc.fontRenderer.getStringWidth(line) / 2, column, /*white*/16777215); column += 16; } GL11.glPopMatrix(); GL11.glEnable(GL11.GL_DEPTH_TEST); } } GL11.glDisable(GL11.GL_SCISSOR_TEST); doDistortionAndSuperSample(); checkLatencyTester(); // Finish frame GL11.glFinish(); // Get end frame timings endFrameTimeNanos = startVSyncPeriodNanos = System.nanoTime(); long frameTime = endFrameTimeNanos - startFrameRenderNanos; addRenderFrameTimeNanos(frameTime); mc.checkGLError("After render world and GUI"); }
From source file:com.opengrave.og.light.Texture2DShadowMap.java
License:Open Source License
public Texture2DShadowMap(int size) { texture = GL11.glGenTextures();/*from ww w . j a v a2 s .c o m*/ GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); Util.checkErr(); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); Util.checkErr(); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); Util.checkErr(); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); Util.checkErr(); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, // GL14.GL_TEXTURE_COMPARE_FUNC, GL11.GL_LEQUAL); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, // GL14.GL_TEXTURE_COMPARE_MODE, // GL30.GL_COMPARE_REF_TO_TEXTURE); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL14.GL_TEXTURE_COMPARE_MODE, GL11.GL_NONE); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL14.GL_DEPTH_TEXTURE_MODE, GL11.GL_INTENSITY); GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_DEPTH_COMPONENT, size, size, 0, GL11.GL_DEPTH_COMPONENT, GL11.GL_FLOAT, (FloatBuffer) null); Util.checkErr(); GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // texture2 = GL11.glGenTextures(); // GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture2); // GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0,GL11.GL_RGB, size, size, // 0,GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, (FloatBuffer)null); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, // GL11.GL_NEAREST); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, // GL11.GL_NEAREST); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, // GL12.GL_CLAMP_TO_EDGE); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, // GL12.GL_CLAMP_TO_EDGE); // GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); }
From source file:com.opengrave.og.light.TextureCubeShadowMap.java
License:Open Source License
public TextureCubeShadowMap(int size) { texture = GL11.glGenTextures();/* w ww . j ava 2 s . com*/ GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, texture); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); Util.checkErr(); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); Util.checkErr(); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE); Util.checkErr(); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE); Util.checkErr(); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL12.GL_TEXTURE_WRAP_R, GL12.GL_CLAMP_TO_EDGE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL14.GL_TEXTURE_COMPARE_MODE, GL11.GL_NONE); GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, GL14.GL_DEPTH_TEXTURE_MODE, GL11.GL_INTENSITY); // GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, // GL12.GL_TEXTURE_BASE_LEVEL, 0); // GL11.glTexParameteri(GL13.GL_TEXTURE_CUBE_MAP, // GL12.GL_TEXTURE_MAX_LEVEL, 0); for (int i = 0; i < 6; i++) { GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL11.GL_DEPTH_COMPONENT, size, size, 0, GL11.GL_DEPTH_COMPONENT, GL11.GL_FLOAT, (FloatBuffer) null); } Util.checkErr(); GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, 0); // texture2 = GL11.glGenTextures(); // GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture2); // GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0,GL11.GL_RGB, size, size, // 0,GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, (FloatBuffer)null); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, // GL11.GL_NEAREST); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, // GL11.GL_NEAREST); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, // GL12.GL_CLAMP_TO_EDGE); // GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, // GL12.GL_CLAMP_TO_EDGE); // GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); }