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

Pages: [1]
1
General discussions / SFML 2 for OS X comes true!
« on: January 28, 2011, 08:40:02 pm »
Hiura, thanks for your work on SFML2.

For reference, I am running OSX 10.6.4, gcc 4.2.1.  I was able to build the static libraries successfully using cmake -> unix makefiles.  However when trying to compile any of the graphical examples provided with SFML2, I get lots of undefined symbols.  I can paste the first third or so here:

Code: [Select]
Undefined symbols:
  "_jpeg_write_scanlines", referenced from:
      sf::priv::ImageLoader::WriteJpg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, unsigned int, unsigned int)in libsfml-graphics-s-d.a(ImageLoader.cpp.o)
  "_FT_Get_Char_Index", referenced from:
      sf::Font::GetKerning(unsigned int, unsigned int, unsigned int) constin libsfml-graphics-s-d.a(Font.cpp.o)
      sf::Font::GetKerning(unsigned int, unsigned int, unsigned int) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "_objc_msgSend_fpret", referenced from:
      -[SFWindowController resizeTo:by:] in libsfml-window-s-d.a(SFWindowController.mm.o)
      -[SFWindowController setWindowPositionToX:Y:] in libsfml-window-s-d.a(SFWindowController.mm.o)
      -[SFWindowController screenHeight] in libsfml-window-s-d.a(SFWindowController.mm.o)
      -[SFOpenGLView scrollWheel:] in libsfml-window-s-d.a(SFOpenGLView.mm.o)
  ".objc_class_name_NSOpenGLPixelFormat", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSOpenGLPixelFormat in libsfml-window-s-d.a(SFContext.mm.o)
  "___glewUniform2fARB", referenced from:
      ___glewUniform2fARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewUniform2fARB$non_lazy_ptr)
  "___glewCreateProgramObjectARB", referenced from:
      ___glewCreateProgramObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewCreateProgramObjectARB$non_lazy_ptr)
  "_FT_New_Face", referenced from:
      sf::Font::LoadFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libsfml-graphics-s-d.a(Font.cpp.o)
  "_CGDisplayPixelsWide", referenced from:
      sf::priv::VideoModeImpl::GetDesktopMode()     in libsfml-window-s-d.a(VideoModeImpl.cpp.o)
      sf::priv::VideoModeImpl::GetFullscreenModes()     in libsfml-window-s-d.a(VideoModeImpl.cpp.o)
  "___GLEW_ARB_vertex_shader", referenced from:
      ___GLEW_ARB_vertex_shader$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___GLEW_ARB_vertex_shader$non_lazy_ptr)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_SFApplication in libsfml-window-s-d.a(SFApplication.m.o)
  "___glewCompileShaderARB", referenced from:
      ___glewCompileShaderARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewCompileShaderARB$non_lazy_ptr)
  "_FT_Get_Glyph", referenced from:
      sf::Font::LoadGlyph(unsigned int, unsigned int, bool) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "_NSCalibratedRGBColorSpace", referenced from:
      _NSCalibratedRGBColorSpace$non_lazy_ptr in libsfml-window-s-d.a(SFWindowController.mm.o)
     (maybe you meant: _NSCalibratedRGBColorSpace$non_lazy_ptr)
  ".objc_class_name_NSString", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSString in libsfml-window-s-d.a(cpp_objc_conversion.mm.o)
  "___glewDeleteObjectARB", referenced from:
      ___glewDeleteObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewDeleteObjectARB$non_lazy_ptr)
  "___glewGetObjectParameterivARB", referenced from:
      ___glewGetObjectParameterivARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewGetObjectParameterivARB$non_lazy_ptr)
  "___CFConstantStringClassReference", referenced from:
      cfstring=--------RRRRRRRRGGGGGGGGBBBBBBBB in libsfml-window-s-d.a(VideoModeImpl.cpp.o)
      cfstring=-RRRRRGGGGGBBBBB in libsfml-window-s-d.a(VideoModeImpl.cpp.o)
      cfstring=PPPPPPPP in libsfml-window-s-d.a(VideoModeImpl.cpp.o)
      cfstring=NSScreenNumber in libsfml-window-s-d.a(SFWindowController.mm.o)
  ".objc_class_name_NSCursor", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSCursor in libsfml-window-s-d.a(SFWindowController.mm.o)
  "___glewGetInfoLogARB", referenced from:
      ___glewGetInfoLogARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewGetInfoLogARB$non_lazy_ptr)
  ".objc_class_name_NSNotificationCenter", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSNotificationCenter in libsfml-window-s-d.a(SFOpenGLView.mm.o)
  "___glewUniform3fARB", referenced from:
      ___glewUniform3fARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewUniform3fARB$non_lazy_ptr)
  "_FT_Done_Glyph", referenced from:
      sf::Font::LoadGlyph(unsigned int, unsigned int, bool) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "_GetCurrentProcess", referenced from:
      sf::priv::WindowImplCocoa::SetUpProcessAsApplication()     in libsfml-window-s-d.a(WindowImplCocoa.mm.o)
  "___glewUseProgramObjectARB", referenced from:
      ___glewUseProgramObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Renderer.cpp.o)
      ___glewUseProgramObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewUseProgramObjectARB$non_lazy_ptr)
  "___GLEW_ARB_fragment_shader", referenced from:
      ___GLEW_ARB_fragment_shader$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___GLEW_ARB_fragment_shader$non_lazy_ptr)
  "_FT_Select_Charmap", referenced from:
      sf::Font::LoadFromMemory(void const*, unsigned long)in libsfml-graphics-s-d.a(Font.cpp.o)
      sf::Font::LoadFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libsfml-graphics-s-d.a(Font.cpp.o)
  "___glewCreateShaderObjectARB", referenced from:
      ___glewCreateShaderObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewCreateShaderObjectARB$non_lazy_ptr)
  "___glewActiveTextureARB", referenced from:
      ___glewActiveTextureARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewActiveTextureARB$non_lazy_ptr)
  "_NSDefaultRunLoopMode", referenced from:
      _NSDefaultRunLoopMode$non_lazy_ptr in libsfml-window-s-d.a(SFApplication.m.o)
     (maybe you meant: _NSDefaultRunLoopMode$non_lazy_ptr)
  "_jpeg_finish_compress", referenced from:
      sf::priv::ImageLoader::WriteJpg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, unsigned int, unsigned int)in libsfml-graphics-s-d.a(ImageLoader.cpp.o)
  ".objc_class_name_NSResponder", referenced from:
      .objc_class_name_SFWindowController in libsfml-window-s-d.a(SFWindowController.mm.o)
  "_FT_Bitmap_Embolden", referenced from:
      sf::Font::LoadGlyph(unsigned int, unsigned int, bool) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "___GLEW_ARB_shader_objects", referenced from:
      ___GLEW_ARB_shader_objects$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___GLEW_ARB_shader_objects$non_lazy_ptr)
  "_CGDisplayMoveCursorToPoint", referenced from:
      -[SFWindowController setCursorPositionToX:Y:] in libsfml-window-s-d.a(SFWindowController.mm.o)
  ".objc_class_name_NSOpenGLView", referenced from:
      .objc_class_name_SFOpenGLView in libsfml-window-s-d.a(SFOpenGLView.mm.o)
  "_jpeg_stdio_dest", referenced from:
      sf::priv::ImageLoader::WriteJpg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, unsigned int, unsigned int)in libsfml-graphics-s-d.a(ImageLoader.cpp.o)
  "_FT_Glyph_To_Bitmap", referenced from:
      sf::Font::LoadGlyph(unsigned int, unsigned int, bool) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "_TransformProcessType", referenced from:
      sf::priv::WindowImplCocoa::SetUpProcessAsApplication()     in libsfml-window-s-d.a(WindowImplCocoa.mm.o)
  "_NSApp", referenced from:
      _NSApp$non_lazy_ptr in libsfml-window-s-d.a(SFWindowController.mm.o)
      _NSApp$non_lazy_ptr in libsfml-window-s-d.a(SFApplication.m.o)
     (maybe you meant: _NSApp$non_lazy_ptr)
  "_FT_Outline_Embolden", referenced from:
      sf::Font::LoadGlyph(unsigned int, unsigned int, bool) constin libsfml-graphics-s-d.a(Font.cpp.o)
  "___glewAttachObjectARB", referenced from:
      ___glewAttachObjectARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewAttachObjectARB$non_lazy_ptr)
  "_CGWindowLevelForKey", referenced from:
      -[SFWindowController initWithMode:andStyle:] in libsfml-window-s-d.a(SFWindowController.mm.o)
  "___glewUniform4fARB", referenced from:
      ___glewUniform4fARB$non_lazy_ptr in libsfml-graphics-s-d.a(Shader.cpp.o)
     (maybe you meant: ___glewUniform4fARB$non_lazy_ptr)
  ".objc_class_name_NSBitmapImageRep", referenced from:
      literal-pointer@__OBJC@__cls_refs@NSBitmapImageRep in libsfml-window-s-d.a(SFWindowController.mm.o)
  "_objc_msgSend", referenced from:


