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

Pages: [1] 2 3 ... 13
1
DotNet / Re: Definitive guide to SFML.NET on OSX
« on: October 09, 2014, 09:07:59 pm »
I tried this today and after a bit of tinkering managed to get the libraries all loading ok, however I got an exception on start up
Quote
sf::err() << "Cannot import this Window Handle because it is neither "
                  << "a <NSWindow*> nor <NSView*> object "
                  << "(or any of their subclasses). You gave a <"
                  << [[nsHandle className] UTF8String]
                  << "> object."
                  << std::endl;

From line 175 here https://github.com/SFML/SFML/blob/master/src/SFML/Window/OSX/WindowImplCocoa.mm
This was using SFML 2.0

If anyone has it setup could they just upload a barebones working project? Would the libraries preserve their settings or would that not work?

2
System / Checking if thread is still running
« on: October 25, 2013, 12:07:14 pm »
Is there anyway to check if a thread is still alive in SFML?

3
General discussions / Re: Debian/Ubuntu packages for SFML
« on: October 06, 2013, 02:42:03 pm »
Are there any updates on this? And has SFML 2.1 been merged into the stable repo?

4
General / Using SFML with libraries that are part of SFML
« on: August 10, 2013, 02:46:50 pm »
I know a while back there could be some problems when using a library (for example GLEW) that is included in SFML along side with SFML if both of these were linked to statically, I just wanted to know what the current state of it is?
Also would it be possible to know what sub-systems of SFML depend on what libraries?
I know the Audio one uses OpenAL and SNDFile, but what about the other subsystems?
My hope is to use SFML only for the window-ing, threading and networking (maybe audio if I ever add it) but I hopefully wont be using the graphics subsystem as I already have some clases that do this for me, however I will be using freetype, and glew as I am on OpenGL and I wanted to know what the rules are regarding this?

5
DotNet / Re: SFML 2 and mono
« on: February 01, 2013, 12:55:30 pm »
Hmm no the symlinks are there
Code: [Select]
lrwxrwxrwx 1 root root      21 Feb  1 01:12 libcsfml-audio-d.so -> libcsfml-audio-d.so.2                                                                                           
lrwxrwxrwx 1 root root      23 Feb  1 01:12 libcsfml-audio-d.so.2 -> libcsfml-audio-d.so.2.0                                                                                       
-rwxr-xr-x 1 root root  214336 Feb  1 01:12 libcsfml-audio-d.so.2.0                                                                                                                 
lrwxrwxrwx 1 root root      19 Feb  1 00:53 libcsfml-audio.so -> libcsfml-audio.so.2                                                                                               
lrwxrwxrwx 1 root root      21 Feb  1 00:53 libcsfml-audio.so.2 -> libcsfml-audio.so.2.0                                                                                           
-rwxr-xr-x 1 root root   46547 Feb  1 01:12 libcsfml-audio.so.2.0                                                                                                                   
lrwxrwxrwx 1 root root      24 Feb  1 01:12 libcsfml-graphics-d.so -> libcsfml-graphics-d.so.2                                                                                     
lrwxrwxrwx 1 root root      26 Feb  1 01:12 libcsfml-graphics-d.so.2 -> libcsfml-graphics-d.so.2.0                                                                                 
-rwxr-xr-x 1 root root 1093485 Feb  1 01:12 libcsfml-graphics-d.so.2.0                                                                                                             
lrwxrwxrwx 1 root root      22 Feb  1 00:53 libcsfml-graphics.so -> libcsfml-graphics.so.2                                                                                         
lrwxrwxrwx 1 root root      24 Feb  1 00:53 libcsfml-graphics.so.2 -> libcsfml-graphics.so.2.0                                                                                     
-rwxr-xr-x 1 root root  162372 Feb  1 01:12 libcsfml-graphics.so.2.0     
For some reason it doesnt want to use those ones. either way it seems to be working now

6
DotNet / Re: SFML 2 and mono
« on: February 01, 2013, 12:52:33 pm »
I can see the libcsfml-xxx.so.2 -> libcsfml-xxx.so.2.0 symlinks, but do the libcsfml-xxx.so -> libcsfml-xxx.so.2 symlinks exist as well?

