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

Pages: [1]
1
General / Qt Creator + SFML on OSX Mavericks w/ clang
« on: May 17, 2014, 03:37:07 am »
I am no expert with linking, so I may be doing something stupid, but anyways, I have a strange problem and cannot for the life of me make sense of it.

I am using Qt Creator on OSX Mavericks, compiling with clang. I am NOT using the Qt framework in my project; just using the IDE.

Most of SFML works as expected; however, for some strange reason, I cannot use Image::loadFromFile or Texture::loadFromFile or I get linking errors (Undefined symbols for architecture x86_64). I have compiled and recompiled SFML and tried everything I can think of. I can compile SFML apps via command line, but not within Qt Creator. Does anyone know what the issue might be?

The compiler output is:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.6 -o test.app/Contents/MacOS/test main.o   -L/usr/local/lib -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-window-d -lsfml-system-d
Undefined symbols for architecture x86_64:
  "sf::Image::loadFromFile(std::string const&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [test.app/Contents/MacOS/test] Error 1
21:30:14: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.2.1 clang 64bit)
When executing step 'Make'

This is frustrating me. Thanks people.

2
General / Integration with Qt Widgets
« on: March 21, 2013, 07:54:02 pm »
So I've been working on a project for a while now in which I am integrating SFML and Qt5. I'm just using SFML for drawing. But I have not found any really good way to manage it.

I have tried three different techniques so far:
1) create a sf::RenderWindow from my QWidget::winId() and set the QWidget attribute WS_PaintOnScreen
This works to a certain extent, but besides only working properly on Linux (which will be a problem) it causes other issues (I get lots of errors pertaining to QBackingStore::flush() and QWidget::paintEngine())

2) render into a sf::RenderTexture, then copy the texture to a sf::Image, load the data into a QImage and draw onto the QWidget with a QPainter.
This also worked to some extent, but besides the obvious performance hit that this method would cause, the pixel format used in sf::Image is not compatible with QImage, so some of the color channels get mixed up.

3) use a QGLWidget instead of a QWidget, create a sf::RenderWindow from my QGLWidget::winId(), and do painting inside of QGLWidget::paintGL().
I was kind of surprised that this worked at all, but I don't know the details of opengl or the way it is used in wither SFML or QGLWidget, so maybe someone can explain the behavior I observed. I understand that SFML's version of opengl may not be supported in Qt5, so that's probably part of the problem. But some things worked, such as drawing lines, shapes, etc. Loading textures did not work. I also got several opengl errors pertaining to invalid calls. What confused me about this was that I thought sf::RenderWindow QGLWidget would each create its own context, so I didn't really expect it to work at all. Then again, I don't know much about opengl.

Anyways, does anybody know a correct, cross-platform way to integrate sf::RenderTarget into Qt Widgets? The only material I've been able to find is outdated--it deals with Qt4 and SFML 1.6. Also, I guess I could roll back to Qt4 if absolutely necessary, but I'd really like not to.

3
Graphics / patterned textures
« on: December 11, 2012, 06:13:55 am »
Hi,

Is it currently possible to draw a shape with a texture patterned across it? If not, this would be a very useful feature. Is hardware accelerated patterning possible with opengl? I assume it must be.

Thanks!

4
General discussions / New Release?
« on: April 06, 2012, 06:41:55 am »
Just wondering: what tasks must be completed before the next major version can be released?

Holding my breath for the full release! :D

5
Network / IpAddress::GetLocalAddress() returns 127.0.0.1
« on: January 23, 2012, 08:06:45 pm »
So as the title says, whenever I call IpAddress::GetLocalAddress(), it gives me the self-referential home address rather than the address other computers on the LAN will use to connect to it. 127.0.0.1 does me no good! Am I doing something wrong, or am I misusing this function?

(Sorry if I used wrong terminology or whatever--I'm new to network programming.)

6
Feature requests / Cursor icon
« on: November 17, 2011, 05:36:47 pm »
It would be really nice if I could change the mouse icon the same way as the window icon. So far the only way I know to do it is to hide the mouse and draw the cursor myself each frame, which is a pain. Might such a feature be added in the future? (Or if it is already available, did I miss it somehow?)

7
General / Building SFML 2.0
« on: November 15, 2011, 08:55:46 pm »
I am trying to build SFML 2.0. I have put all the files into a Code::Blocks project. The entire project builds, but it will not link. I get a lot of undefined references to __imp___glewSomethingOrOther.

I am linking all the third party libraries, including libglew.a. I have googled this problem a thousand times but I cannot figure out what libs I am missing. Can anyone help me with this problem?

8
D / DSFML compile error: Undefined Symbol
« on: October 25, 2011, 10:59:44 pm »
Hi,

I can't seem to compile any code with DSFML. I get "symbol undefined" errors for each DSFML symbol I use. It would appear I am missing some libs, but I am already linking all the csfml libs and the dsfml libs. Are there any other libs I need to link, or is this something else?

I running Windows XP SP3, for the record, and I am using dmd 1.0 with tango.

9
Feature requests / Unloadable Resources
« on: April 14, 2011, 05:00:43 pm »
I think resources, such as Images, should be unloadable.

myImage.Destroy();

or something like that. Otherwise, you basically have to leave unneeded garbage in memory, use pointers, or else make sure that all resources go out of scope at exactly the right time, which means stack allocated static global objects are no good.

I already added unload functions to some resources on my computer, but it would be nice if SFML would come with this functionality. I can't understand why it doesn't.

My general rule is, if you are able to have empty objects at any time, then they should provide a public function to reset them. It doesn't make sense (to me) to allow construction of uninitialized objects but never allow the resource to be freed after initialization.

Pages: [1]
anything