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

Pages: [1]
1
Graphics / Indexed vertex arrays
« on: May 20, 2013, 08:02:31 pm »
I've read about SFML's support for vertex arrays.
Is there any support for rendering indexed vertex arrays, where I'd have an array of vertices and an array of index numbers, beyond using raw OpenGL?

2
You were right. There was an old SFML install in my /usr/local/ directory, and deleting it got rid of my compile error. Thanks.

3
Build space-rpg-editor of project space-rpg with configuration Debug

Ld build/Debug/space-rpg-editor normal x86_64
cd /Users/<my username>/game-dev/space-rpg
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/<my username>/game-dev/space-rpg/build/Debug -F/Users/<my username>/game-dev/space-rpg/build/Debug -filelist /Users/<my username>/game-dev/space-rpg/build/space-rpg.build/Debug/space-rpg-editor.build/Objects-normal/x86_64/space-rpg-editor.LinkFileList -mmacosx-version-min=10.6 -lRocketControls -lRocketCore -framework SFML -framework sfml-audio -framework sfml-graphics -framework sfml-system -framework sfml-window -o /Users/<my username>/game-dev/space-rpg/build/Debug/space-rpg-editor

Undefined symbols:
  "sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, sf::ContextSettings const&)", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

4
I have an Xcode project, using Xcode v3.2.6 on Mac OS X 10.6.8.
I've added the SFML 2.0 frameworks to it - SFML.framework and all of the sfml-<subsystem>.frameworks, located in /Library/Frameworks. This compiles fine.

However, I also need to include a static library, the headers in /usr/local/include and the .a files in /usr/local/lib.
My understanding of Xcode is, in order to use headers and libraries kept in /usr/local, I have to go to my project settings and add /usr/local/include to my Header Search Paths.

The problem is when I do that, my project is unable to link to the SFML framework(s).

This is the entirety of my code:
// main.cpp
#include "SFML/Graphics.hpp"

int main (int argc, char * const argv[])
{
        sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
        return 0;
}
I get a "Symbol(s) not found) error where I try to initialize the window.
Strangely enough, the linker error goes away when I take out the constructor so that it just reads sf::RenderWindow window;.

5
Suppose I want to draw an image twice.  It could be for two entities with different positions but the same image, or it could be for tiles in a tilemap.

Is it better to have a sprite for each instance of the image I want to draw?  Or can I get away with having only a single sprite for the image, where I'd change the sprite's position whenever I want to draw its image?

Pages: [1]