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

Pages: [1]
Window / testing opengl/sfml application
« on: August 30, 2023, 10:26:47 am »
Hi folks,

I created a template project to develop OpenGL applications. I do window management with SFML/Window.

Let's say I created a "Shader" class, and there is function like "loadFromFile" similar to that of SFML and if this function loads shaders correctly it also calls function to compile shaders.

What approach should I take when I want to test the functions of this shader class?

We know that in order for any OpenGL commands to work, a context must be current. SFML's window class does this for us.

Do I need to create context like below for tests with opengl calls? Or how should I set up a structure for more isolated test codes?

    sf::ContextSettings settings;
    settings.depthBits = 24;
    settings.stencilBits = 8;
    settings.majorVersion = 3;
    settings.minorVersion = 3;

    sf::Window window(sf::VideoMode(800, 600), "OpenGL Context", sf::Style::None, settings);

    Shader shader;

    CHECK(shader.loadFromFile("vertex.glsl", "fragment.glsl") == true);

General / problem of tmx loader
« on: October 17, 2016, 01:25:43 am »
hi everybody, firstly, i'm sorry for my english. until the now i've tried this libraries for tmx loader. https://github.com/fallahn/sfml-tmxloader and https://github.com/edoren/STP. i've not built the first-link(sfml-tmxloader and i've tried a lot), then i've tried to build STP, and it's okay, i've compiled but when i try to test code, i get "has stopped working" error.

can someone tell me how to compile the sfml-tmxloader step by step(to compile sfml-tmxloader it's need to zlib and box2d, and there is an error in cmake, zlib not found but i registered ZLIB_ROOT etc.

edit:in stp library if i delete this line map.GetLayer("World").visible = false; program works normal, why?
edit:above problem explained on https://github.com/edoren/STP/issues/11

i use visual studio 2015 and windows 7. thanks

Pages: [1]