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

Pages: [1]
1
System / Can't hide fullscreen window
« on: July 02, 2013, 07:27:11 pm »
Hi,

I'm trying to hide a fullscreen window I've created with SFML 1.6 (stable, Linux), but the window won't disappear. When I create a simple window (not fullscreen) it works fine.

here's what I'm doing:
//the_window is and sfml window, doesn't work like this
the_window.Create( sf::VideoMode( w, h, 32 ), "test", sf::Style::Fullscreen );

//this works
/*w = 800;
h = 600;
the_window.Create( sf::VideoMode( w, h, 32 ), "test", sf::Style::Titlebar | sf::Style::Close );*/


if( !the_window.IsOpened() )
{
  std::cerr << "Couldn't initialize SFML." << std::endl;
  the_window.Close();
  exit( 1 );
}

sf::Event ev;
   
show(); //show the window
   
glClearColor( 1, 0, 0, 1 ); //fill with red
glClear( GL_COLOR_BUFFER_BIT );
the_window.Display(); //display it
               
while( the_window.GetEvent(ev) ); //make sure events are processed
sf::Sleep(3); //the window should stay up for 3 seconds
   
hide(); //then disappear
               
while( the_window.GetEvent(ev) ); //process events again
sf::Sleep(3);
   
show(); //show again, etc.
glClearColor( 1, 0, 0, 1 );
glClear( GL_COLOR_BUFFER_BIT );
the_window.Display();
               
while( the_window.GetEvent(ev) );
sf::Sleep(3);

hide();
               
while( the_window.GetEvent(ev) );
sf::Sleep(3);
 

So basically for the full screen it shows up once, and it stays like that until I close the window (the_window.Close();)

Is this a bug in SFML? Or just how fullscreen windows work (in linux)?

Best regards,
Yours3lf

2
Audio / program crashes on exit
« on: November 02, 2012, 11:26:57 am »
Hi,

I wrote a small app that plays a music file. Now my problem is that when the app exits it crashes somewhere in ole32.dll...
This is confusing because csfml plays the audio fine...
But I think it is related to csfml somehow, as the app executes fine without playing the music.

here's the vs solution:
https://docs.google.com/open?id=0B33Sh832pOdOSjJxTUFyTl9kOFk

best regards,
Yours3lf

3
Hi,

I've made a small modification to the latest SFML snapshot that allows me to create a core profile context. It also allows me to create a debug context, or a forward compatible context.
Note that if you use this, then you need to explicitly ignore the OpenGL errors generated by GLEW. (due to depracated functionality usage)

So here's the code:
Code: [Select]
GlxContext.cpp around line 240

        if (glXCreateContextAttribsARB)
        {
            int nbConfigs = 0;
            GLXFBConfig* configs = glXChooseFBConfig(m_display, DefaultScreen(m_display), NULL, &nbConfigs);
            if (configs && nbConfigs)
            {

                /*
                 * CORE OR COMPATIBILITY PROFILE
                 */
                int profile = GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
                int flags = 0;
                if(settings.core_profile)
                  profile = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
                if(settings.debug_context)
                  flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
                if(settings.forward_context)
                  flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
                //end

                // Create the context
                int attributes[] =
                {
                    GLX_CONTEXT_MAJOR_VERSION_ARB, m_settings.majorVersion,
                    GLX_CONTEXT_MINOR_VERSION_ARB, m_settings.minorVersion,
                    GLX_CONTEXT_PROFILE_MASK_ARB, profile,
                    GLX_CONTEXT_FLAGS_ARB, flags
                };
                m_context = glXCreateContextAttribsARB(m_display, configs[0], toShare, true, attributes);
            }

            if (configs)
                XFree(configs);
        }

Code: [Select]
ContextSettings.hpp around line 35

