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

Pages: 1 2 [3] 4 5 ... 7
31
I had the same problem. Acrobat is correct. Just add a copy build event to copy the frameworks into the Frameworks folder inside the application.
If you don't know how to, I'll take screenshots of the process.

32
General / Re: CanĀ“t load Font files under Linux
« on: February 25, 2013, 10:33:12 pm »
For mac you have to get the resource path and appent the font folder to the resource path.
You might have to do the same for Linux.

33
SFML projects / Re: Simple Easy Particle Engine
« on: February 25, 2013, 06:36:27 pm »
That looks way cool. I'm really curious about the drawing code. Shaders fascinate me and your game seems to run super smooth.

34
General / Re: OpenAl bug when compiling SFML
« on: February 25, 2013, 04:41:48 pm »
That's weird. I can play with it but his computer was a fresh install of Lion.

35
General / Re: Collision detection between objects stored in a vector
« on: February 24, 2013, 08:18:20 pm »
Try printing out the bounds of the enemy compared to the bullets.
If it doesn't completely clog the output, you might be able to examine the data to find potential bugs.

36
General / Re: OpenAl bug when compiling SFML
« on: February 24, 2013, 05:05:25 pm »
Well I couldn't get it to compile on my friend's computer, so I did the next best thing.

I made a SFML project on my computer then copied all the frameworks and dylibs and headers to the project source and sent it to him.
He now has a working portable package of SFML he can write code with.

37
General / Re: OpenAl bug when compiling SFML
« on: February 23, 2013, 11:23:30 pm »
Yes

38
General / Re: OpenAl bug when compiling SFML
« on: February 23, 2013, 10:24:30 pm »
10.7.5

Clang - Should be the latest but I don't remember the command to check clang version

OpenAL - OS was recently installed, should be the latest default with the OS

39
General / OpenAl bug when compiling SFML
« on: February 23, 2013, 09:10:05 pm »
Code: [Select]
[ 1%] Built target SFML
[ 15%] Built target sfml-system
[ 39%] Built target sfml-window
[ 48%] Built target sfml-network
[ 73%] Built target sfml-graphics
[ 74%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.cpp:28:
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.hpp:34:
/Library/Frameworks/OpenAL.framework/Headers/al.h:87:44: error: empty parameter
list defined with a typedef of 'void' not allowed in C++
ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
^
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.cpp:28:
In file included from /Users/Connor/Downloads/LaurentGomila-SFML-a40ef79/src/SFML/Audio/ALCheck.hpp:35:
/Library/Frameworks/OpenAL.framework/Headers/alc.h:43:59: error: empty parameter
list defined with a typedef of 'void' not allowed in C++
ALCAPI ALCcontext*ALCAPIENTRY alcGetCurrentContext(ALCvoid);
^
2 errors generated.
make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
make: *** [all] Error 2

I'm trying to install SFML on a friend's computer, I got all the needed stuff installed and set up cmake perfectly. But when I run sudo make install, it runs into this OpenAl error.
Is there any way to fix this?

40
General / Re: Another Mac Issue
« on: February 21, 2013, 04:59:00 pm »
I made a video on getting it SFML built and installed for mac:
http://www.youtube.com/watch?v=OyUb8bDP2mw&feature=youtu.be

41
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 21, 2013, 01:06:27 am »
 ;D So excited.

I'll route click and mouse events from the window for now, until you release the next version of awesomeness.

42
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 20, 2013, 09:16:00 pm »
Sweet, got the callback working.
Though how do I get the mouseX and mouseY in the panel?

Code: [Select]
panel->bindCallback(boost::bind(&DesignerGrid::mouseDown, this), tgui::Panel::MouseLeft);
...
void DesignerGrid::mouseDown() {
//int x, int y ?
}

Edit:
Actually even though it is binded, mouseDown isn't being called.

Edit 2:
I might not have the latest 0.6, I'll download it

Edit 3:
Had the feb 3rd version, downloading the Feb 8 version now.

Edit 4:
Is the TGUI master branch 0.6?
I can't seem to find any of the callback functions in the Panel header file.

43
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 20, 2013, 08:17:40 pm »
How do I use 1.6 callbacks?
I noticed this code:
Code: [Select]
panel->bindCallback(<#boost::function<void ()> func#>, <#unsigned int trigger#>);But where are the triggers defined?

44
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 20, 2013, 01:48:56 am »
You can't draw directly to a panel. Because every object has to be drawable (including Panel), they all have a draw function. If I remember correctly then adding another draw function to draw on top of the panel would give ambigious calls in some situations. I'll look at it again, but if what I remeber is correct then I can't add the possibility easily.

Creating the panel shouldn't be a problem.
The following code works fine for me.
tgui::Window window(sf::VideoMode(800, 600), "TGUI window");
tgui::Panel* panel = window.add<tgui::Panel>();
I can't create a panel in 1.5. Your 1.5 example works but adding panel creation causes a crash. (I tested with a clean version of your library)

Edit:
1.6 doesn't crash, but no panel shows on screen. This code:
Code: [Select]
tgui::Panel* panel = window.add<tgui::Panel>();
panel->setPosition(100, 100);
panel->setSize(100, 100);
panel->setBackgroundColor(sf::Color::Red);

Edit 2:
Got the panel to show with this code:
Code: [Select]
tgui::Panel* panel = window.add<tgui::Panel>();
panel->load(500, 500);
panel->setPosition(100, 100);
panel->setBackgroundColor(sf::Color::Red);

Edit 3:
I just skewered the 1.6 code. Tossed the background code and added the setBackgroundTexture function. Also ruined the ChildWindow cause apparently that uses a lot of the panel code. Good thing I won't need that yet...

Edit 4:
Strangest thing, I can create a panel using the altered 1.6 code in an example program. But it crashes when I do the same code in my other application. Hmmmm. Crash line:
m_EventManager.m_Objects.push_back(newObject);
With and exc_bad_access. Maybe I deleted something that shouldn't have been deleted.

Edit 5:
It may not be my changes that are making it crash. I decided to add a label instead of a panel, this code causes it to crash:
Code: [Select]
tgui::Label* labelUsername = window->add<tgui::Label>();
    labelUsername->setText("Username:");
    labelUsername->setPosition(200, 100);

Edit 6:
 ;D Nevermind. I was using the window object before I set it.

45
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 19, 2013, 06:20:43 pm »
There is also a m_Sprite in Panel, so when changing m_Texture you can immediately call m_Sprite.setTexture(m_Texture).

I looked at it and there won't be clean solution soon. When setting a texture this way, you still own the texture. However the panel assumes that it created the texture and will try to remove it when it is destroyed.
That shouldn't be any problem in your case, but when I make the change in the gui I will have to choose between letting the panel load it, or passing a texture. I'll probably end up with the second one so the function that takes a filename will get removed. But I won't make desicions like that immediately so you'll just have to continue with your own fix for a while.
Easy fix, have the panel create the texture and all I'd need to do is getBackgroundTexture();
It'd have to return a RenderTexture so I could draw to it, but it's a simple solution that'd fix it.

In fact, you can even keep the setBackgroundImage function, just draw the image to the RenderTexture.

Pages: 1 2 [3] 4 5 ... 7