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.

This is a speed question, I have a texture, which is 2048 per 2048, the texture is designed to run in big resolutions (1920x1080 for example).

The problem is, that the texture have a size of 10MB in bitmap, is too heavy, I don't know if that's a good size for load it in gl and use it in a game...

Is there any problem to use a 10MB texture in an OpenGL Game?

share|improve this question
1  
"Too big" for what? Are you asking about whether it'll fit, whether it'll hurt performance, whether it'll cause some other kind of problem? –  Trevor Powell Feb 25 '13 at 23:45
    
Talking about the speed of opengl and the VRAM, RAM, video card, etc... –  Spamdark Feb 26 '13 at 0:24
3  
A typical gaming class GPU now has a gigabyte or more of dedicated memory on-board. Do the math and figure out what makes sense. Also remember that GPUs support hardware texture decompression of the DXT/BCn/S3TC formats, which can reach compression ratios of 6:1. –  Promit Feb 26 '13 at 2:33

1 Answer 1

up vote 7 down vote accepted

First off, don't measure the amount of video memory used by the image by the disk size of the file. There's a similar question here which covers the topic and I've linked to a very good answer that will cover most ground on how you should measure VRAM usage accurately. As a quick guideline though, it depends on the size and amount of colours in the image and how the image is saved and packed.

With this in mind, the image might be a lot smaller than you anticipated or bigger - it would be up to you to check this out. At any rate however, as long as you're not loading a bunch of those textures into memory you would probably be okay but it's a game specific thing. With todays video cards having 1GB + of VRAM, it's trivial to load a few of those textures into memory if that's what you need. It also depends on your target audience and what kind of hardware you expect them to run this on.

So in short: Run with it if you think you need; optimize it later if you need.

share|improve this answer
1  
Also check glGetIntegerv (GL_MAX_TEXTURE_SIZE, ...) to ensure your GL implementation is able to load it (you should have no problem here unless you've got really ancient hardware going back to almost 10 years old, but it's good practice despite that). –  Darth Satan Feb 25 '13 at 23:34
    
Thank you very much for! –  Spamdark Feb 25 '13 at 23:58
    
Using this question... a lot of vertex inside a buffer (spheres ... etc) is normal? –  Spamdark Feb 26 '13 at 1:28
    
It depends on the level of detail in your game world in relativity to what you're trying to accomplish. If you run into performance issues - run a profiler against your code and find the bottlenecks. :) –  Vaughan Hilts Feb 26 '13 at 1:43

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.