They should, the files are in there and all I have done is installed it via make install

... just tried changing the config files to
<?xml version="1.0" encoding="utf-8"?>
<configuration>
     <dllmap dll="csfml-xxx-2" target="libcsfml-xxx.so.2" />
  </configuration>

and it works, so no idea why the symlinks arent there, how do I go about creating them?

7
DotNet / Re: SFML 2 and mono
« on: February 01, 2013, 10:27:20 am »
Are you sure that /usr/local/lib is in ld's search paths?

I didn't change the naming convention of SFML.Net, since UpperCamelCase is the standard for .Net.

Yea this is the output of ldconfig -v

Code: [Select]
/usr/local/lib:
libcsfml-audio-d.so.2 -> libcsfml-audio-d.so.2.0
libcsfml-graphics-d.so.2 -> libcsfml-graphics-d.so.2.0
libcsfml-network-d.so.2 -> libcsfml-network-d.so.2.0
libcsfml-window-d.so.2 -> libcsfml-window-d.so.2.0
libcsfml-system-d.so.2 -> libcsfml-system-d.so.2.0
libcsfml-audio.so.2 -> libcsfml-audio.so.2.0
libcsfml-graphics.so.2 -> libcsfml-graphics.so.2.0
libcsfml-network.so.2 -> libcsfml-network.so.2.0
libcsfml-window.so.2 -> libcsfml-window.so.2.0
libcsfml-system.so.2 -> libcsfml-system.so.2.0
libBox2D.so.2.1.0 -> libBox2D.so.2.1.0
libsfml-audio.so.1.6 -> libsfml-audio.so.1.6
libsfml-graphics.so.1.6 -> libsfml-graphics.so.1.6
libsfml-network.so.1.6 -> libsfml-network.so.1.6
libsfml-window.so.1.6 -> libsfml-window.so.1.6
libsfml-system.so.1.6 -> libsfml-system.so.1.6
libluajit-5.1.so.2 -> libluajit-5.1.so.2.0.0
libglfw.so -> libglfw.so
libsfml-audio-d.so.2 -> libsfml-audio-d.so.2.0
libsfml-graphics-d.so.2 -> libsfml-graphics-d.so.2.0
libsfml-network-d.so.2 -> libsfml-network-d.so.2.0
libsfml-window-d.so.2 -> libsfml-window-d.so.2.0
libsfml-system-d.so.2 -> libsfml-system-d.so.2.0
libsfml-audio.so.2 -> libsfml-audio.so.2.0
libsfml-graphics.so.2 -> libsfml-graphics.so.2.0
libsfml-network.so.2 -> libsfml-network.so.2.0
libsfml-window.so.2 -> libsfml-window.so.2.0
libsfml-system.so.2 -> libsfml-system.so.2.0
/usr/lib/xorg/modules:
  ...
/usr/lib/graphviz:
  ...
/opt/kde3/lib:
  ...
/usr/lib/wx-2.8-stl:
  ...
/lib:
  ...
/usr/lib:
  ...
/lib/i686: (hwcap: 0x0008000000000000)

8
DotNet / SFML 2 and mono
« on: February 01, 2013, 02:27:40 am »
Im trying to get SFML.Net running o mono, I havejust recompiles SFML, CSFML and SFML.Net, however when trying to run the shader example that comes with SFML.Net I get:
Code: [Select]
Unhandled Exception: System.DllNotFoundException: libcsfml-graphics.so
  at (wrapper managed-to-native) SFML.Graphics.RenderWindow:sfRenderWindow_create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
  at shader.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libcsfml-graphics.so
  at (wrapper managed-to-native) SFML.Graphics.RenderWindow:sfRenderWindow_create (SFML.Window.VideoMode,string,SFML.Window.Styles,SFML.Window.ContextSettings&)
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title, Styles style, ContextSettings settings) [0x00000] in <filename unknown>:0
  at SFML.Graphics.RenderWindow..ctor (VideoMode mode, System.String title) [0x00000] in <filename unknown>:0
  at shader.Program.Main () [0x00000] in <filename unknown>:0
The application was terminated by a signal: SIGHUP

