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

Pages: [1]
1
General / Re: Why is Render Window appearing blank?
« on: October 08, 2015, 02:01:22 am »
Ok i'm going to rephrase this question.

Most of the time the window opens and display everything correctly. Every once in a while it will appear as a blank window even though there are no changes in the code. Has anyone ever seen or heard of this, or has an idea of what could cause this so. I fixed the problem by delaying the window display until I click on a GUI button I made, which is how I wanted it to prompt anyway.

The code associated with this window is spread across 5 header files. I'm pretty sure you don't want to sift through 10 pages code. I assure you the pollevents->clear->draw->display routine is there, that is not the problem.

2
General / Re: Why is Render Window appearing blank?
« on: October 06, 2015, 01:52:49 am »
The code for this window is a thousand lines or so... But this is how it is laid out:

int main()
{

       win=sf::RenderWindow("name",----);

       /*  Do many more things  */       

     
       while(1)
       {
                 void Pole_Events_for_Window_Function(sf::RenderWindow& win, &(many more varables));

                 /*  Pole_Events for other windows   */

        }

}


void Pole_Events_for_Window_Function(sf::RenderWindow& win, &(many more varables))
{
        /* Do a millions things */
   
        win.clear();

        win.draw( for many objects);

        win.display()

}

3
General / Why is Render Window appearing blank?
« on: October 05, 2015, 04:03:32 am »
Hi I'm pretty new to sfml and new to this forum so this might be a stupid question...

     I'm gradually adding functionality and objects to Render Window.

     Then, every so often the window will appear as blank when I run the code.

     Begins to happen more and more frequent as keep adding objects to the window.

I fixed the issue by having the window open on a button press event vs opening as soon main() starts running.

What I think is happening is that the code that is setting up the all the object positions and behavior is taking to long and the window gets stuck at event poles that include code dependent on objects and variables that are still in process of being declared.

^^Is that what is happening? Should I include some sort of delay mechanism before displaying a Render Window as a good practice?


I have screen shots attach to show what I am talking about.





Pages: [1]
anything