Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - soaup

Pages: [1]
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:
Quote
//BASE_WIDTH - 1920
//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);
Graphics card on my laptops is NVIDIA RTX 2050.
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?

2
Graphics / Re: problems with copying renderTextures
« on: January 09, 2016, 03:16:19 pm »
Yes, i did it with pointers and it works. I forgot pointers.

3
Graphics / problems with copying renderTextures
« on: January 09, 2016, 01:28:19 pm »
Hello and sorry for bad english! I had tried implement multiple shaders as described herein, but use RenderTexture. And it is not copied.

how i tried:
Quote
foreach (sf::Shader *shader, globalShaders) {
        front.clear();
        sf::Sprite sprite(back.getTexture());
        front.draw(sprite, shader);
        front.display();

        sf::RenderTexture temp = front;
        front = back;
        back = temp;
    }
And this error
Quote
C:\SFML\include\SFML\System\NonCopyable.hpp:67: error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is private
     NonCopyable(const NonCopyable&);
     ^
the problem disappears if you comment out the line
Quote
//sf::RenderTexture temp = front;
        //front = back;
        //back = temp;
Please answer - what is the problem?

4
Graphics / Re: Global blur
« on: January 08, 2016, 01:08:00 pm »
Yes! It works!! Thank you!!

5
Graphics / Global blur
« on: January 08, 2016, 12:26:11 pm »
Hello and sorry for bad english! I had tried implement blur on all game screen, to visualize game pause. For this i call RenderWindow::capture() by pressing key, and draw captured image. But capture() it takes too much time. And call window->draw(spritem &shader) for all objects it leads to the fact that all the sprites with blur look different. Please answer - how to make global blur?

Pages: [1]
anything