Im using the sfmlnet-xxx-2.dll.config files to remap the windows fdll's to linux .so
as so:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
     <dllmap dll="csfml-audio-2" target="libcsfml-audio.so" />
  </configuration>


<?xml version="1.0" encoding="utf-8"?>
<configuration>
     <dllmap dll="csfml-graphics-2" target="libcsfml-graphics.so" />
  </configuration>


<?xml version="1.0" encoding="utf-8"?>
<configuration>
     <dllmap dll="csfml-window-2" target="libcsfml-window.so" />
  </configuration>

and the csfml files are in usr/local/lib:
Code: [Select]
richy@linux-nc18:/usr/local/lib> ls
Box2D                       libcsfml-network.so.2     libsfml-audio-d.so.2.0     libsfml-network.so.2
libBox2D.a                  libcsfml-network.so.2.0   libsfml-audio-s.a          libsfml-network.so.2.0
libBox2D.so                 libcsfml-system-d.so      libsfml-audio-s-d.a        libsfml-system-d.so
libBox2D.so.2.1.0           libcsfml-system-d.so.2    libsfml-audio.so           libsfml-system-d.so.2
libBulletCollision.a        libcsfml-system-d.so.2.0  libsfml-audio.so.1.6       libsfml-system-d.so.2.0
libBulletDynamics.a         libcsfml-system.so        libsfml-audio.so.2         libsfml-system-s.a
libBulletSoftBody.a         libcsfml-system.so.2      libsfml-audio.so.2.0       libsfml-system-s-d.a
libcsfml-audio-d.so         libcsfml-system.so.2.0    libsfml-graphics-d.so      libsfml-system.so
libcsfml-audio-d.so.2       libcsfml-window-d.so      libsfml-graphics-d.so.2    libsfml-system.so.1.6
libcsfml-audio-d.so.2.0     libcsfml-window-d.so.2    libsfml-graphics-d.so.2.0  libsfml-system.so.2
libcsfml-audio.so           libcsfml-window-d.so.2.0  libsfml-graphics-s.a       libsfml-system.so.2.0
libcsfml-audio.so.2         libcsfml-window.so        libsfml-graphics-s-d.a     libsfml-window-d.so
libcsfml-audio.so.2.0       libcsfml-window.so.2      libsfml-graphics.so        libsfml-window-d.so.2
libcsfml-graphics-d.so      libcsfml-window.so.2.0    libsfml-graphics.so.1.6    libsfml-window-d.so.2.0
libcsfml-graphics-d.so.2    libglfw.a                 libsfml-graphics.so.2      libsfml-window-s.a
libcsfml-graphics-d.so.2.0  libglfw.so                libsfml-graphics.so.2.0    libsfml-window-s-d.a
libcsfml-graphics.so        libLinearMath.a           libsfml-network-d.so       libsfml-window.so
libcsfml-graphics.so.2      libluajit-5.1.a           libsfml-network-d.so.2     libsfml-window.so.1.6
libcsfml-graphics.so.2.0    libluajit-5.1.so          libsfml-network-d.so.2.0   libsfml-window.so.2
libcsfml-network-d.so       libluajit-5.1.so.2        libsfml-network-s.a        libsfml-window.so.2.0
libcsfml-network-d.so.2     libluajit-5.1.so.2.0.0    libsfml-network-s-d.a      lua
libcsfml-network-d.so.2.0   libsfml-audio-d.so        libsfml-network.so         pkgconfig
libcsfml-network.so         libsfml-audio-d.so.2      libsfml-network.so.1.6

Whats even more weird is a project I had that included SFML.Net is now using the newly compiled SFML.Net DLL's and its complaining becuse window.isOpen() doesnt exist, it wants the method to be IsOpen(). However im sure you changd the naming convention for the SFML.Net and CSFML a long time ago.

Anyone know whats going on?

9
Just wanted to check, do the latest commits from the C and the .Net bindings have this fix?

10
Window / Check is window is focused
« on: September 06, 2012, 05:21:54 am »
Is there anyway to check if the window is focused?
I want to hidemouse/set mouse position to center only when it is focused

