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

Pages: [1] 2
1
General discussions / Any workaround for Lion OpenGL 3.2 Support?
« on: September 06, 2012, 05:45:20 am »
I read the thread about Laurent eventually removing deprecated functions from the 2.x code.

This is the thread started about a year ago on github: https://github.com/SFML/SFML/issues/84

I was curious.

1. Are we any closer to being able to support OpenGL 3.2 on Mac OSX?
2. If not, is there any workaround? What if I just use SFML for Window creation. Does that still utilize deprecated functions?

Does anyone have OpenGL 3.2 running with SFML on a Mac?

Thanks and I apologize if I have misunderstood anything. I always try to do my research before posting.

Cheers!

2
General / Re: Drawing 3D Geometry (Vertex Arrays/VBOs)
« on: July 19, 2012, 11:05:10 pm »
cooldog99, what if you wanted to use a shader in rendering that VBO? I don't see where the shader comes in to play? Are you using a fixed function pipeline?

3
General / Re: Drawing 3D Geometry (Vertex Arrays/VBOs)
« on: July 19, 2012, 11:09:02 am »
There's an OpenGL example that comes with the SDK, it should show you how you can use OpenGL with SFML. Afaik you can't use the sf::Shader class with your own 3D rendering, at least it's not really inteded.
SFML is a library for 2D graphics and other media stuff.

Thank you. That's what I was wondering. I figure I will implement my own shader loader and just do it the normal way. Thank you. But I can still use SFML on the rendered image once it's done, correct maybe to handle antialiasing or other stuff.

Thank you!

4
General / Re: Two Mac Bugs - RC 2.0 and OSX 10.7.4
« on: July 19, 2012, 05:45:21 am »
2/ Does the «sound» example also suffer from this ? Could you upload an ogg file that reproduce the issue ?

The sound from the template does not have the same problem and since then, I haven't really noticed the error to be too pronounced but still there. Let me find a way to reproduce it. I should also add that at the beginning of using Xcode (right after I boot the system) there is a delay from when the sound should play to when it does. I am on a Macbook Air. I will help make this reproducible and then let you know.

5
General / Drawing 3D Geometry (Vertex Arrays/VBOs)
« on: July 19, 2012, 05:39:09 am »
Hi.

I am trying to figure out where SFML takes care of things and where it lets OpenGL do its own thing when it comes to 3D rendering. I guess I am curious as to the capabilities of using shaders I have written that render 3D geometry in SFML.

Does anyone have a code example of rendering geometry from arrays? Even a simple example will do the trick (like a single triangle). I guess my confusion stems from the fact I have only used shaders on sprites and images in SFML but not geometry.

Thank you. Sorry if my question is confusing. If anyone has some simple code in which shaders are used to render 3D geometry from arrays, that would help me greatly.

PixelMuffin

6
General / Two Mac Bugs - RC 2.0 and OSX 10.7.4
« on: July 16, 2012, 04:03:16 am »
Hi. I'd like to report two bugs I have noticed.

1. Oddly, my game/menu when in fullscreen on OSX, the entire screen if shifted upwards by about a third making the top of the screen non viewable.

2. The first time I play a sound, there is often a crack/half sound/no sound at all. When it is used again, it plays fine. The sound is in .ogg format.

Please let me know if I can be more specific or if these are known bugs.

Thank!

7
Window / setFramerateLimit causes major stuttering
« on: July 16, 2012, 02:46:35 am »
I know there are other threads about this but I haven't found it resolved at all.

Ideally, I would like the game not to use 100% of its allotted CPU budget so that's why I would like to limit the FPS to 60. Doing so however cause a ton of stuttering where the object will stall and hang. It's very minor but obvious. How do big companies get away with completely smooth rendering? Have any of you found a way to make it incredibly smooth.

Here is a VERY simple example that stutters on the latest Mac OSX 10.7.4.

Let me know how it runs for you and what system you are on.

Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window( sf::VideoMode( 800, 600 ), "Test" );
    window.setVerticalSyncEnabled( true );
    window.setFramerateLimit(60);
   
    sf::Vector2f player1(380, 280);
    sf::RectangleShape paddle1(sf::Vector2f(40, 40));
   
    sf::Clock clock;
    sf::Time time;
   
    float dt = 0;
    const int speed = 100;
   
    // Start the game loop
    while (window.isOpen())
    {       
       
        // Poll for events
        sf::Event event;
        while (window.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                window.close();
           
            // Escape pressed : exit
            if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape)
                window.close();
        }
       
       
        // Check for user input
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
            player1.y += speed * dt;
       
       
        // Check for user input
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
            player1.y -= speed * dt;
       
       
        // Restart the clock and get the delta time
        time = clock.restart();
        dt = time.asSeconds();
       
       
        // Update the object positions
        paddle1.setPosition(player1.x, player1.y);
       
        // Clear screen
        window.clear();
       
        // Draw the sprites
        window.draw(paddle1);
       
        // Update the window
        window.display();
    }
   
    return EXIT_SUCCESS;
}

