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

Pages: [1]
1
C / Thanks Laurent!
« on: September 08, 2011, 10:52:47 pm »
You are kind of awesome.

2
C / CSFML2 on ubuntu compile errors.
« on: September 08, 2011, 07:47:07 pm »
I am trying to use sfml.net, and I need to compile csfml to accomplish this.  Sfml compiled fine, but when I compile csfml, I get the following errors:

Code: [Select]
[ 51%] Building CXX object src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/RenderWindow.cpp.o
/home/maskedpixl/Development/cpp/lib/sfml/branches/csfml2/src/SFML/Graphics/RenderWindow.cpp: In function ‘sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderWindow*)’:
/home/maskedpixl/Development/cpp/lib/sfml/branches/csfml2/src/SFML/Graphics/RenderWindow.cpp:345:5: warning: converting to non-pointer type ‘sfWindowHandle’ from NULL
/home/maskedpixl/Development/cpp/lib/sfml/branches/csfml2/src/SFML/Graphics/RenderWindow.cpp: In function ‘sfImage* sfRenderWindow_Capture(const sfRenderWindow*)’:
/home/maskedpixl/Development/cpp/lib/sfml/branches/csfml2/src/SFML/Graphics/RenderWindow.cpp:480:5: error: return-statement with no value, in function returning ‘sfImage*’
make[2]: *** [src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/RenderWindow.cpp.o] Error 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/all] Error 2
make: *** [all] Error 2


I am not sure what to do...

3
DotNet / [Solved]Failed to share OpenGL context.
« on: September 07, 2011, 12:04:18 am »
1. Should I be compiling my application(VS2010) as a console app?

2. When I close my app it hangs on the RenderWindow.Close() function then prints "Failed to share OpenGL context" to the console(It is really to fast to read so I think this is what it is saying).  Let me try to post the relevant code...

in the Engine class.
Code: [Select]
       public virtual void init()
        {
            // global game objects.
            MP._engine = this;
            MP.renderTarget = new RenderWindow(new VideoMode(MP.width, MP.height, MP.bpp), MP.windowName);
            MP.renderTarget.Closed += new EventHandler(onClosed);
            MP._world = new World();
        }

        private void onClosed(object sender, EventArgs e)
        {
            MP._exit = true;
        }

        public int gameLoop()
        {
            while (!MP._exit)
            {
                MP.renderTarget.DispatchEvents();
                MP.renderTarget.Clear();
                // Switch worlds if needed.
                if (MP._goto != null)
                {
                    MP._world.end();
                    MP._world = MP._goto;
                    MP._goto = null;
                    MP._world.start();
                }
                MP._world.preUpdate();
                MP._world.Update();
                MP._world.postUpdate();

                MP._world.render();
            }

            MP.renderTarget.Close();
            return 0;
        }


I am screwing something up with releasing the OpenGL context but I can't figure it out...

EDIT: I have no idea what I did to fix this.  I just noticed that it stopped when I added MP.renderTarget.Display() after MP._world.render().

Pages: [1]
anything