11
Graphics / Re: Getting font glyphs
« on: July 16, 2012, 01:57:03 am »
Your code is too long. Why don't you test it yourself, and ask a precise question if you have a specific problem?

I have but it isnt drawing anything, correction its drawing the quad to display but nothing on it

To make it more clear my question is: If I want to get a texture with all the ASCII characters of a font is this the correct way of doing it?
for(unsigned char c = 0; c < std::numeric_limits<unsigned char>::max(); c++)
    {
        sf::Glyph g = font.getGlyph(c, siz, false);
        Positions.push_back(g.textureRect);
    }
    bitmap = font.getTexture( siz );

12
Graphics / Getting font glyphs
« on: July 15, 2012, 09:40:04 pm »
m trying to write my own font rendering system using OGL, and for it I get te texture from a sf::Font like so:

#ifndef BITMAPTEXT_HPP_INCLUDED
#define BITMAPTEXT_HPP_INCLUDED

#include <GL/glew.h>
#include <GL/gl.h>
#include <vector>
#include <SFML/Graphics.hpp>
#include "./Shader.hpp"
#include <glm/glm.hpp>

class BitmapText
{
protected:
    glm::vec3 Pos;
    glm::mat4 Model;

    GLuint vertexbuffer;
    GLuint uvbuffer;

    sf::Font font;
    sf::Texture bitmap;
    Shader shader;
    std::vector<sf::IntRect> Positions;
    std::string text;
    glm::vec4 Color;


    GLuint TextureID;
    GLuint ColorID;
    GLuint MVPID;
    GLuint PositionID;
    GLuint UVID;

    void Rebuild();
public:
    ///
    /// \brief Empty constructor
    ///
    BitmapText();

    ///
    /// \brief Empty deconstructor
    ///
    ~BitmapText();

    ///
    /// \brief Construct class from given arguments
    /// \param Bitmap image
    /// \param Bitmap position array
    bool LoadFile(const std::string& fontFile, int siz );

    ///
    /// \brief Set text
    ///
    void SetText(const std::string& eText);

    void SetPosition(const glm::vec2 &pos);

    virtual void Update();

    virtual void Draw(glm::mat4 &VP);

    void SetColor(float r , float g, float b , float a);
};

#endif // BITMAPTEXT_HPP_INCLUDED








#include <glm/gtx/transform2.hpp>
#include <GL/glew.h>
#include "./BitmapText.hpp"
#include <GL/glfw.h>
#include <iostream>
#include <fstream>
#include "./Utilities.hpp"
#include <limits>


BitmapText::BitmapText()
{

    std::string vertexShader =
    "#version 120\n"
    "uniform mat4 MVP;\n"
    "attribute vec4 Position;\n"
    "attribute vec2 UV;\n"
    "varying vec2 uv;\n"

    "void main(){\n"
        "uv = UV;\n"
        "gl_Position =  MVP * Position;\n"
    "}";

    std::string fragmentShader =
    "#version 120\n"
    "varying vec2 uv;\n"
    "uniform sampler2D Texture;\n"
    "uniform vec4 Color;\n"
    "void main(){\n"
        "vec4 textur = texture2D( Texture, uv ).rgba;\n"
        "textur.rgb = Color.rgb;\n"
        "if(textur.a == 0.0f){\n"
            "textur = vec4(0.0f, 0.0f, 0.0f, 0.0f);\n"
        "}\n"
        "gl_FragColor = textur;\n"
    "}";


    shader.LoadShaderCode(vertexShader ,fragmentShader);




    Color = glm::vec4(1.0f);

    text = "hi";

    glGenBuffers(1, &vertexbuffer);
    glGenBuffers(1, &uvbuffer);



    MVPID = glGetUniformLocation(shader.GetShaderID(), "MVP");
    TextureID = glGetUniformLocation(shader.GetShaderID(), "Texture");
    PositionID = glGetAttribLocation(shader.GetShaderID(), "Position");
    UVID = glGetAttribLocation(shader.GetShaderID(), "UV");
    ColorID = glGetUniformLocation(shader.GetShaderID(), "Color");

//Rebuild();
}

