Menu

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.

Show posts Menu

Messages - billarhos

#106
Help requests / Re: canvas widget on windows 7
17 March 2018, 12:21:09
Ok, thanks, i will try it.
Question: It does matter what tgui version i ll use? I am using the 0.7.5 one in my projects.
#107
Help requests / Re: canvas widget on windows 7
17 March 2018, 10:33:45
Come back to share a solution to my problem. Definately has to do with old drives of intel. But as long as i did not managed to find proper good drivers for this old "gigabyte"
motherboard, i was still looking and digging forums and source codes. The problem is the old opengl version and has to do with the context of rendertexture. The solution was to deactivate context of sfml's window and activate it just before displaying the context. Did some tests and now i do not have any issues.

here is the solution for tgui canvas

//-----------------------------------------------------------------------
sf::RectangleShape line(sf::Vector2f(1, 800));
line.setFillColor(sf::Color::Black);
line.setPosition(sf::Vector2f(0, 1));

pWindow->setActive(false); //pWindow is the main sf::RenderWindow

pCanvas = tgui::Canvas::create({ 5, 300 });
pCanvas->setPosition(200, 70);
pCanvas->clear(sf::Color(194, 206, 200));
pCanvas->draw(line);

pWindow->setActive(true);

pCanvas->display();


here is the solution of creating sf::RenderTexture without crashing


                pWindow->setActive(false);

sf::RenderTexture *pTex = new sf::RenderTexture();
pTex->create(128, 128);
        SAFE_DELETE(pTex);

pWindow->setActive(true);


hope it helps

#108
Help requests / Re: canvas widget on windows 7
16 March 2018, 21:35:17
Confirm that is the rendertexture. Can not be deleted once it created. Has nothing to do with tgui.

thank u Texus for your time. Cheers
#109
Help requests / Re: canvas widget on windows 7
16 March 2018, 19:56:17
Moving things to main function did not help. Also loading formmore in update function (create a boolean  to set it true in connect function and then create formmore in update function) did not work.
#110
Help requests / Re: canvas widget on windows 7
16 March 2018, 19:15:42
Well, debugging the test project, the problem is when the shared pointer is destroyed in memory file (_Decref() function). This happen only for canvas widgets and only in windows 7. Also the opegl version is 2.1. Well, i am not sure if it is tgui or sfml or vga drivers (opengl) problem.
#111
Help requests / Re: canvas widget on windows 7
15 March 2018, 22:38:42
Ok, made an simple app (find some time) that behaves just like my other app. This app crush only in windows 7. I will debug this code as soon as i find time.

http://www.mediafire.com/file/u6u5zo8njlrbmdg/Tgui.rar

http://www.mediafire.com/file/e7wxjzj5dildwzs/Test.rar

the same test app in the same windows 7 64 bit machine but with differrent vga drivers produce a message box about "createsurface : 3" just when i create second form (u have to have a look at the code)

The crash occurs when u exit from form 2 back to form 1. i am using visual studio 2015 for ide.

Tomorrow i will have some more news. If u want something just ask.
#112
Help requests / Re: canvas widget on windows 7
15 March 2018, 08:47:42
I do so texus and make a minimal project that reproduces the problem. As i said the problem occurs only on windows 7. Not in windows 10. GAME_MANAGER is a global static object. cForm is a private pointer in an onother class header (cForm* pForm;). So i create a new cform object.

pForm = new cForm();

and the problem occurs when SAFE_DELETE(pForm);

#ifndef SAFE_DELETE
#define SAFE_DELETE(p)         { if(p)      { delete (p);      (p)=NULL; }      }
#endif

#113
Help requests / canvas widget on windows 7
15 March 2018, 07:57:24
Hi.

Well this time it is a crush. I installed my app to windows 7, 64 and after some tests i realized that canvas widget causing the problem. I removed it and the app stop crushing.
I am using a lot of different widgets but only this causing the problem. I have install a lot of versions of vga drivers and the problem remains. Maybe there is some version that stops the problem. Of cource, the crushing happening only on win 7 64 and not on windows 10, 64.
The code snippet shows when the crush occurs. (on destroy)



//cpp
//-----------------------------------------------------------------------------
cForm::cForm() :
{
sf::RectangleShape line(sf::Vector2f(1, 800));
line.setFillColor(sf::Color::Black);
line.setPosition(sf::Vector2f(0, 1));

pCanvas = tgui::Canvas::create({ 10, 800 });
pCanvas->setPosition(330, 70);
pCanvas->clear(sf::Color(194, 206, 200));
pCanvas->draw(line);
pCanvas->display();

GAME_MANAGER->getGui()->add(pCanvas);
}

cForm::~cForm()
{
GAME_MANAGER->getGui()->removeAllWidgets();
       //-->the crash problem
}
//h
//-----------------------------------------------------------------------------
class cForm
{
public:
cForm::cForm();
~cForm();
private:
tgui::Canvas::Ptr pCanvas;
}


Any clue mates?



#114
Feature requests / Re: Upside down slider issue
19 January 2018, 09:00:18
It is good enough for me Texus and i understand perfectly your worries and thoughts.
In first place i added my issue to "feature requests forum category", and i have no expectations to improve 0.7 as you been already to 0.8.

Certainly i start using 0.8 one day. That's for sure.
In attachment there are some photos from my latest project. Configuration forms has been made with TGUI.
#115
Feature requests / Re: Upside down slider issue
18 January 2018, 20:40:42
Hi Texus, glad to hear that 'step' and 'floats' are implemented in 0.8. I ll stick to old cause i think is mature and stable. I 'll try it when it finished.
I do not know if you understand me. I can put negative values to slider but i can not make it, to have the positive value on upper side and the negative
value on the down side (i am using vertical align). In my case i set (min = -20) and (max = 20).
#116
Feature requests / Upside down slider issue
18 January 2018, 16:18:54
Hi Texus.

I am trying to make a sound equalizer with vertical sliders to adjust low, mid , high frequencies.
However there is no way to set positive number to up and negatives to down side of sliders.

pSliderEqMid->setMinimum(-20);
pSliderEqMid->setMaximum(20);

Photo shows better what i try to achive.

Also, it would be great, to have a step value for slider (i know is a mess).




#117
Feature requests / Re: spin have some issues.
11 January 2018, 08:18:27
Ok Texus. Now it is clear to me. Cheers
#118
Feature requests / Re: spin have some issues.
10 January 2018, 22:38:24
Yes the background color is working but not for the space between buttons. The background color should fill the space (SpaceBetweenArrows) with the defined color. In my case is grey.
If, still you can not replicate the problem, let me know. I'll make a test case and post.

In photo i am using
pButton->getRenderer()->setBackgroundColor(sf::Color(193, 204, 199));
without textures

#119
Feature requests / Re: spin have some issues.
10 January 2018, 20:36:38
Forget to mention that i 'm still using 0.7 version.
Tried your suggestion but still not working. Maybe is because i have long distance between arrow keys.
The image show my spin button (upper draw). The down spin button is the one setting null the textures.
#120
Feature requests / spin have some issues.
10 January 2018, 16:37:03
Hello Texus

I tried "spinbutton" but setBackgroundColor,  setBackgroundColorNormal,  setBackgroundColorHover not working nor from txt file, neither from code.

Also, what is the difference between setBackgroundColor and setBackgroundColorNormal?

Suggestions: It would be great if a step value exist. Also, a text shown with the current value in between buttons as optional would be great!

thank you.