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

Pages: 1 ... 5 6 [7]
Graphics / Error loading Image with SFML [Solved]
« on: November 02, 2008, 03:07:27 am »
Alright, I'm still working on this. I can confirm that the code crashes at the same place (Image.cpp line 625) on another XP computer with integrated graphics (don't remember which brand). I can also confirm that it works fine on a third computer running XP 32 bits. I really don't know what to think now.

Do some drivers/graphics cards not properly support glTexImage2D()? This is driving me nuts now.

BTW, something else I've noticed (unrelated to this problem) is that the included OPENAL32.DLL depends on MSVCR80.DLL which isn't included with SFML. Two out of the three XP computers I tested on did not have it installed. I got a "The application failed to initialize properly" error until I installed the MS redistributables. Just thought I'd throw that out there.

Graphics / Error loading Image with SFML [Solved]
« on: November 02, 2008, 01:55:01 am »
BTW, in case anyone got lost in the details above, my symptoms are that any Image::LoadFromFile() or Image::LoadFromMemory() fails with a seg fault.

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, 08:46:05 am »
OK, great.

I did take a quick look through the road map, but I missed it. :oops: I'll look harder next time (looks like it's FS#12).

Anyway, sorry for bothering you with this.


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.


Window / [solved]Drawable Class
« on: October 25, 2008, 04:05:02 am »
Give this a try.

Code: [Select]
class myButton : public sf::Drawable
        myButton() {}

        sf::Shape shape;
        sf::String string;

        virtual void Render(sf::RenderTarget& Window) const

BTW, this will also give your button lots of other methods like SetPosition() etc. SFML handles all that automatically. :D

Feature requests / Finding out, what key is pressed, Key code "all"
« on: October 12, 2008, 10:45:54 pm »
Form the tutorial:

Code: [Select]
sf::Event Event;
while (App.GetEvent(Event))
    // Escape key pressed
    if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
        Running = false;
And there is a list of keys here. You'll notice that they are setup to use ASCII characters:
Code: [Select]
char(sf::Key::A) == 'a' //To convert to ASCII just cast to char.

Graphics / sf::Matrix3::GetInverse() Question [Fixed]
« on: October 11, 2008, 08:20:58 am »
I don't know if you seen my earlier message (I deleted it). I thought there might be another bug, but it was just me being really stupid. :oops: Sorry.

Anyway, thanks a ton! It works perfect now. :D

Better than perfect. It's doing exactly what I need.


Graphics / sf::Matrix3::GetInverse() Question [Fixed]
« on: October 07, 2008, 01:20:55 am »
I did a few more tests on this. I don't think that GetInverse() is actually broken, perhaps. I think there is instead a logic error with the way that you're packing a 3x3 matrix into a 4x4 one.

If I do:
Code: [Select]
   sf::Matrix3 m(1, 0, 10,
                  0, 1, 10,
                  0, 0, 1);
then GetInverse() does work as expected. But if the matrix is made with SetFromTransformations() then it doesn't work.

It seems that the difference between the two is at 2, 2 (myData[14]). If myData[14] is forced to 1.0, then the math seems to work perfect but it renders incorrectly. If myData[14] is left at zero (how it's currently implemented) then the rendering works but multiplication and inversion is broken.

I've tried some different things to fix it. Unfortunately I don't know much about matrices.


Graphics / sf::Matrix3::GetInverse() Question [Fixed]
« on: October 05, 2008, 10:25:55 am »
Quote from: "Laurent"
You're not supposed to use the Matrix3 class directly.
Well, I am sub-classing sf::Drawable. Since GetMatrix() is a protected function, I assume I'm at the right level of abstraction. If GetInverse() really is broken, then sf::Drawable::TransformToLocal() probably is too.

I'll look for the bug too. I just wanted to make sure I wasn't doing something obviously wrong before I put too much time into it.


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: October 04, 2008, 09:00:47 pm »
OK, great. Thanks for the quick reply.

If anyone else has the same question, the functions are sf::Drawable::TransformToLocal() and sf::Drawable::TransformToGlobal() in version 1.4.

But in version 1.3 it looks like I can just use the sf::Matrix3::Transform() function. I think for my project I'll be sub-classing sf::Drawable and going that route so I can propagate the transformation down through the hierarchy.

Thanks again. :D

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 ... 5 6 [7]