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

Pages: [1]
1
Window / Re: Window not showing anymore
« on: October 25, 2020, 11:17:05 am »
The issue was in fact related to my misuse of "new". I was saving the pointer into a class that granted global access, similarly to a singleton:

------
Renderer.h
#pragma once
#include "SFML\Graphics\RenderWindow.hpp"

extern sf::RenderWindow* g_window;
-------
-------
Renderer.cpp
#include "Renderer.h"

sf::RenderWindow* g_window;
-------

However, I was forgetting to delete the instance when closing the program. I imagine that after a number of times there was too much leaked memory. Simply had to restart my PC.

2
Window / Window not showing anymore
« on: October 25, 2020, 02:09:51 am »
My window won't appear anymore. It used to work, I could already see and move around sprites, but for no apparent reason now my program won't get past the very first line:


int main()
{
    g_window = new sf::RenderWindow(sf::VideoMode(1080, 720), "MyGame");
    // ...never reaches here


If I put code before that line with a breakpoint, it works. But as soon as it reaches that line, it's like an infinite loop... And the window never appears.

Pages: [1]
anything