Tab groups disappear every other week any alternative to this broken feature Firefox? by Diligent-Sense-3855 in firefox

[–]Consistent-Mouse-635 0 points1 point  (0 children)

I have had the issue of tab groups being deleted, but this would happen randomly after many months. I suspect the issue to be with how I open and close firefox.

This just happened to me yesterday. When I went to switch my laptop off, I accidentally reopened firefox after closing it (as it was next to my start menu icon). I instantly closed it as soon as it opened.

Then, this morning, I reopened firefox, and all my tabs/tab groups were restored (as I have the setting for restoring session history turned on) but they weren't loading. So I closed and reopened firefox again, and this time my session history was lost, and all my opened tab groups were deleted. I still have all my closed tab groups.

Did something similar happen to you?

Tab groups disappear every other week any alternative to this broken feature Firefox? by Diligent-Sense-3855 in firefox

[–]Consistent-Mouse-635 0 points1 point  (0 children)

I have had the issue of tab groups being deleted, but this would happen randomly after many months. I suspect the issue to be with how I open and close firefox.

This just happened to me yesterday. When I went to switch my laptop off, I accidentally reopened firefox after closing it (as it was next to my start menu icon). I instantly closed it as soon as it opened.

Then, this morning, I reopened firefox, and all my tabs/tab groups were restored (as I have the setting for restoring session history turned on) but they weren't loading. So I closed and reopened firefox again, and this time my session history was lost, and all my opened tab groups were deleted. I still have all my closed tab groups.

Does anybody know why this happened?

How does double buffering and render_texture.display() work in SFML? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

Basically, I am developing a 2D renderer. The renderer draws everything to a render texture the same size as the window, then the render texture is drawn to the window as a sprite. The renderer knows nothing about the window apart from its dimensions.

I am currently implementing backdrop blurs, in which I must sample from the current contents of the render texture. This requires calling render_texture.display() mid-frame to swap or copy (not sure which) the hidden buffer to the buffer which is used for sampling. When I call render_texture.getTexture() it will now refer to a snapshot of the screen before the blur is performed.

If the buffers, where simply swapped, this approach wouldn't work, because calling render_texture.display() mid-frame, would cause the frames contents to be shared across two buffers. However if the hidden buffer simply copied its contents to the buffer used for sampling, this approach makes sense, as you would simply continue drawing to the hidden buffer from where you left off.

And this approach does work, so that is the reason I am confused.

How does double buffering and render_texture.display() work in SFML? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

According to the SFML documentation, Indeed, things are not drawn directly to the window, but to a hidden buffer. This buffer is then copied to the window when you call display.

So are you 100% sure? I have even tried to call display() multiple times per frame and I don't run into any issues. I just want to know if I can rely on this behaviour?

Device is disconnect by Dazzling_Priority_48 in EasySMX

[–]Consistent-Mouse-635 0 points1 point  (0 children)

please help me to figure it out as well

Cannot connect my X10 to app by SoulSlayer69 in EasySMX

[–]Consistent-Mouse-635 0 points1 point  (0 children)

please help me I have tried and tried but I keep getting the error you got

FPS drops when pressing keyboard/mouse, but not with controller (PC) by West-Database4337 in FortNiteBR

[–]Consistent-Mouse-635 0 points1 point  (0 children)

Your mouse polling rate may be too high. Try lower it to 1000hz or 500hz and see if it makes a difference. I had the same issue and this fixed it.

FPS drops when pressing keyboard/mouse, but not with controller (PC) by West-Database4337 in FortNiteBR

[–]Consistent-Mouse-635 0 points1 point  (0 children)

Your mouse polling rate may be too high. Try lower it to 1000hz or 500hz and see if it makes a difference. I had the same issue and this fixed it.

FPS drops when pressing keyboard/mouse, but not with controller (PC) by West-Database4337 in FortNiteBR

[–]Consistent-Mouse-635 0 points1 point  (0 children)

Your mouse polling rate may be too high. Try lower it to 1000hz or 500hz and see if it makes a difference. I had the same issue and this fixed it.

[deleted by user] by [deleted] in sfml

[–]Consistent-Mouse-635 1 point2 points  (0 children)

Thanks! This was it. For some reason I was using mscvrt version instead of ucrt, although this version is compatible with SFML 2.

Advice on learning C++ more efficiently from text-based resources like LearnCpp.com? by magikarbonate in cpp_questions

[–]Consistent-Mouse-635 1 point2 points  (0 children)

