Skip to main content
gamedev.net
🔒 Locked

glGetIntegerv

Started by ChristophR 2 replies 1.6k views
Original Post
ChristophR
ChristophR
Hi! I want to find out the maximum texture width which is supported by OpenGL on my system. It tried the following:

GLint texSize = 123;
glGetIntegerv(GL_ALPHA_TEST, &texSize);
std::cout << "Max texture width = " << texSize << std::endl;
The output is "Max texture width = 123", which means that glGetIntegerv has no effect. If I try to retrieve other flags the behaviour ist the same. Can anybody help me? Thanks in advance. rgds
Alex Baker
Alex Baker
ChristophR,

do you have a valid OpenGL context actiaved/initialized ?
Alex Baker Computer science is dealing with computers as much as astronomy is dealing with telescopes.
ChristophR
ChristophR
I think I have. But I have edited a few functions. Maybe I have damaged the initialization code.

Thanks for the hint
Brother Bob
Brother Bob
GL_ALPHA_TEST to ask for maximum texture size? Yeah, that makes sense...

It's not a valid enumerant anyway, so even if you do have a rendering context, the command is ignored and the value should be untouched. For the maximum texture size, pass GL_MAX_TEXTURE_SIZE.

Topic Locked

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

Sign in to reply to this topic.