PDA

View Full Version : maximum supported texture size



appdeveloper
10-12-2009, 03:55 AM
How can i determine the maximum supported texture size?
I'm trying to use

intmax=gl.glGetIntegerv(gl.GL_MAX_TEXTURE_SIZE,

but i can't figure out how to use the last parameter. Anyone knows how?


My thanks in advanced

ZbuffeR
10-12-2009, 04:58 AM
in C :
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&intmax);

looks like you are using java, so you have to adapt slightly :

int intmax[] = new int[1];
gl.glGetIntegerv(gl.GL_MAX_TEXTURE_SIZE,intmax);

appdeveloper
10-12-2009, 05:11 AM
No, i'm using visual basic 2005 with simpleOpenGLControl. That's my problem, isn't that a pointer to an int?

ZbuffeR
10-12-2009, 08:10 AM
then try to declare intmax as an array :
Dim intmax(0 to 0) As Integer

Stephen A
10-12-2009, 08:41 AM
IIRC, the last parameter is defined as an 'out' parameter (ByRef in VB.Net), so you can use a plain integer:

Dim max As Integer
gl.glGetIntegerv(gl.GL_MAX_TEXTURE_SIZE, max)

At least this is the case in OpenTK - it's been some time since I've last looked into Tao code. If this doesn't work, you'll have to use an array as ZBuffeR suggested (it doesn't matter in this case but arrays are less efficient than out parameters).