I have not tried with the dynamic libraries yet, will do that asap.

Edit: There appears to be no problem linking against the dynamic libs, only when I uncheck "BUILD_SHARED_LIBS" in cmake and then compile the examples to I get these errors.[/b]

2
General / Static library linking with mingw on windows
« on: April 08, 2010, 01:25:34 am »
Quote from: Laurent
Quote

Quote
Also, the update of 1.6 fixed the audio delay bug on windows.

:D
Which bug was that?


I'd read about the bug on these forums before.  Basically, any time i would play a sound it would have about a 0.3 second delay before playing, which was obviously very noticable.  However I only had this problem on windows XP and windows 7, never on OSX.  But the problem went away with the 1.6 build of SFML.

3
General / Static library linking with mingw on windows
« on: April 07, 2010, 03:31:12 am »
Quote from: "Laurent"
He doesn't have to define SFML_DYNAMIC if he's switching to static libraries... ;)

Try to revert the order of libraries in the linker options
Code: [Select]
sfml-audio-s
sfml-graphics-s
sfml-window-s
sfml-system-s


This solved my issue, thank you.  However, its puzzling to me why that worked.  I would like to obtain a deeper understanding of the linker.

Also, the update of 1.6 fixed the audio delay bug on windows.  Thanks for your work!

