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.


Topics - synok

Pages: [1]
1
Graphics / [SOLVED] Using SFML with ImGui and the NewFrame issue
« on: September 16, 2019, 02:00:21 am »
Hello!

I have been working a while on something with ImGui in SFML. Everything seems fine so far until one day I am randomly stumbling upon issues with it. Appearantly it is related to ImGui::NewFrame not beeing called properly. I can't remember that I ever had to call it at all. Anyways, I followed the code from the examples here:

https://github.com/eliasdaler/imgui-sfml

As I said, it worked fine before. But now, out of the blue, it asks me if I have called ImGui::NewFrame; which is odd. Since I do not handle the setup of the window everyday, or everytime I work on it, I cannot remember where it would be, also since I optimized a lot of the code.

I have previously added commits that have been working fine and tested onto Github, but now when I pull one of the commits from there to try out, I face the exact same error. Everything compiles fine, but I stumble on the assert errors when I run it. Debugging simply leads me to a comment that says "Did you forgot to add ImGui::NewFrame;?"

No I didnt forget it, I just never really had to.

Anyone having any idea, it would be great. I will try different things here to come up with a solution.

2
Graphics / Click on a sprite
« on: April 16, 2013, 05:59:21 pm »
Hello everyone,

I am using SFML 2.0 to try to click on a sprite. Tried using IntRect, Vector2, etc with no avail. All I need is
a simple way to click on an image. I tried googling like crazy with no results either.

The idea is if the mouse has been pressed, it needs to check if you are within a rectangle. If so, the button is clicked. Else, nothing will happen.

Thanks,

3
General / Running everything in Main.
« on: December 20, 2012, 11:19:16 am »
Well, how safe do you think it is? Is there any noticable changes if you have alot of code inside the Main function or the While loop inside of it, or is it better (not only structure-wise) to divide all functions in to headers and calling them seperately?

Anyone noticed any slow-downs or other bieffects of putting alot of game code inside one main file with one main function and one while loop that runs?

4
Graphics / SFML and Sprites
« on: December 19, 2012, 05:15:18 pm »
Hello all,

I have been searching my head off for an anwser to handling Sprites / Spritesheet.

I have tried doing this with both seperate sprites and spritesheets and I am using SFML 2.0. I have a spritesheet of a character I made and want to animate him. The problem is that the Time function and / or the Clock function does not work. Time / Clock will NOT start ticking after it is created, thus I cannot animate my character.

After all, it makes no sense to me to have one Time and one Clock function. Why not just have one timer function instead of confusing people with more than one function to handle time.

What I have tried so far is adding a spritesheet, seperating them with .setTextureRect and applying new dimensions to the sprite. That worked, as long as the Clock is equal to 0.0. Otherwise it wont work. I tried cutting out each and every frame from the spritesheet loading them individually, still this wont work since Time ALWAYS is equal to 0. Pointless function. Any help suggested for the simplest task of creating an animated sprite with either Spritesheet or seperate Sprites?

If anyone can write a solution, I take everything back that I said. I dare you.

Pages: [1]