Skip to main content
gamedev.net
🔒 Locked

texture1D maximum size

Started by svnstrk Sep 16, 2010 at 6:55 PM 1 replies 7.1k views
Original Post
svnstrk
svnstrk
hi,

i have problem trying to attach my 1D texture. im not sure whats the problem is but it seems like i put a texture more than my vga can handle. i did a test by printing the max size:

int max;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);
std::cout<
the result is

texture size: 8192

what does it means? is it my maximum index is 8192 or only 8192 texel? im using GeForce 9800 GT 512 MB.

If for example i have a 1D texture with millions of integer, how can i pass it to GLSL so it wont have this maximum size problem?


thanks in advance



karwosts
karwosts
GL_MAX_TEXTURE_SIZE is the maximum size of a dimension of a 1D or 2D texture (GL_MAX_3D_TEXTURE_SIZE for 3D). So you could have a 8192x8192 2d image or an 8192 pixel 1d image. This is confirmed in the man page for glTexImage1D:

GL_INVALID_VALUE is generated if width is less than 0 or greater than 2 + GL_MAX_TEXTURE_SIZE.
[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
svnstrk
svnstrk
is this also occured with array of textures eg if i use GL_TEXTURE_1D_ARRAY as target instead of GL_TEXTURE_1D, with the same amount of data? does the 8192 pixel constraints still holds?

thanks in advance

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.