BitmapText::~BitmapText()
{
    glDeleteBuffers(1, &vertexbuffer);
    glDeleteBuffers(1, &uvbuffer);
}

bool BitmapText::LoadFile(const std::string& fontFile, int siz)
{
    font.loadFromFile(fontFile);

    for(unsigned char c = 0; c < std::numeric_limits<unsigned char>::max(); c++)
    {
        sf::Glyph g = font.getGlyph(c, siz, false);
        Positions.push_back(g.textureRect);
    }
    bitmap = font.getTexture( siz );
    bitmap.bind();
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    glGenerateMipmap(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, 0);

    Rebuild();
    return true;
}

void BitmapText::SetText(const std::string& eText)
{
    text = eText;
    Rebuild();
}

void BitmapText::SetPosition(const glm::vec2& pos)
{
    Pos = glm::vec3(pos.x, pos.y, 0.1f);
    Rebuild();
}

void BitmapText::Update()
{

}

void BitmapText::Draw(glm::mat4 &VP)
{

    //glPolygonMode( GL_FRONT_AND_BACK, GL_FILL);
    glm::mat4 MVP = VP * Model;

    shader.Bind();
    glUniformMatrix4fv(MVPID, 1, GL_FALSE, &MVP[0][0]);

    glActiveTexture(GL_TEXTURE0);
    bitmap.bind();
    glUniform1i(TextureID, 0);

    glUniform4fv(ColorID,1 , &Color[0]);

    glEnableVertexAttribArray(PositionID);
    glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
    glVertexAttribPointer(
        PositionID,                  // attribute 0. No particular reason for 0, but must match the layout in the shader.
        3,                  // size
        GL_FLOAT,           // type
        GL_FALSE,           // normalized?
        0,                  // stride
        (void*)0            // array buffer offset
    );

    glEnableVertexAttribArray(UVID);
    glBindBuffer(GL_ARRAY_BUFFER, uvbuffer);
    glVertexAttribPointer(
        UVID,                  // attribute 0. No particular reason for 0, but must match the layout in the shader.
        2,                  // size
        GL_FLOAT,           // type
        GL_FALSE,           // normalized?
        0,                  // stride
        (void*)0            // array buffer offset
    );

    glDrawArrays(GL_TRIANGLES, 0, text.size() * 6);

    glDisableVertexAttribArray(UVID);
    glDisableVertexAttribArray(PositionID);


    glBindTexture(GL_TEXTURE_2D, 0);
    Shader::Unbind();



    //if(asLines)
    //    glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
    //else
    //    glPolygonMode( GL_FRONT_AND_BACK, GL_FILL);

}

void BitmapText::Rebuild()
{
    std::vector<GLfloat> VertexList;
    std::vector<GLfloat> UVList;

    float disp = 0.0f;
    float largestHeight = 0.0f;
    for(int i = 0; i < text.size(); i++)
    {
        sf::IntRect charRect = Positions[text.c_str()[i]];
        if(largestHeight < charRect.height) largestHeight = charRect.height;


        VertexList.push_back(0.0f + disp);
        VertexList.push_back(0.0f);
        VertexList.push_back(0.0f);

        VertexList.push_back(0.0f + disp);
        VertexList.push_back(charRect.height);
        VertexList.push_back(0.0f);

        VertexList.push_back(charRect.width + disp);
        VertexList.push_back(0.0f);
        VertexList.push_back(0.0f);

        VertexList.push_back(charRect.width + disp);
        VertexList.push_back(0.0f);
        VertexList.push_back(0.0f);

        VertexList.push_back(0.0f + disp);
        VertexList.push_back(charRect.height);
        VertexList.push_back(0.0f);


        VertexList.push_back(charRect.width + disp);
        VertexList.push_back(charRect.height);
        VertexList.push_back(0.0f);



        UVList.push_back(charRect.left / bitmap.getSize().x);
        UVList.push_back(charRect.top / bitmap.getSize().y);

        UVList.push_back(charRect.left / bitmap.getSize().x);
        UVList.push_back((charRect.top + charRect.height) / bitmap.getSize().y);

        UVList.push_back((charRect.left + charRect.width ) / bitmap.getSize().x);
        UVList.push_back(charRect.top / bitmap.getSize().y);

        UVList.push_back((charRect.left + charRect.width ) / bitmap.getSize().x);
        UVList.push_back(charRect.top / bitmap.getSize().y);

        UVList.push_back(charRect.left / bitmap.getSize().x);
        UVList.push_back((charRect.top + charRect.height) / bitmap.getSize().y);

        UVList.push_back((charRect.left + charRect.width ) / bitmap.getSize().x);
        UVList.push_back((charRect.top + charRect.height) / bitmap.getSize().y);

        disp += charRect.width;
    }


    glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
    glBufferData(GL_ARRAY_BUFFER, VertexList.size() * sizeof(GLfloat), &VertexList[0], GL_STATIC_DRAW);

    glBindBuffer(GL_ARRAY_BUFFER, uvbuffer);
    glBufferData(GL_ARRAY_BUFFER, UVList.size() * sizeof(GLfloat), &UVList[0], GL_STATIC_DRAW);

    Model = glm::translate(glm::mat4(1.0f),Pos.x , Pos.y, 0.0f);
    //MVP =  * Model;

}