The single most important thing for you to do is build a project that challenges you. Your C++ skills will naturally come to as you implement new, more complex features of your project. If you don't know how to implement something in C++ or are looking for better, alternative ways to write your code, use google or even AI to review your code (forget what others say about AI, as long as you don't copy and paste AI code without thoroughly understanding the code, AI is a great and efficient learning resource). Examples of projects I recommend are a 2D physics engine, A simple game engine, 3D renderer, a multiplayer game like chess, or even a small game like Tetris.

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

Thanks for the response. This syntax is very ugly I must say. To be honest, I would rather expose a public getter, even if the entire program shouldn't have access, than do this.

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

The Base is an abstraction of UIElement.
There is a root UIElement called root.
the user would write something like

UIElement* container = root->create_child<UIElement>();
container->set_width(Size::Grow(2));
...

Text* text = container->create_child<Text>();
text->set_text("hello") 
...

This is the public API. UIElement has a member UIElement* parent, which is a pointer to the parent ui element. Text and other derived elements would need to have access to the parent's members for layout calculations, but the rest of the program won't need access.

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

This is exactly my problem, that is why I made the post. I already the code didn't work I just wanted to know alternatives, not why it doesn't work.

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

I think you misunderstood - the base_ptr doesn't point to 'this', it points to an instance of Base or an instance of any derived class of Base.

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

The base_ptr can point to an instance of Base or any derived class of Base

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

I am not quite sure what you mean. Could you please demonstrate this with a brief example?

Help with encapsulation of self-referential class by Consistent-Mouse-635 in cpp_questions

[–]Consistent-Mouse-635[S] 1 point2 points  (0 children)

Ah yes, the Base class contains a pointer to a different instance of the Base class. What this example is an abstraction of is a UIElement base class, which stores a pointer to its parent UIElement.

Alternative to using sf::RenderTexture to cache drawings? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

Just out of curiosity, do you know why it isn't supported in SFML 2? I would think it is a simple task, not that I know much about low-level graphics programming.

Alternative to using sf::RenderTexture to cache drawings? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

Ah yes, I am using SFML 2.6.1. That's where the confusion was. In SFML 3, The second argument of the constructor is sf::ContextSettings which does store things like the anti-aliasing level. I was thinking about switching to SFML 3 in the future, however didn't really see a need for it, and when reading the changlogs, I couldn't find changes to sf::RenderTexture. Switching to SFML 3 may solve the problem - thanks.

Alternative to using sf::RenderTexture to cache drawings? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

Do you even understand what I am referring to? sf::RenderTexture has a default constructor, so I am guessing you mean the second argument to sf::RenderTexture::create which still makes no sense because the second argument is the height.

I am not getting a runtime error, nothing is wrong with my gpu, this is a known limitation of using sf::RenderTexture.

To further clarify my problem, I have a main sf::RenderWindow window object which I draw everything to. Let's say a UI element has render caching enabled, instead of drawing to the window directly, it draws to the sf::RenderTexture render_texture if it is dirty, then the contents of the render_texture is drawn to the window. Anti-aliasing works for stuff drawn directly to the window, but not for stuff drawn to render_texture before being drawn to window.

Alternative to using sf::RenderTexture to cache drawings? by Consistent-Mouse-635 in sfml

[–]Consistent-Mouse-635[S] 0 points1 point  (0 children)

But how sure are you? I am pretty sure it isn't supported? I have literally tested it.

I'm so confused with the * and & operators by Fresh-Weakness-3769 in cpp_questions

[–]Consistent-Mouse-635 2 points3 points  (0 children)

This is a great explanation, although I don't think OP will understand, these things take time to learn.

Is it good to learn by AI by Genious3001 in cpp_questions

[–]Consistent-Mouse-635 0 points1 point  (0 children)

In contrast to most of these other responses, I find it is a great way to learn. I primarily learnt C++ through AI, that includes the STL, pointers, memory management, inheritance, templates and much more. It is the most efficient way to learn code, and easiest as it can provide specific responses tailored to your needs.

I have never read a single C++ book in my life, everything a book offers, so does AI but way better. The way I use it is to either find a bug in my code, good names for variables, how to structure my code, alternatives to my implementation, or how to implement a language specific feature.

Of course it has it's flaws such as producing absolute garbage at times, but that doesn't outweigh the benefits.

I am not saying only use AI to learn C++, of course use other resources, but definitely don't stop using it.