struct ContextSettings
{
    ////////////////////////////////////////////////////////////
    /// \brief Default constructor
    ///
    /// \param depth        Depth buffer bits
    /// \param stencil      Stencil buffer bits
    /// \param antialiasing Antialiasing level
    /// \param major        Major number of the context version
    /// \param minor        Minor number of the context version
    ///
    ////////////////////////////////////////////////////////////
    explicit ContextSettings(unsigned int depth = 0, unsigned int stencil = 0, unsigned int antialiasing = 0, unsigned int major = 2, unsigned int minor = 0, bool profile = false, bool debug = false, bool forward = false) :
    depthBits        (depth),
    stencilBits      (stencil),
    antialiasingLevel(antialiasing),
    majorVersion     (major),
    minorVersion     (minor),
    core_profile     (profile),
    debug_context    (debug),
    forward_context  (forward)
    {
    }

    ////////////////////////////////////////////////////////////
    // Member data
    ////////////////////////////////////////////////////////////
    unsigned int depthBits;         ///< Bits of the depth buffer
    unsigned int stencilBits;       ///< Bits of the stencil buffer
    unsigned int antialiasingLevel; ///< Level of antialiasing
    unsigned int majorVersion;      ///< Major number of the context version to create
    unsigned int minorVersion;      ///< Minor number of the context version to create
    bool core_profile;
    bool debug_context;
    bool forward_context;
};

With this now you can create a compatibility profile context:
(24 depth bits, 8 stencil bits, OpenGL 4.2 compatibility profile context)
Code: [Select]
sf::Window the_window;
the_window.create( sf::VideoMode( SCREEN_WIDTH,
                                       SCREEN_HEIGHT,
                                       BPP ),
                                       TITLE, MODE,
                                       sf::ContextSettings( 24, 8, 0, 4, 2, false, false, false ) ); //relevant bit, notice the "false" parameters

Querying the video card gives the following result:
Code: [Select]
  std::cout << "Vendor: " << glGetString( GL_VENDOR ) << "\n";
  std::cout << "Renderer: " << glGetString( GL_RENDERER ) << "\n";
  std::cout << "OpenGL version: " << glGetString( GL_VERSION ) << "\n";
  std::cout << "GLSL version: " << glGetString( GL_SHADING_LANGUAGE_VERSION ) << "\n";

result:
Quote
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5670
OpenGL version: 4.2.11631 Compatibility Profile Context
GLSL version: 4.20

or if you want to create a core profile context:
(24 depth bits, 8 stencil bits, OpenGL 4.2 core profile context, with debug and forward compatible options)
Code: [Select]
sf::Window the_window;
the_window.create( sf::VideoMode( SCREEN_WIDTH,
                                       SCREEN_HEIGHT,
                                       BPP ),
                                       TITLE, MODE,
                                       sf::ContextSettings( 24, 8, 0, 4, 2, true, true, true ) ); //relevant bit, notice the "true" parameters

This gives the following result:
Quote
Vendor: ATI Technologies Inc.
Renderer: ATI Radeon HD 5670
OpenGL version: 4.2.11631 Core Profile Forward-Compatible/Debug Context
GLSL version: 4.20

This modification only works on Linux for now, but you may implement it on Windows and OSX in a similar manner. The reason I didn't implement them, is that I don't have these OSs right now. I hope this will make its way into the core SFML.

Best regards,
Yours3!f

4
Window / cannot see window
« on: December 22, 2011, 07:57:23 pm »
Hi,

I've just ported my app from Linux to Windows, everything went fine, except when I start the app I can't see the window it creates.
I suppose it does create the window successfully because when I switch to it it can recieve keystrokes, and I can also load in OGL stuff using the created context.

