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 - darkonaito_

Pages: [1]
1
Graphics / Drawing a non-homogeneous terrain
« on: March 21, 2023, 10:09:59 pm »
How would you go about drawing a terrain made up of different materials, hence different texture? Have a sprite for each tile or have a single sprite and changing both it's position and it's texture multiple times?

2
I'm trying to port a simple example taken by this tutorial () from Glut to SFML. I tried following the tutorial for using OpenGL in the forum, but when I run the example the Window crashed and the terminal outputs this:
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.1 ; depth bits = 32 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Created: version = 4.6 ; depth bits = 24 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
The code is:
#include <GL/glew.h>

#include <iostream>

#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp>

using namespace sf;

GLuint buffer_handle;

void renderCallback()
{
    static GLclampf color {};

    if(color > 1.0f)
    {
        color = 0.0f;
    } else
    {
        color += 1.0f/256.0f;
    }

    glClearColor(color, 1.0f - color, 1.0f - color, 1.0f);

    glClear(GL_COLOR_BUFFER_BIT);
}

int main()
{
    // create the window
    sf::Window window(sf::VideoMode(800, 600), "OpenGL", sf::Style::Default, sf::ContextSettings(32));
    window.setVerticalSyncEnabled(true);

    window.setActive(true);

    bool running = true;

    while (running)
    {
        // handle events
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                // end the program
                running = false;
            }
        }

        std::cout << "OK";
        std::cin.get();

        renderCallback();

        window.display();
    }

    return 0;
}

3
General / Re: Can't compile SFML on Windows 11
« on: October 30, 2022, 12:24:51 am »
I was using the term "fix" because, as far as I read, MSVCR is a bit stuck in the past. How hard is it to build the dependencies? Do you think it's worth?

4
General / Re: Can't compile SFML on Windows 11
« on: August 07, 2022, 03:21:44 am »
Is the problem with UCRT ever going to be fixed? I'm having it on windows 10

5
I'm on Windows, using the 64bit MinGW latest version found on winlibs, and I exactly followed the tutorial for building the library with CMAKE you find on the official website, using SFML 2.6, and after running "mingw32-make" to build I got a bunch of green "Building CXX object..." and finally two "undefined reference to `_setjmp'":

Quote
h:/winlibs_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/jayok/Downloads/SFML-2.6.x/SFML-2.6.x/extlibs/libs-mingw/x64/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5614): undefined reference to `_setjmp'
h:/winlibs_64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/jayok/Downloads/SFML-2.6.x/SFML-2.6.x/extlibs/libs-mingw/x64/libfreetype.a(smooth.c.obj):smooth.c:(.text+0x77a): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [src\SFML\Graphics\CMakeFiles\sfml-graphics.dir\build.make:602: lib/sfml-graphics-2.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:307: src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
mingw32-make: *** [makefile:155: all] Error 2

Pages: [1]
anything