Hello! I wrote a program to print out the maximum size of a texture I can create, so I can get a rough idea of what a good lower limit is when programming. (so far, I've yet to see a value below 8192).
It prints a reasonable number at first. But if I run the function a second time, it'll return a different, and insanely large, number. This occurred on my laptop as well. I'm using the latest version, fresh from the git repo.
For me, the first time, it gave me 16384. Every time after that though, it was "11457127" which isn't even a power of 2 (or even for that matter)
Here's the code I used, it's relatively small. The check occurs on the first line of "queryOpenGL()." I left in the other tests in case they may have had something to do with it. This should compile I think.
#include <cstdio>
#include <SFML/Graphics.hpp>
void queryOpenGL(){
printf("\nMaximum texture size is %u\n", sf::Texture::getMaximumSize());
bool modeTest = sf::VideoMode(640, 480).isValid();
printf("A fullscreen mode of 640 by 480 is %s\n", modeTest ? "VALID" : "NOT VALID what???");
sf::RenderWindow window(sf::VideoMode(50, 50), "Test Window", 7U, sf::ContextSettings(24, 8, 0));
printf("Framebuffer depth/stencil format: %u:%u\n", window.getSettings().depthBits, window.getSettings().stencilBits);
printf("Shaders are... %s\n", sf::Shader::isAvailable() ? "VALID" : "NOT VALID aawwww");
sf::RenderTexture texture;
bool success = texture.create(1024, 1024, true);
printf("Attempting to create a Framebuffer Object ... %s\n", success ? "SUCCESSFUL!" : "FAILURE OH NO");
printf("Concluding test\n");
printf( " (\\_/)\n"
"(@' <'@) Thanks bebe~\n\n");
}
int main(int argc, char * argv[]){
char * initialMessage =
"What tool to use? (enter the digit)\n"
" 0: Quit\n"
" 1: Query SFML to see some things\n"
">>";
int choice;
do{
printf(initialMessage);
scanf("%i", &choice);
switch(choice){
case 1:
queryOpenGL();
break;
}
printf("\n-----\n");
}while(choice);
return 0;
}