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

Pages: 1 ... 81 82 [83]
1231
I tried a few other locations and for whatever reason g++ can find the libs when I put them in /lib/SFML and use -L/lib/SFML.  Go figure.

But now I have a completely different set of errors!  So here's what happened this time:

g++ main.cpp -I/home/Ixrec/code/SFML-2.1/include/SFML -L/lib/SFML -lsfml-system -lsfml-window -lsfml-graphics

/usr/bin/ld: warning: libGLEW.so.1.7, needed by /lib/SFML/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/lib/SFML/libsfml-graphics.so: undefined reference to '__glewUniform1fARB'
/lib/SFML/libsfml-graphics.so: undefined reference to '__GLEW_ARB_shader_objects'
...

There's a couple dozen of these undefined references to what I assume are glew functions or macros.

1232
Yeah, that also makes no difference.

1233
SFML wiki / Re: [C#] TileMap renderer
« on: August 04, 2013, 09:49:11 pm »
I think "culling" might be the term you're looking for, and I think there are a handful of specific algorithms used for certain types of culling. In particular I remember "depth buffering" from the OpenGL tutorial I read.

1234
SFML wiki / Re: XBox 360 Controller support for SFML games
« on: August 04, 2013, 09:24:10 pm »
The triggers worked fine for me when I tested a wired 360 controller with my program.  Dunno if that counts.

afaik the only advantage you'd get by having this much code for a specific kind of 'joystick' would be allowing the program to say "Fire Primary Weapon is bound to Right Trigger" instead of the rather cryptic "Fire Primary Weapon is bound to negative movement along joystick axis 2".

1235
Damn, that one sounded like it might be it.  Sadly, no change:

g++ -I/home/Ixrec/code/SFML-2.1/include/SFML/ -L/home/Ixrec/code/SFML-2.1/lib/ -lsfml-system -lsfml-window -lsfml-graphics main.cpp

/usr/bin/ld: cannot find -lsfml-system
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: cannot find -lsfml-graphics
collect2: ld returned 1 exit status

1236
Window / Re: resized and renderwindow getsize wrong values
« on: August 04, 2013, 07:52:49 pm »
Well for one, in the first snippet you're calling getSize on "wind", which hasn't been defined before.  Was that just a typo for "window" which gets initialized on the first line?

In the second snippet I have no idea what "System::resized" is, and I don't see it in the API documentation.  Is that from something outside SFML?  Also, you didn't explain what you want the second snippet to actually do.

1237
Okay, cleaned up the mess I made earlier, and based on what you've said I think this test is fairly close to how it's supposed to work.

In my home directory is a folder called "code" that contains the "SFML-2.1" folder (the SDK thing, unaltered) and the sample main.cpp.  This is what happens:

Quote
ixrec@ubuntu:~$ cd code
ixrec@ubuntu:~/code$ g++ -I~/code/SFML-2.1/include/SFML/ -L~/code/SFML-2.1/lib/ -lsfml-system -lsfml-window -lsfml-graphics main.cpp
/usr/bin/ld: cannot find -lsfml-system
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: cannot find -lsfml-graphics
collect2: ld returned 1 exit status
ixrec@ubuntu:~/code$

1238
At the moment I'm just trying to compile the sample program from this page: http://www.sfml-dev.org/tutorials/2.1/start-linux.php.  I've been using the 32-bit Linux GCC build under the downloads section, which I think is what the tutorial refers to as the "SDK."  I'm running Ubuntu 12.04 LTS inside VMware Player 5.0.2 on my Windows 7 Professional 64-bit laptop.  All of these things I downloaded and/or updated within the last 24 hours.

For a while I tried to do what the tutorial said, and one of my many guesses was that it wanted me to put the contents of SFML-2.1/include/SFML into /usr/include/SFML and the contents of SFML-2.1/lib/ into /usr/lib/SFML, then use "-I/usr/include/SFML/" and "-L/usr/lib/SFML/" and some -l's in the g++ command.  In the end none of my guesses came close to getting g++ to realize these libraries existed, much less produce an actual executable.

Out of my dozens of failed combinations of file placement and command line arguments, the errors I typically got were either: 1) an "undefined reference" to every single SFML function in the sample main.cpp, 2) "/usr/bin/ld: cannot find -lsfml-graphics" or any of the other libraries I tried including with -l, or 3) several "undefined reference"s to glew macros (that was a really weird one...)

So how exactly are you supposed to compile an SFML program on linux?  Where am I supposed to put all of the files in the "SDK"?  Should I only move the .hpps and .so's?  Do I need to treat the .so, .so.2 and .so.2.1 libs differently in some way?  Should I be trying to preserve the placement of certain subdirectories?  Should I be doing anything with the lone .cmake file or the .pkg files?  What should my actual g++ command look like?  The tutorial just doesn't tell me any of this.

Incidentally I've been using SFML on Windows for weeks now and it's been almost effortless there.  I've also used gcc/g++ from the command line before in Cygwin, though I've never had to figure out how to make them link with a library they didn't automagically know about already.

1239
Graphics / Re: Pixel perfect sprite
« on: August 03, 2013, 09:40:43 pm »
It sounds like what you want is an image with transparent parts.  MS Paint can't do transparency at all, so if that's what you're using try another image editor like Paint.net or GIMP which can.

1240
Window / Re: Do SFML windows ignore embedded icons?
« on: July 25, 2013, 09:21:12 pm »
Thanks for the quick reply.  Guess I'll skip icons for now.

1241
Window / Do SFML windows ignore embedded icons?
« on: July 25, 2013, 06:56:37 pm »
I have no experience with the Win32 API or anything, but I'm under the impression that when an icon is embedded in an .exe, Windows will automatically use the icons it contains in the following places (maybe more):
1) Windows Explorer
2) The Taskbar
3) The top-left corner of the application window
4) The box that appears when you hold Alt+Tab

However, when I try embedding an .ico file in my SFML program's .exe using Resource Hacker, it only appears in Windows Explorer and the Taskbar, not in the application window or the Alt-Tab box.

Is this actually standard Windows behavior, and I'm supposed to use setIcon() to get uses 3 and 4 to work?  Or is SFML actively setting its windows' icons to the OS default instead of letting Windows use the embedded icons?

I have tried setIcon(), and it does work, but it's not a complete solution because it only accepts a single array of pixels rather than an .ico file.  Since icon uses 2, 3 and 4--the ones that setIcon() seems to affect--often require different sizes, that one array of pixels ends up getting upscaled or downscaled, both of which look quite bad.  Is there some workaround for this?

I've also seen the wiki tutorial on embedding the pixel array into your source code, but that won't make the icon appear in Windows Explorer (...right?) and it can't get around the fact that getIcon() only takes one array so that doesn't seem like a solution either.

Of course, this is a very minor problem in the grand scheme of things, and aside from this I'm absolutely loving SFML as a library and am almost done with my first big program in it (which is why I'm trying to add niceties like icons now).  So I won't be devastated if there is no good general solution.

I've been using Microsoft Visual C++ 2010 Express, dynamically linking SFML for debug builds and statically linking for release builds (for some reason the debug build is unbearably slow with static linking) on Windows 7 Professional 64-bit.  Same behavior on both builds.  I've never used Mac OS X or Linux much, so I know nothing about how they deal with windows and icons, so maybe I'm unaware of some portability issues that affect this.

Pages: 1 ... 81 82 [83]