So I checked with winlister (http://www.nirsoft.net/utils/winlister.html) if the window is alive and stuff, and I found out that the position of it is [32767, 32767] (I guess it is pow(2, sizeof(unsigned short)*8) / 2 - 1). When I centered the window, it worked displaying everything, but I don't know how to make sure that it displays the window at [0, 0].

Best regards,
Yours3!f

5
Audio / can't play music files
« on: December 17, 2011, 05:23:37 pm »
hi,

I'm trying to load & play ogg and flac files. I wrote a class that uses sf::Music to load & play the files.

Although it seems to load them & even play them, I can't hear anything... Yes I have the volume turned up, and the device turned on :)

I have two different audio devices: my video card's hdmi output, and the internal sound card, which I use. I can play sounds with sf::Sound & sf::SoundBuffer, but not music. I'm on kUbuntu 11.10 64 bit, and using the latest SFML snapshot.

here's the code:
Code: [Select]

#ifndef sound_stream_h
#define sound_stream_h

#include "common.h"

class sound_stream
{
private:
    sf::Music samples;
    bool loaded;
protected:

public:

    void load(std::string filename);
    void play();
    void pause();
    void stop();
    int get_duration();
    void set_loop(bool loop);
    void set_pitch(float pitch);
    void set_volume(float volume);

    sound_stream() : loaded(false) {}
};

#endif


Code: [Select]

#include "sound_stream.h"
#include "objs.h"

void sound_stream::load(std::string filename)
{
    std::cout << "-Loading: " << filename << "\n";
    timer sound_timer;
    sound_timer.set_timerbegin();
    std::string full_path = objs::get()->conf.app_path + filename;
    if (objs::get()->file_exists(full_path))
    {
        if (samples.OpenFromFile(full_path))
        {
            loaded = true;
            std::cout << "  Loaded in: " << sound_timer.get_time_passed() / 1000.0f << " seconds\n";

        }
        else
        {
            loaded = false;
            std::cerr << "Error loading sound stream file: " << filename << "\n";
        }
    }
    else
    {
        loaded = false;
        std::cerr << "Error loading sound stream file: " << filename << "\n";
    }
}

void sound_stream::play()
{
    if (!loaded)
    {
        return;
    }

    samples.Play();
}

void sound_stream::pause()
{
    if (!loaded)
    {
        return;
    }

    samples.Pause();
}

void sound_stream::stop()
{
    if (!loaded)
    {
        return;
    }

    samples.Stop();
}

int sound_stream::get_duration()
{
    if (!loaded)
    {
        return -1;
    }

    return samples.GetDuration();
}

void sound_stream::set_loop(bool loop)
{
    if (!loaded)
    {
        return;
    }

    samples.SetLoop(loop);
}


void sound_stream::set_pitch(float pitch)
{
    if (!loaded)
    {
        return;
    }

    samples.SetPitch(pitch);
}

void sound_stream::set_volume(float volume)
{
    if (!loaded)
    {
        return;
    }

    if (volume >= 0.0f && volume <= 100.0f)
    {
        samples.SetVolume(volume);
    }
}


and I use it like this:
Code: [Select]

sound_stream test;

    test.load("resources/test.flac");

    test.play();


any idea what might be going wrong?

Best regards,
Yours3!f

6
Hi,

I've just upgraded my sfml build to the latest snapshot, and I experienced a strange thing: when I tried to compile my project it throw me the following error:
Quote

/usr/bin/ld: CMakeFiles/proba2.dir/src/main.cpp.o: undefined reference to symbol 'sf::Clock::Clock()'
/usr/bin/ld: note: 'sf::Clock::Clock()' is defined in DSO /usr/local/lib/libsfml-system.so.2 so try adding it to the linker command line
/usr/local/lib/libsfml-system.so.2: could not read symbols: Invalid operation


Which is strange because linking to sfml-window used to work until now, so I tried to link sfml-system (as suggested), but the compiler went crazy and all my linkings, GLEW, freetype, freeimage etc. throw undefined reference...
Quote

set(${project_name}_external_libs Xrandr pthread sfml-window sfml-system GLEW freetype freeimage)


Is there something I forgot (or should've done)?

I installed the snapshot with:
Quote

cmake CM*
make
sudo make install


EDIT:
here's are the building errors with sfml-system:
Quote
libload_obj.so: undefined reference to `__glewBindBuffer'
libframe_buffer.so: undefined reference to `__glewCheckFramebufferStatus'
libshader_manager.so: undefined reference to `__glewGetShaderiv'
libloop.so: undefined reference to `__GLEW_VERSION_3_3'
libimage_loader.so: undefined reference to `FreeImage_GetWidth'
libfont.so: undefined reference to `FT_Set_Char_Size'
libimage_loader.so: undefined reference to `FreeImage_GetHeight'
librender_buffer.so: undefined reference to `__glewIsRenderbuffer'
librender_buffer.so: undefined reference to `__glewFramebufferRenderbuffer'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::export_m3x3_from_m4x4(mymath::m4x4)'
libimage_loader.so: undefined reference to `FreeImage_Load'
librender_buffer.so: undefined reference to `__glewBindRenderbuffer'
libload_obj.so: undefined reference to `__glewVertexAttribPointer'
libshader.so: undefined reference to `__glewUniformMatrix3fv'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::get_plane_eq(mymath::vec3f, mymath::vec3f, mymath::vec3f)'
libframe_buffer.so: undefined reference to `__glewIsFramebuffer'
libshader.so: undefined reference to `__glewUniformMatrix4fv'
libshader.so: undefined reference to `__glewUniform4fv'
libload_obj.so: undefined reference to `__glewEnableVertexAttribArray'
libshader_manager.so: undefined reference to `__glewGetUniformLocation'
libimage_loader.so: undefined reference to `FreeImage_GetBits'
libshader_manager.so: undefined reference to `__glewLinkProgram'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_rotation_m4x4(float, mymath::vec3f)'
libimage_loader.so: undefined reference to `FreeImage_ConvertTo32Bits'
librender_buffer.so: undefined reference to `__glewRenderbufferStorage'
libtexture.so: undefined reference to `__glewFramebufferTexture2D'
libload_obj.so: undefined reference to `__glewGenVertexArrays'
libloop.so: undefined reference to `glewInit'
libshader_manager.so: undefined reference to `__glewGetProgramInfoLog'
libloop.so: undefined reference to `event::get_resize()'
libshader_manager.so: undefined reference to `__glewCompileShader'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::cross_prod(mymath::vec3f, mymath::vec3f)'
libmesh.so: undefined reference to `__glewDrawRangeElements'
libloop.so: undefined reference to `glewGetErrorString'
libfont.so: undefined reference to `FT_Init_FreeType'
libloop.so: undefined reference to `FreeImage_GetVersion'
libshader_manager.so: undefined reference to `__glewCreateShader'
libshader_manager.so: undefined reference to `__glewCreateProgram'
librender_buffer.so: undefined reference to `__glewGenRenderbuffers'
libloop.so: undefined reference to `glewGetString'
libshader.so: undefined reference to `__glewUniform1i'
libshader_manager.so: undefined reference to `__glewShaderSource'
libmip_map_creator.so: undefined reference to `__glewTexImage3D'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_translation_m4x4(mymath::vec3f)'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_rotation_m3x3(float, mymath::vec3f)'
libload_obj.so: undefined reference to `__glewGetAttribLocation'
libloop.so: undefined reference to `FreeImage_Initialise'
libshader_manager.so: undefined reference to `__glewGetShaderInfoLog'
libload_obj.so: undefined reference to `__glewBindVertexArray'
libfont.so: undefined reference to `FT_New_Face'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::create_ortographic_m4x4(float, float, float, float, float, float)'
libload_obj.so: undefined reference to `__glewGenBuffers'
libshader_manager.so: undefined reference to `__glewGetProgramiv'
libfont.so: undefined reference to `FT_Load_Char'
/home/yours3lf/Documents/proba2/mymath/lib/libmatrix_stack.so: undefined reference to `mymath::mymath_main::create_scale_m4x4(mymath::vec3f)'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::rotate_vec3f(mymath::vec3f, mymath::m3x3)'
libimage_loader.so: undefined reference to `FreeImage_GetFileType'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::normalize_vec3f(mymath::vec3f)'
libshader_manager.so: undefined reference to `__glewBindAttribLocation'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::transform_vec4f(mymath::vec4f, mymath::m4x4)'
libload_obj.so: undefined reference to `__glewBufferData'
libshader.so: undefined reference to `__glewUseProgram'
libframe_buffer.so: undefined reference to `__glewDrawBuffers'
libshader_manager.so: undefined reference to `__glewAttachShader'
libloop.so: undefined reference to `event::handle_event()'
libframe_buffer.so: undefined reference to `__glewGenFramebuffers'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::mymath_main::deg_to_rad(float)'
libshader_manager.so: undefined reference to `__glewValidateProgram'
libframe_buffer.so: undefined reference to `__glewBindFramebuffer'
/home/yours3lf/Documents/proba2/mymath/lib/libcamera.so: undefined reference to `mymath::operator*(mymath::m3x3 const&, mymath::vec3f const&)'


EDIT2:
I've uploaded a small program to demonstrate this. However in this the compiler doesn't go crazy when I add sfml-system, but it can only find GLEW if I install it from the software center, if I install GLEW manually it can't find it... (and it only complains about it in runtime...)
here's the link: http://www.2shared.com/file/BzOPYhu8/sfml-testtar.html

EDIT3:
Here's another program, but now the compiler does go crazy... This used to work before...
link: http://www.2shared.com/file/zR0pVQTR/proba3tar.html

Best regards,
Yours3lf

7
General / get current context & current display
« on: October 10, 2011, 07:44:50 pm »
Hi,

I'm currently experimenting with OpenCL OpenGL interoperation, so to set up my context I'd need the current context and the current display id.

with glx it looks like this:
Code: [Select]
cl_context_properties properties[] =
{
  CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(), //the GL context id
  CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(), //the display id
  CL_CONTEXT_PLATFORM, (cl_context_properties)the_cl_platform, //this is set up by me
  0
};

cl_int error;
//the_cl_device is set up by me
the_cl_context = clCreateContext(properties, 1, &the_cl_device, 0, 0, &error);
assert(error == CL_SUCCESS);


so how can I get the same GL context id and window id in SFML?
NOTE: I'm on Linux.

here's the pdf that explains CL-GL interop:
http://sa10.idav.ucdavis.edu/docs/sa10-dg-opencl-gl-interop.pdf

Best regards,
Yours3!f

8
General / mouse warping in sfml
« on: July 16, 2011, 11:46:20 pm »
Hi,

I want to warp the mouse, so that the user can move the camera in FPS style.
in SDL there is a function SDL_WarpMoues() which does this. Is there such thing in SFML? Or how is it done in SFML?

Best regards,
Yours3!f

9
Window / set fullscreen mode for an already created window
« on: July 16, 2011, 10:25:59 pm »
Hi,

I'd like to set the fullscreen mode for an already created window without recreating it.

like so:

sf::Window the_window;

the_window.Create(sf::VideoMode(800, 600, 32), "", sf::Style::Default, sf::ContextSettings(0, 0, 0, 4, 1));

the_window.SetFullscreen(true);
or something like that.
and
the_window.SetFullscreen(false);
for making it windowed again.
How can I do that?

(I looked in the docs but I found nothing about it only recreating the window, on the forum I couldn't find any answer)

EDIT:
To add, how can I change the video mode in runtime without recreating the window?

Best regards,
Yours3!f

10
Feature requests / core profile
« on: May 18, 2011, 07:53:40 pm »
Hi everyone,

I'd like to request a new feature for SFML: specifying core profile only context creation.
Lately I've ported my 'engine' to OGL 3.3 and it really annoyed me that with deprecated functions my application still compiles, and doesn't complain.
It gave me a few annoying problems concerning this, especially when I tried to pass things to shaders, and when I tried to render with deprecated VBO functions.
So I think it'd make everyone's life easier if one could specify that he only wants non-deprecated functions in his OGL context.
This context doesn't necessarily has to be a full OGL 4.1 context with every extension, because if we wanted extensions GLEW would solve the problem.

This feature can be found in Freeglut as well in which you have to use it something like this:
Code: [Select]
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitContextVersion(4, 1);
glutInitContextFlags(GLUT_FORWARD_COMPATIBLE);
glutInitContextProfile(GLUT_CORE_PROFILE);
...
}


So it is extremely easy to use, and it makes your life a LOT easier.

Best regards,
Yours3lf

11
General discussions / uft-8 characters
« on: May 02, 2011, 05:50:18 pm »
Hi all,

I've been trying to develop a text-editor in sfml based on the built-in text renderer, and I ran into this issue: I can't display uft-8 characters like őúűá etc. here's my code:

Code: [Select]
#include "keyboard.h"

void keyboard::process_keypress(sf::Key::Code keycode) //if a key is pressed then let's handle it
{
    keys[keycode] = true;

    if (keys[sf::Key::Back] == true)
    {
        //backslash pressed
        if (the_string.length() > 0)
        {
            if (!save_state)
            {
                if (the_pos > 0)
                {
                    the_string = the_string.replace(the_pos - 1, 1, "");
                    the_pos--;
                }
            }
            else
            {
                if (the_pos > save_pos)
                {
                    the_string = the_string.replace(the_pos - 1, 1, "");
                    the_pos--;
                }
            }
        }
    }

    if (keys[sf::Key::Delete] == true)
    {
        //delete pressed
        if (the_pos < the_string.length())
        {
            the_string = the_string.replace(the_pos, 1, "");
        }
    }

    if (keys[sf::Key::Return] == true)
    {
        //enter pressed
        the_string.insert(the_pos, 1, '\n');
        the_pos += 1;

        if (save_state)
        {
            std::string tmp_str = the_string.substr(the_string.substr(0, the_string.length() - 1).rfind("\n") + 1);
            tmp_str = tmp_str.substr(0, tmp_str.length() - 1);
            std::fstream f;
            f.open(tmp_str.c_str(), std::fstream::out);
            if (f.is_open())
            {
                f << write_out;
                f.close();
                the_string = write_out + "\nText successfully saved!\n";
                the_pos = the_string.length();
            }
            else
            {
                the_string = write_out + "\nCouldn't save the text!\n";
                the_pos = the_string.length();
            }
            save_state = false;

        }
    }

    if (keys[sf::Key::Escape] == true)
    {
        //escape pressed
        the_context.Close();
    }

    if (keys[sf::Key::Left] == true)
    {
        if (!save_state)
        {
            if (the_pos > 0)
            {
                the_pos--;
            }
        }
        else
        {
            if (the_pos > save_pos)
            {
                the_pos--;
            }
        }
    }

    if (keys[sf::Key::Right] == true)
    {
        if (the_pos < the_string.length())
        {
            the_pos++;
        }
    }

    if (keys[sf::Key::RControl] == true || keys[sf::Key::LControl] == true)
    {
        if (keys[sf::Key::S] == true)
        {
            write_out = the_string;
            the_string += "\nPlease enter the filename to save the text to: \n";
            the_pos = the_string.length();
            save_pos = the_pos;
            save_state = true;
            is_not_text = true;
        }
    }
}

void keyboard::process_keyrelease(sf::Key::Code keycode)
{
    keys[keycode] = false;
}

void keyboard::process_text_input(const unsigned int& char_code)
{
    for (int c = 0; c < not_text.size(); c++)
    {
        if (keys[not_text[c]] == true)
        {
            is_not_text = true;
        }
    }

    if (!is_not_text) //if it is text
    {
        the_string.insert(the_pos, 1, (wchar_t)char_code); //I think the problem lies here: I convert the incoming unsigned integer to a wchar_t which is supposed to be utf-8 right?
        the_pos++;
    }

    is_not_text = false;
}


I basically pass the character code to the process_text_input(...), in which I convert it to a wchar_t and insert it at the current position into the string I display.

So how can I render the unicode characters, what did I do wrong?

Best regards,
Yours3!f

12
General discussions / undefined reference to XRR*
« on: April 30, 2011, 10:41:11 pm »
Hi all,

I recently moved from Ubuntu 10.10 to 11.04, and I had to reinstall everything including SFML, and when I tried to compile my project this error came up:

/usr/local/lib/libsfml-window.so.2.0: undefined reference to `XRRConfigCurrentConfiguration'

and a few others like this...

what I did was
-download the 2.0 snapshot
-cmake it
-it needed openal, sndfile and some other libs, so I installed them from synaptics
-then I compiled sfml and installed it
-then tried to compile my project

the project used to work before this...

any ideas?

Best regards,
Yours3!f

13
General discussions / SDL vs. SFML
« on: April 11, 2011, 08:33:17 am »
Hi everybody,

I've heard lots of great things about SFML, and I also experimented with it.

my question is, when using it for nothing more than input and window handling, and creating an OpenGL context (and using OpenGL for rendering) is it faster than SDL?

(I'm not curious about the two libraries' own 2D drawing performance.)

my other question would be, does it provide OpenGL context profiling like FreeGLUT does?

(I mean, can I specify that I only want the core context to be present?)

Best regards,
Yours3lf

Pages: [1]