void BitmapText::SetColor(float r , float g, float b , float a)
{
    Color.x = r;
    Color.y = g;
    Color.z = b;
    Color.w = a;
}


 

The code to get the glyphs is:

bool BitmapText::LoadFile(const std::string& fontFile, int siz)
{
    font.loadFromFile(fontFile);

    for(unsigned char c = 0; c < std::numeric_limits<unsigned char>::max(); c++)
    {
        sf::Glyph g = font.getGlyph(c, siz, false);
        Positions.push_back(g.textureRect);
    }
    bitmap = font.getTexture( siz );
    bitmap.bind();
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    glGenerateMipmap(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, 0);

    Rebuild();
    return true;
}
 

Is this the correct way to do it?

13
Audio / Re: Help with sound positioning
« on: July 09, 2012, 03:05:52 am »
Woops didnt realize that the song needs to be mono

14
Audio / Help with sound positioning
« on: July 09, 2012, 02:57:14 am »
Im trying to work with 2d sounds, for It I have this code:

#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>

int main()
{

    sf::RenderWindow App(sf::VideoMode(600, 600), "My window");

    sf::Texture t;
    t.loadFromFile("Speaker.png");

    sf::Sprite speaker(t);
    speaker.setRotation(90);
    speaker.setOrigin(  t.getSize().x / 2.0f,   t.getSize().x / 2.0f    );
    speaker.setPosition(300, 300);

    sf::Text text("Song: Reunited by Incomptech.com", sf::Font::getDefaultFont(),14);
    text.setPosition(5,5);
    text.setColor(sf::Color::Black);

    sf::Listener::setDirection(0, -1, 0);
    sf::Listener::setPosition(0, 0, 0);

    sf::Music music;
    music.openFromFile("Reunited.ogg");
    music.setLoop(true);
    music.setPosition(300,300,0);
    music.setMinDistance(5.f);
    music.setAttenuation(10.f);
    music.play();

    while (App.isOpen())
    {
        sf::Event event;
        while (App.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                App.close();
        }

        sf::Vector2f pos;   //relative to center of the screen
        pos.x = sf::Mouse::getPosition(App).x - 300;
        pos.y = sf::Mouse::getPosition(App).y - 300;
        sf::Listener::setPosition(pos.x, pos.y, 0);

        App.clear(sf::Color::White);
        App.draw(text);
        App.draw(speaker);
        App.display();
    }

    return 0;
}
 

But when I move the mouse the volume stays at 1, it wont change at all

15
Graphics / Re: Just wondering, Intel GPU
« on: June 27, 2012, 12:32:30 am »
Wow, this 2-column layout makes the code really unreadable :P

Quote
Do you have any idea what this could be?
No, but the intel_do_flush_locked failed error seems to be a common one. Probably a driver issue, again.

Hmm, il have to look into it see if there is anything that can be fixed easily. Is it just the renderTarget and renderTexture files that define the renderTexture?

Lol I did that layout to not strech the page but ended up making it worse :P

Pages: [1] 2 3 ... 13