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

Pages: [1]
1
Graphics / Re: Cant load font from terminal
« on: March 11, 2013, 09:31:54 pm »
Update:

I put the absolute file path into the loadFromFile() function and the font loaded from the terminal. However, for any relative path such as "fontfile.ttf" or "./fontfile.ttf", I still get errors (the font file is placed directly with the executable and not in any sub-directories).

I'm used to Code::Blocks 10.04, could this be some change in the newer version?

2
Graphics / Re: Cant load font from terminal
« on: March 11, 2013, 09:19:24 pm »
I understand that, and I have taken that into account. My project folder has the font file in it, as do both my Release and Debug folders. I don't think this is the problem.

3
Graphics / Re: Cant load font from terminal
« on: March 11, 2013, 08:30:28 pm »
They are. Both the executable and its resources (only the font file in this particular app) are located in the same directory in each case (Code::Blocks creates executables in both bin/Release and bin/Debug).

4
Graphics / Cant load font from terminal
« on: March 11, 2013, 06:57:39 pm »
I'm using Ubuntu 12.04 and Code::Blocks 12.11. I cloned the SFML 2.0 source and built it on my system.

Everything works fine when I run my app from Code::Blocks itself (graphics, sound, font). When I try to open the application from a terminal, however, I get "failed to load font ... (failed to create the font face)."

I have the font copied in the respective bin folders (Release and Debug), so the file path shouldn't be the issue. I am linking to the Release versions of the so files.

Any help?
Thanks in advance.

5
Network / Re: TcpSocket::disconnect()
« on: February 19, 2013, 09:25:49 pm »
Thanks for the help.
I had another question.

Are there any drawbacks from not using the disconnect function?
If the sockets on both ends were dynamically allocated and I delete them without calling disconnect, would this create any problems or memory leaks, would the hardware be left in an undesired state?

When I use disconnect on dynamically created sockets and then delete them (apparently while they are trying to do their thing with the other end of the connection) I get stack overflow issues. So I'm wondering if I can just delete them and ignore disconnect all together.

Thanks in advance.

6
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: February 19, 2013, 09:13:09 pm »
I successfully installed TGUI v0.5 from source using linux, CMake, and Code::Blocks as described in your tutorial. However, when I tried to run a simple program using TGUI, i receive the following:

||=== Test, Debug ===|
/usr/local/lib/libtgui.so: error||undefined reference to 'glGetIntegerv'|
/usr/local/lib/libtgui.so: error||undefined reference to 'glScissor'|
/usr/local/lib/libtgui.so: error||undefined reference to 'glIsEnabled'|
/usr/local/lib/libtgui.so: error||undefined reference to 'glEnable'|
/usr/local/lib/libtgui.so: error||undefined reference to 'glDisable'|
||=== Build finished: 5 errors, 0 warnings ===|

I have the latest SFML 2.0 libraries, also build from source, and have no problems with those. I followed all of the instructions in your installation tutorial. Any idea what I am doing wrong? Thanks in advance for any help.

7
Network / TcpSocket::disconnect()
« on: January 28, 2013, 04:19:19 pm »
I'm writing a network application and needed to know a little bit more about TcpSocket::disconnect() for sfml 2.0.
From the documentation we have:


Disconnect the socket from its remote peer.

This function gracefully closes the connection. If the socket is not connected, this function has no effect.

I wanted to know what exactly was going on under the hood here. I tried tracking it down in the source code but got stuck at SocketImpl::close(SocketHandle sock).

Specifically, does this function tell the socket's remote peer that this socket is disconnecting? Should I have to manually use the disconnect function on the remote peer's bound socket? (For example, application A has tcpSocket a bound to tcpSocket b residing in application B, if a uses .disconnect(), does b know this without me needing to send a packet of my own before disconnecting? Will this update b automatically?)

Pages: [1]