Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm getting the following error:

java.io.IOException: Attempt to allocate a texture to big for the current hardware at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:320) at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254) at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:200) at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64) at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)

The image I'm trying to use is 128x128.

System.out.println(GL11.glGetInteger(GL11.GL_MAX_TEXTURE_SIZE));

I get: 32.

32??!! My graphics card is AMD Radeon HD 7970M with 2048 MB GDDR5 RAM, I can run all the latest games in 1080p and 60fps with no problem, and those textures sure as hell doesn't look like they are 32x32 pixels to me!

How can I fix this?

--

Edit: Here's the chaos code I use to init OpenGL:

Display.setDisplayMode(new DisplayMode(500,500));
Display.create();
if (!GLContext.getCapabilities().OpenGL11) {
    throw new Exception("OpenGL 1.1 not supported.");
}
Display.setTitle("Game");
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLU.gluPerspective(45, 1, 0.1f, 5000);

Mouse.setGrabbed(true);

glMatrixMode(GL_MODELVIEW);

glLoadIdentity();
glEnable(GL_TEXTURE_2D);
glClearColor(0, 0, 0, 0);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_POINT_SMOOTH);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);
glEnable(GL_POLYGON_OFFSET_FILL);

glShadeModel(GL_SMOOTH);

Display is a LWJGL thing, it makes the OpenGL context and the window.

Anyway, I don't think there's anything in the init code that can help me but you never know...

share|improve this question
    
Could you paste the code that you use to initialize OpenGL and load the texture? I suspect you forgot to initialize something. –  sm4 Jun 24 '13 at 13:27
1  
Hardware constant will be read from some place in memory. Maybe that place in memory isn't filled with correct values, because you haven't initialized the OpenGL library that was supposed to put it there ;) –  sm4 Jun 24 '13 at 13:40
2  
Can you show us what you get for glGetString (GL_VENDOR) and glGetString (GL_RENDERER)? –  Jimmy Shelter Jun 24 '13 at 16:28
1  
You may need to reinstall your driver. Sounds vaguely like your GL driver is not installed properly. –  Sean Middleditch Jun 24 '13 at 17:26
1  
Re: "I can run all the latest games in 1080p and 60fps with no problem" - the majority of games use D3D, not OpenGL, and your D3D drivers most likely are good. OEM drivers tend not to be too great for OpenGL support, and with a 7970M I'm expecting it's a switchable graphics monstrosity, which makes things even worse. –  Jimmy Shelter Jun 24 '13 at 22:41
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.