1
Graphics / Fullscreen problem
« on: December 26, 2023, 11:19:32 am »
Hello! My game runs on laptop in fullscreen like this (when the screen resolution is less than 1920*1080):
Creating window code:
OŃ‚ PC with GeForce GTX 770 everything is fine - the game is stretched to full screen when the screen resolution is less than 1920*1080.
Please answer - what is the problem? drivers?
Creating window code:
Quote
//BASE_WIDTH - 1920Graphics card on my laptops is NVIDIA RTX 2050.
//BASE_HEIGHT - 1080
bool res = texture->create(BASE_WIDTH, BASE_HEIGHT);
myCout() << "CREATE MAIN TEXTURE - " << res;
if (!res) {
myError() << "ERROR CREATE TEXTURE";
exit(1);
}
textureForShader->create(BASE_WIDTH, BASE_HEIGHT);
sf::ContextSettings settings;
settings.depthBits = 24;
settings.stencilBits = 8;
if (this->fullScreen)
window->create(sf::VideoMode(screenWidth, screenHeight), windowTitle,
sf::Style::Fullscreen, settings);
else
window->create(sf::VideoMode(screenWidth, screenHeight), windowTitle,
sf::Style::Close, settings);
sf::View view( sf::FloatRect(0, 0, (float)screenWidth, (float)screenHeight) );
view.setCenter(BASE_WIDTH/2, BASE_HEIGHT/2);
window->setView(view);
window->setFramerateLimit(60);
window->setVerticalSyncEnabled(true);
OŃ‚ PC with GeForce GTX 770 everything is fine - the game is stretched to full screen when the screen resolution is less than 1920*1080.
Please answer - what is the problem? drivers?