4
General / Static library linking with mingw on windows
« on: March 19, 2010, 12:10:00 am »
Quote from: "Laurent"
Quote
and yes I did make clean before re-compiling

Are you talking about your project, or SFML?


My project.  Why would I recompile SFML 1.5?  Should I compile the latest svn and try that?

Quote from: "Mindiell"
Maybe because you kept something like 'SFML_DYNAMIC' ?


Is that a preprocessor definition?   I don't have any of those set.

5
General / Static library linking with mingw on windows
« on: March 17, 2010, 09:22:23 pm »
SFML 1.5 stable release, and yes I did make clean before re-compiling.

6
General / Static library linking with mingw on windows
« on: March 17, 2010, 06:38:07 am »
Hey guys,

I've been coding with SFML (amazing!!) for a while in Eclipse, on windows XP, with minGW as my compiler.  I'm trying to switch from the dynamic libraries to static, so i replaced my library table:
Code: [Select]
sfml-system
sfml-audio
sfml-window
sfml-graphics

with this:
Code: [Select]
sfml-system-s
sfml-audio-s
sfml-window-s
sfml-graphics-s


However I am now getting many undefined references.  Here is a sample of the first few lines.

Code: [Select]
g++ -orun.exe src\main.o src\Terrain.o src\Static.o src\SoundManager.o src\Scene.o src\Player.o src\ParticleSystem.o src\Level.o src\InputListener.o src\ImageManager.o src\FrameListener.o src\Entity.o src\Editor.o -lsfml-system-s -lsfml-main -lsfml-audio-s -lsfml-window-s -lsfml-graphics-s -llibboost_serialization-mgw34-mt -lSPARK -lSPARK_GL -lSPARK_SFML
/mingw/lib/libsfml-window-s.a(Window.o):Window.cpp:(.text+0x3cb): undefined reference to `sf::Sleep(float)'
/mingw/lib/libsfml-graphics-s.a(RenderWindow.o):RenderWindow.cpp:(.text+0xae5): undefined reference to `glReadPixels@28'
/mingw/lib/libsfml-graphics-s.a(Shape.o):Shape.cpp:(.text+0x6b3): undefined reference to `glDisable@4'


Any ideas?  I dont think the other libraries (boost, SPK) are interfering, the problems all come from SFML libraries.

7
Audio / Real-Time Synthesis?
« on: February 18, 2010, 09:13:46 pm »
I'd prefer to do most of it in SFML, since im familiar with it, but I will definitely check out openframeworks.

A couple days ago I discovered STK (Synthesis Toolkit), but I'm having some trouble compiling it.  There seems to be no community that I can find for it online, but I'll keep working at it.

[EDIT] Actually, it builds fine on my mac, i just tried it.  On windows I get linking errors with some RtAudio/RtMidi objects--though I didn't have to install RtAudio on OSX and it worked.  It seems like the STK src comes with RtAudio, so I dont know why I'm getting this error.

Thanks for the info :)

8
Audio / Real-Time Synthesis?
« on: February 15, 2010, 04:56:22 am »
I'm wondering the exact same thing.  We've created a bunch of using processing/supercollider.

What I'm trying to do is encapsulate this in a smoother more distributable engine, so naturally I'm looking towards rewriting it in C++.  I'm already very familiar with the SFML graphics package but haven't used the audio package beyond playing wav files.  I'm looking for a solution in C++ for real-time synthesis, it doesn't need to be more complex than generation of simple wave forms and low pass filters.

@Sponsz, have you tried doing this in SFML, and if not, have you found any other libraries to be of use?

9
SFML projects / Short n Sweet 2D Space Shooter Action
« on: November 29, 2009, 01:42:48 pm »
This is a great game!   I am very impressed.  I am working on my first SFML game atm as well, also a shooter.  I would love to see your source code and perhaps talk with you, if thats possible.  I am curious mainly about the particle effects--how much direct open gl you are doing and how much SFML is handling it.

My email is trunks7j@gmail.com

Thanks!

10
Graphics / Problem drawing a sprite -- white square
« on: November 14, 2009, 08:14:58 am »
Can you explain the pros/cons of returning a reference in this situation versus a pointer?  I am a little bit confused in these situations and never know which way to go.

11
Graphics / Problem drawing a sprite -- white square
« on: November 13, 2009, 12:13:53 am »
Okay, my problem basically was I had an ImageManager class but it was returning hard Image objects and copying them--now I am returning pointers to images and everything seems to be working just fine.  Thanks guys.

12
Graphics / Problem drawing a sprite -- white square
« on: November 12, 2009, 07:33:54 pm »
Okay that makes some sense.  Hiura, I actually did create an ImageManager class for this exact purpose, but perhaps I am not implementing it correctly.  After class I will post some more complete code.  Thanks for the help guys!

13
Graphics / Problem drawing a sprite -- white square
« on: November 11, 2009, 01:32:19 am »
Actually I am still trying and unfortunately it is still not working.  I bound a key to reload all the images, empty the sprite vector and re-add the sprite, and even if I press this after the window has fully loaded the sprite still appears white.... grrrrr  :evil:

14
Graphics / Problem drawing a sprite -- white square
« on: November 11, 2009, 01:13:07 am »
Idiot.  Should have read more forum posts.  I figured out the answer, although that is quite an odd bug for OSX.

15
Graphics / Problem drawing a sprite -- white square
« on: November 11, 2009, 01:07:26 am »
Just for some background information, I am developing in SFML on Mac OS 10.5 in XCode, and the image I am trying to display is a .png

In my Scene class I have a vector<sf::Sprite> which contains all the sprites for that scene.  I have populated the array with one sprite:
Code: [Select]

sf::Image img1;
img1.LoadFromFile("images/psnail.png");
sf::Sprite spr1;
spr1.SetImage(img1);
spr1.SetPosition(200, 200);
spriteArray->push_back(spr1);


Now, in my main game loop, I ask the scene for its list of sprites, iterating through and drawing them:
Code: [Select]

app.Clear();
// Draw scene's sprites
std::vector<sf::Sprite>* spriteArray = mainScene->getSprites();
for (int i=0; i<spriteArray->size(); i++)
{
app.Draw(spriteArray->at(i));
}
app.Display();


This draws a sprite in the correct location and size: (200,200) and 32x32, however it is only a white box.  What I dont understand is that if I reset the sprites image in the draw loop right before drawing it, it works; ie:
Code: [Select]

for (int i=0; i<spriteArray->size(); i++)
{
      sf::Image img1;
      img1.LoadFromFile("images/psnail.png");
      spriteArray->at(i).SetImage(img1);
      app.Draw(spriteArray->at(i));
}


This draws the sprite correctly.  Anybody have any idea whats going on?  The code is exactly the same in both places--why would the sprite show up as a white block if I set its image before inserting it into the array?[/code]

Pages: [1]