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

Pages: [1]
Window / GetEvent with pre-existing Win32 window.
« on: December 31, 2009, 08:39:18 am »
If I make a sf::RenderWindow using a pre-existing Win32 window, what do I need to do in order for GetEvent() to work? Is it possible?


Audio / SFML 2 Won't play OGG files
« on: November 07, 2009, 12:38:04 am »
I just upgraded to SFML 2 today.

I can't get my old music ogg files to play at all. It doesn't matter if they are loaded from memory or file. SFML puts "Failed to read sound file from memory (Supported file format but file is malformed.)" into the std error stream.

Is this a known issue? Like I said, these files played great in SFML 1.5 (And the svn version).

Graphics / Mirrored text
« on: May 20, 2009, 01:12:11 am »
Is it possible to mirror sf::String? I expected SetScale(-1.0f, 1.0f) to do it, but it seems to have no effect.


Graphics / Rotated SubRect
« on: May 16, 2009, 01:35:29 am »
I'm using a packed texture to hold my sprites, and some sprites are rotated.

Is there anyway to set the SubRect of the sprite so it reads in the rotated image correctly? I thought I could just reverse the top and bottom of the sub rect to make it work, but it seems to have no effect.

I know I can load the rotated image and then rotate the sprite, but then I'd have to keep adding 90 to any SetRotations I do later; it'd be a messy solution.


Window / wxWidgets and sf::Input
« on: March 26, 2009, 05:47:58 am »
I'm using wxSFMLCanvas with wxWidgets. Drawing works great, but I'm having trouble getting input to work.

If I manually call wxWindow::CaptureMouse(), then mouse input will work, but it block mouse input to other controls.

I've noticed that I can't get the canvas to even accept focus.

Any help would be greatly appreciated.

Feature requests / Manually setting Z-order
« on: November 22, 2008, 05:51:36 am »
Will SFML ever support a real Z-order system?

Since SFML uses OpenGL it seems like this should be an easy thing to add.

Perhaps add a method to sf::Drawable like SetZ(float z)? If it's left at zero then the Z order is determined by the render order, otherwise it's predetermined by z.

Seems like a simple enough thing, it would really help in some situations.


Feature requests / Virtual Inheritance
« on: November 09, 2008, 03:03:24 am »
Why doesn't SFML use virtual inheritance?

I love SFML's hierarchy and how nested calls to Render() inherit their parents properties. My problem is that I want to expand the Drawable class with logic specific to my game. This works fine for my custom objects, but I can't use multiple inheritance for Sprites, Shapes, or Strings without running into the diamond problem.

Therefor, I currently modify SFML for my use by making Sprite virtually inherit Drawable. I do the same for Shape and String. This will of course impose a small run time performance decrease, but I think that the extra flexibility is well worth it.

As an example, with my current setup I can do:
Code: [Select]

ASprite test; //ASprite inherits from sf::Sprite and includes move functionality.
test.AddMove(new Move::LinearA(0, 0, 100, 100, 1.0f));
test.AddMove(new Move::RotateA(0, 90, 1.0f));
That would make test animate from 0, 0 to 100, 100 over the next 1 second while rotating from 0 degrees to 90 degrees. My specific problem is that my ASprite class must know that it's Drawable inorder for the moves to operate on it. Therefor, if it inherits from sf::Sprite, I run into the diamond problem. Virtual inheritance cleanly fixes this. (an alternative is to use dynamic_cast - that has the disadvantage of run time errors)

I was wondering why SFML doesn't do this already, and if you would consider using virtual inheritance in the future.


Graphics / Error loading Image with SFML [Solved]
« on: November 02, 2008, 01:47:38 am »
OK, this has been driving me crazy for a couple weeks now. If anyone can help I'd really really appreciate it.

I've been developing a game for a while and have been making good progress. My development machine is running Vista x64. My game runs great on my development machine. Anyway, my program crashes and dies on two other machines I've tried it on - they are both running XP x32. Anyway, I went ahead and grabbed the latest SVN version today and compiled the opengl example with full debug symbols (so it's opengl-d.exe). It runs fine on my development machine, but crashes with no error message on both XP computers I have access to.

So I've been running a remote debugging session (with gdbserver) and I've tracked the crash down the some. The crash happens on line 23 of opengl.cpp where it goes to load the background image from disk. From there execution makes it to the sf::Image::CreateTexture() function. On line 625:

Code: [Select]
GLCheck(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTextureWidth, myTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, GetPixelsPtr()));

From there the GetPixelsPtr() function is called. That function seems to return (&myPixels[0]) successfully and then the app crashes. So I assume the crash is in GLCheck on line 625 of Image.cpp.

A final back trace shows that it segfaults somewhere in atioglxx.dll, which is an ATI driver.

Like I said, I'm using an SVN revision downloaded today.

Just wondering if anyone had any advice, or has had any similar problems. I going to keep trying, but any advice would be greatly appreciated.


General discussions / Problem with Code::Blocks files - debug [Fixed]
« on: November 02, 2008, 01:23:12 am »
When I open the Code::Blocks workspace for SFML, the debug configurations don't actually build with debug symbols. Instead I have to go to Project->Build Option and check Produce Debugging Symbols. I had to do that for each project: main, system, graphcis, etc.

Anyway, it's kind of annoying. Can we get this fixed? I can upload the fixed project files if you like.


PS, why not use a system like CMake to build the project files?

Window / Possible mouse input bug
« on: October 28, 2008, 04:24:16 am »
With Windows and the SVN version of SFML I think I found a small bug.

If the mouse button is depressed inside the application window, but released outside it, then RenderWindow.GetInput().IsMouseButtonDown(sf::Mouse::Left) still returns true until the next click inside of the window.

I understand that (by design) you may want to ignore input outside of the application, but it seems wrong to falsely report the mouse state once it's hovering over the application again.


Graphics / sf::Matrix3::GetInverse() Question [Fixed]
« on: October 05, 2008, 05:11:06 am »
Hi, could someone please tell me what I'm doing wrong here.

I'm expecting to move a point from 0, 0 to 10, 10, and then back to 0, 0. However, the last operation doesn't work and the point stays at 10, 10. Here is the code:

Code: [Select]
   sf::Vector2f center(0, 0);
    sf::Vector2f offset(10, 10);
    sf::Vector2f scale(1, 1);

    sf::Matrix3 m;
    m.SetFromTransformations(center, offset, 0.0, scale);

    sf::Vector2f v(0, 0); //Show starting point.
    std::cout << v.x << "\t" << v.y << "\n";

    v = m.Transform(v); //Move by 10 (x and y).
    std::cout << v.x << "\t" << v.y << "\n";

    v = m.GetInverse().Transform(v); //Move backwards (doesn't seem to do anything).
    std::cout << v.x << "\t" << v.y << "\n";

The output from this is:
0   0
10   10
10   10

I also can't seem to get multiplication to work. If I add "m *= m;" to the code then I'd expect the offset to double, but I can't get that to work either.

What am I doing wrong? Are these functions not supposed to do what I think they should? Thanks.

Window / Transforming mouse coordinates
« on: September 30, 2008, 09:01:59 pm »
Just wondering, is there any way to transform mouse coordinates based on a drawable's position, scale, and rotation?

What is the standard idiom for seeing where the mouse it at on a rotated and translated object? What if the rotation is inherited from its parent? I really love that a group of objects can all be moved at once by simply being drawn by a parent drawable object.

BTW, SFML is great! It truly is a really great library.


Pages: [1]