If we can get this fixed, that would be great. Let's pool information if we can.

Edit: Seems that this is fixed on Windows 7 by making it full screen. Going to full screen on OSX makes the screen shift up by 1/4-1/3. Not sure why. I still see the stuttering though.

8
You're probably using a sf::RenderWindow, but passing it as a sf::Window in your function.

That's exactly what I was doing. Thank you :D

9
Hi. I have a main function which creates all of the main objects in the game and the loop and then a render function. When I try to use functions I can use in my main loop window.draw(), window.clear() in my rendering function, they don't show up. Am I being an idiot here and have they been disabled/removed for a reason?

10
General / Re: SFML 2.0 - Issue distributing builds to any other Macs
« on: July 13, 2012, 10:47:23 am »
libsfml-audio.2.0.dylib is a symbolic link to libsfml-audio.2.dylib which is a symbolic link to libsfml-audio.dylib. Thus the best would be to copy all of them while preserving the links.

In your report it's written :
Dyld Error Message:
    Library not loaded: @executable_path/../Frameworks/libsfml-system.2.dylib
    Referenced from: ...

Thus actually it's looking for the file with ".2".
The "Link Binary With Libraries" build phase just tells Xcode which libraries are to be linked against your app. It won't copy anything.

To copy files, you must have a "Copy Files" build phase. Create one if it doesn't exist (but I doubt it). Select "Frameworks" as Destination and add the dylibs to the list of files that are to be copied.

Fantastic. New to Xcode so your help has been invaluable. I will ship my .app out in the morning for testing and get a response tomorrow. In the meantime, thank you very much!

11
General / Re: SFML 2.0 - Issue distributing builds to any other Macs
« on: July 13, 2012, 10:17:24 am »
Ceylo, I would like to link against the dylibs and when I go into build phases and go to link binary with libraries, I see them but i see three version of them. The audio one looks like:

libsfml-audio.dylib
libsfml-audio.2.dylib
libsfml-audio.2.0.dylib

Which of those do I want?

Thanks :D

12
General / Re: SFML 2.0 - Issue distributing builds to any other Macs
« on: July 13, 2012, 09:52:15 am »
add build phase to copy dylib's into your application

Thank you for the reply! I am new to Xcode and am unfamiliar how to do this. I found the build phases. I assume what you're referring to is link binary with libraries. Or is it Target Dependencies? Which ones do I include?

Under the Mac OS X 10.7 dropdown, I see a number of .dylibs as well as the SFML.framework. I assume I just include the .dylibs. I have 3 kinds of each, for example:

libsfml-audio.dylib
libsfml-audio.2.dylib
libsfml-audio.2.0.dylib

Which of those naming formats do I want?

Thanks! :D

13
General / SFML 2.0 - Issue distributing builds to any other Macs
« on: July 13, 2012, 09:08:29 am »
Hi. I have seen a few other threads about this around but not for the latest version of Xcode (4.3.3) and the latest version of Mac OSX 10.7.4. I am using the RC 2.0 build on the SFML website. I can get it to build fine but when it comes time to send it to anyone else, I get something like this:



Now, the other threads I have found, like http://en.sfml-dev.org/forums/index.php?topic=7196.0, deal with different versions of Xcode and MacOSX. The person I am sending the build to is using the exact same version of OSX I am using.

So, taking apart the error, I can see the he doesn't have the library. I have tried creating projects with the frameworks option check and unchecked with no luck.

My other idea was to build SFML whereas I had simply installed it and used a template. But I am not sure what kind of difference that will make seeing as how it works great on this version of my OS.

For some reason, the library isn't being linked. Maybe I am being an idiot and forgot to check an option but I have looked in the .app bundle of my application and see all of the Frameworks included. I am at a loss here.

I tried to do my research before posting and genuinely was unable to find an answer so I hope this hasn't been answered exactly before.

Thank you for your time and again, you guys do fantastic work.

Cheers!

14
Graphics / Re: SFML equivalent of SDL Blitting?
« on: July 10, 2012, 11:48:47 pm »
Thank you Laurent. You do fantastic work! :D

15
Graphics / SFML equivalent of SDL Blitting?
« on: July 10, 2012, 08:35:09 pm »
Hi. I am working on my first SFML project and I am trying to figure out how to create a sprite using an x, y, width and height source from a texture.

For my example, I am working on a menu system with text and I would rather not save 20 different individual text images. Is such an operation possible in SFML?

Thanks!

Pages: [1] 2
anything