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

Pages: [1]
1
Window / Can't get OpenGL to work (SFML2, Windows, mingw)
« on: May 21, 2012, 11:19:29 pm »
After many failed attempts to learn a bit of OpenGL I wanted to try again, this time with the help of SFML. I can't even get simple examples to compile though. This is my test code:

#include <SFML/Window.hpp>

int main() {
        sf::Window app(sf::VideoMode(800, 600), "Test", sf::Style::Default, sf::ContextSettings(0, 0, 0, 4, 0));
        GLuint buffer;
        glGenBuffer(1, &buffer);
       
        return 0;
}

The compiler complains about glGenBuffer not being declared. Using functions such as "glGetString(GL_VERSION)" works however (and returns the expected result). What am I doing wrong? Did something change from SFML 1.6 so I need to include more headers or is the mistake somewhere in my configuration?

2
General / Steel - Ludum dare entry made using rbSFML
« on: April 22, 2012, 10:15:15 pm »
I just finished a first "release candidate" for my ludum dare game and thought I'd share it here: https://github.com/downloads/thatfreakingguy/Steel/Steel%20-%20Windows%20binary.7z

Story, if you can call that:
After crashing on a strange, small planet made out of steel the only thing in sight is a lever. As you pull it, the planet seems to change...

It's a platformer. Not much more I can say :)

edit: Forgot to post the source: https://github.com/downloads/thatfreakingguy/Steel/Steel%20src.zip. Whatever you do, don't look at it!

3
Graphics / Documentation error on shaders.
« on: March 31, 2012, 05:49:31 pm »
The documentation (of SFML2) claims that you can use window.draw(sprite, shader); to draw something using a shader, when in reality this function does not exist anymore (or I'm just too blind to find it).

4
Audio / Sound.Play() always restarts sound in SFML2?
« on: September 26, 2010, 06:47:32 pm »
When I'm calling Play() on a already playing or paused sound in SFML2 the sound restarts, instead of continuing like documented.

Some minimal code:
Code: [Select]

#include <SFML/Audio.hpp>

int main(int argc, char** argv) {

    sf::SoundBuffer buffer;
    buffer.LoadFromFile("sound.wav");
    sf::Sound sound(buffer);

    while(true) {
        sound.Play();
        sf::Sleep(0.01);
    }

    return 0;
}

5
Graphics / Recreating RenderImage crashes everything?
« on: September 02, 2010, 08:59:41 pm »
I'm playing around with SFML2 currently and when I'm creating a RenderImage a second time while the RenderWindow is displayed, the programm crashes with the message
Code: [Select]
X Error of failed request:  GLXBadPbuffer
  Major opcode of failed request:  128 (GLX)
  Minor opcode of failed request:  28 (X_GLXDestroyPbuffer)
  Serial number of failed request:  45
  Current serial number in output stream:  46
Segmentation fault

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

int main() {

    sf::RenderWindow app;
    app.Create(sf::VideoMode(800, 600), "Playground");

    sf::RenderImage target;
    target.Create(800, 600);

    while (app.IsOpened()) {

        target.Create(app.GetWidth(), app.GetHeight()); // Second time this point is reached stuff crashes
        app.Display(); // Works when I leave out this though

    }

    return 0;

}


Bug or my mistake?

(SFML2, Ubuntu 10.4 with a GeForce 9500 GT)

6
Audio / Buffer reading?
« on: September 01, 2010, 04:30:42 pm »
I'm trying to analyze a sound in SFML2. I'm accessing the SoundBuffer data like this:
Code: [Select]
#include <SFML/Audio.hpp>
#include <iostream>

int main() {

    sf::SoundBuffer buffer;
    buffer.LoadFromFile("no quiet.ogg");
    sf::Sound sound;
    sound.SetBuffer(buffer);

    sound.Play();

    while (sound.GetStatus() == sf::Sound::Playing) {

        std::cout << buffer.GetSamples()[int(sound.GetPlayingOffset()*buffer.GetSampleRate())] << std::endl;
        sf::Sleep(0.01);

    }

}

Is this a good way to access the buffer? And how does SFML handle stereo sounds?

7
System / How to use the UTF classes?
« on: August 26, 2010, 04:05:08 pm »
I want to use the TextEntered event, but I don't get how the conversion to letters is supposed to work. Of course, if I wanted to use ASCII I could use char(Event.Text.Unicode), but I want to use extended characters (especially ä, ö, ü and that stuff). I did see the UTF classes, but I have no clue how to use them. What do I have to do to convert Event.Text.Unicode in a character?

8
Graphics / [Solved] Problem with Graphics after updating to 1.6
« on: April 07, 2010, 10:57:21 pm »
After I installed SFML 1.6 every Time something is supposed to be drawn i just get an Segmentation fault. Everything except drawing operations works fine (and it's not because of my code, the examples also have create Segmentation faults).
 I'm running Ubuntu 9.10 32 Bit Version. I don't know what other informations are needed, feel free to ask :P

Pages: [1]
anything