Aw shoot... I'm responsible for the snow base.
What's wrong with it?
To-dos and bugs
-
- Elite
- Posts: 1832
- Joined: Sat Jan 15, 2005 10:21 pm
- Location: State of Denial
- Contact:
-
- Hunter
- Posts: 89
- Joined: Thu Jul 20, 2006 10:51 pm
- Location: Columbus, Ohio
Sorry I haven't been able to look into the texture problem for low/med detail mode for the ice base cuz as of SVN 11299, I get a seg fault for low/med detail mode on startup. I have tried everything I can think of (including svn revert *), so I posted this problem on bug tracker. I'll have to figure out which version of SVN I can use that still works at all under these detail modes...
running (I finally got a new computer so I can play VS again!):
ubuntu linux 8.04
AMD Athlon XP 2 GHz
1 GB RAM
GeForce FX 5200
ubuntu linux 8.04
AMD Athlon XP 2 GHz
1 GB RAM
GeForce FX 5200
-
- Hunter
- Posts: 89
- Joined: Thu Jul 20, 2006 10:51 pm
- Location: Columbus, Ohio
Upgrage ship room on ice planet
Safemode has fixed the segfault on low/med detail mode, so now I can look into the ice base again. When you click on the "Upgrade Ship" button from the main concourse screen, all you get is a white screen, with buttons for the weapon dealer and ship dealer (this is what usually happens for background textures that won't work without mipmaps, like the main menu and credits screen). Everything else on the ice planet works fine, including the weapon and ship dealers once you click their respective buttons from the (white) upgrade ship room.
The upgrade ship room uses /sprites/bases/generic/weaponroom.jpg (this isn't actually part of the snow planet textures, but rather a generic one, so I don't think this was your mistake Halleck ), which is 1280x1280. If I reduce its size to 1024x1024 using gimp, it then displays fine. Images that are 2048x2048 (such as generic_day.jpg) also seem to display fine, so if there is concern about losing image quality weaponroom.jpg could just as well be scaled up in size. I am guessing that vegastrike needs its textures to have sides that have length 2 raised to some power to display right without mipmaps.
The only textures which seem to have this problem are (I checked sizes on all the textures located in /sprites, but I haven't actually looked at them ingame):
/sprites/bases/gereric/weaponroom.jpg (1280x1280)
/sprites/interfaces/credits.png (1280x1024)
/sprites/interfaces/credits_pressed.png (1024x768)
/sprites/interfaces/menu.jpg (1280x1024)
All of these except
It seems like the easiest thing to do would be to just convert these textures to have power of 2 sizes. I'd be happy to do this if it would be useful, and if someone tells me what the conventions are for jpeg compression etc, but its probably easier for a dev to just do it themself.
If there is a strong desire to support non power of 2 textures, then I believe the line that creates non-mipmapped textures is in /src/gldrv/gl_texture.cpp on line 806 (for SVN 11324):
What I have been able to find about the OpenGL command glTexImage2D doesn't say anything about requiring power of 2 sizes, but maybe it does. Or maybe the problem is actually elsewhere. Anyways, unless someone who knows what they are doing wants to look at this, maybe the quick fix for the next release is just to changes the sizes of those 4 textures...
The upgrade ship room uses /sprites/bases/generic/weaponroom.jpg (this isn't actually part of the snow planet textures, but rather a generic one, so I don't think this was your mistake Halleck ), which is 1280x1280. If I reduce its size to 1024x1024 using gimp, it then displays fine. Images that are 2048x2048 (such as generic_day.jpg) also seem to display fine, so if there is concern about losing image quality weaponroom.jpg could just as well be scaled up in size. I am guessing that vegastrike needs its textures to have sides that have length 2 raised to some power to display right without mipmaps.
The only textures which seem to have this problem are (I checked sizes on all the textures located in /sprites, but I haven't actually looked at them ingame):
/sprites/bases/gereric/weaponroom.jpg (1280x1280)
/sprites/interfaces/credits.png (1280x1024)
/sprites/interfaces/credits_pressed.png (1024x768)
/sprites/interfaces/menu.jpg (1280x1024)
All of these except
It seems like the easiest thing to do would be to just convert these textures to have power of 2 sizes. I'd be happy to do this if it would be useful, and if someone tells me what the conventions are for jpeg compression etc, but its probably easier for a dev to just do it themself.
If there is a strong desire to support non power of 2 textures, then I believe the line that creates non-mipmapped textures is in /src/gldrv/gl_texture.cpp on line 806 (for SVN 11324):
Code: Select all
glTexImage2D(image2D, 0, internalformat, textures[handle].width, textures[handle].height, 0, textures[handle].textureformat, GL_UNSIGNED_BYTE, buffer);
running (I finally got a new computer so I can play VS again!):
ubuntu linux 8.04
AMD Athlon XP 2 GHz
1 GB RAM
GeForce FX 5200
ubuntu linux 8.04
AMD Athlon XP 2 GHz
1 GB RAM
GeForce FX 5200
-
- Developer
- Posts: 2150
- Joined: Mon Apr 23, 2007 1:17 am
- Location: Pennsylvania
- Contact:
textures should always be power of 2 sizes. In fact it's required. If it works in VS while not being that size, then either code in VS is making it that size or the texture is being transformed by openGL in some way to be that size, perhaps by falling back to software calls.
http://www.opengl.org/sdk/docs/man/xhtm ... mage2D.xml
If you find textures where the width or height isn't 2^n then it should be converted.
If nobody gets around to it later on today i'll resize/crop those files to be in compliance.
http://www.opengl.org/sdk/docs/man/xhtm ... mage2D.xml
If you find textures where the width or height isn't 2^n then it should be converted.
If nobody gets around to it later on today i'll resize/crop those files to be in compliance.