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

Pages: 1 [2] 3 4 ... 6
16
General / How to link to SFML 2.0 statically
« on: October 27, 2011, 06:16:36 pm »
Hi Hiura, Thanks for the replies.

However, if I am not using xcode, how do I link it?

After running CMake, I only have the libsfml-XXXX.a files installed in the directory which i specified.

Is there a sfml framework or something which i have to include?

I am compiling via the command line using gcc 4.6.1

regards

17
General / How to link to SFML 2.0 statically
« on: October 26, 2011, 09:20:11 am »
As I am not distributing my library as a framework or bundle, but just as a dylib file (a bundle/framework is too much for me now), hence if I am to link statically, what other dependencies do i need to include?

regards

18
General / How to link to SFML 2.0 statically
« on: October 26, 2011, 08:34:23 am »
But if I don't static link in OS X, wouldn't I have to install or distribute the sfml libraries along with it?

I am build another library that uses SFML as the backend, and if I link to sfml dynamically, wouldn't I need to release the SFML library along with my library?

regards

19
General / How to link to SFML 2.0 statically
« on: October 26, 2011, 07:20:08 am »
Hi I tried linking the code to the sfml static libs but I am still getting a lot of undefined symbols. Am I forgetting to include any libraries or something?

Code: [Select]

g++ -DSFML_STATIC -c -fmessage-length=0 -DDEBUG -O0 -g3 -gdwarf-2 -I/SDKs/Sfml.sdk/sfml-01254d4/include/ -Wall -Wno-missing-braces main.cpp -o debug/main.o

g++ -DSFML_STATIC -c -fmessage-length=0 -DDEBUG -O0 -g3 -gdwarf-2 -I/SDKs/Sfml.sdk/sfml-01254d4/include/ -Wall -Wno-missing-braces -MM -MP -MT debug/main.o main.cpp -o debug/main.d

g++ -framework OpenGL -framework Cocoa -gdwarf-2  -L/SDKs/Sfml.sdk/sfml-01254d4/lib/ -o debug/sfml-test-d debug/main.o -lsfml-graphics-s -lsfml-window-s -lsfml-system-s

Undefined symbols for architecture x86_64:
  "_LMGetKbdType", referenced from:
      sf::priv::HIDInputManager::LoadKey(__IOHIDElement*)     in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDElementGetUsagePage", referenced from:
      sf::priv::HIDInputManager::LoadMouse(__IOHIDDevice*)     in libsfml-window-s.a(HIDInputManager.mm.o)
      sf::priv::HIDInputManager::LoadKeyboard(__IOHIDDevice*)      in libsfml-window-s.a(HIDInputManager.mm.o)
  "_TISCopyCurrentKeyboardLayoutInputSource", referenced from:
      sf::priv::HIDInputManager::HIDInputManager()in libsfml-window-s.a(HIDInputManager.mm.o)
  "_kTISPropertyUnicodeKeyLayoutData", referenced from:
      sf::priv::HIDInputManager::HIDInputManager()in libsfml-window-s.a(HIDInputManager.mm.o)
  "_TISGetInputSourceProperty", referenced from:
      sf::priv::HIDInputManager::HIDInputManager()in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDDeviceGetProperty", referenced from:
      sf::priv::HIDInputManager::GetLocationID(__IOHIDDevice*)      in libsfml-window-s.a(HIDInputManager.mm.o)
  "_IOHIDManagerCreate", referenced from:
      sf::priv::HIDJoystickManager::GetInstance()     in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager()in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDJoystickManager::HIDJoystickManager()in libsfml-window-s.a(HIDJoystickManager.cpp.o)
      sf::priv::HIDInputManager::HIDInputManager()in libsfml-window-s.a(HIDInputManager.mm.o)

.... and more of it

20
Graphics / How do I display a variable?
« on: July 12, 2011, 11:25:31 am »
Maybe the OP tried to do this:

Code: [Select]

...
...
sf::Text text( str(MakeString() << window.GetInput().GetMouseX() << " " << window.GetInput().GetMouseY() ) );
...
...


which wouldn't work, and would probably get the "error C3861: 'str': identifier not found"

:)

21
Graphics / Lighty font !! :D
« on: July 10, 2011, 05:34:10 pm »
I think it would be easier to just have a rollover imagew for each button :)

regards

22
Graphics / uniform struct not working
« on: July 10, 2011, 05:19:51 pm »
hi i think you can't write the uniform qualifier when declaring the struct.

i think this would work:
Code: [Select]

struct SomeStruct
{
    float t[800];
    float n;
};

uniform SomeStruct text;


What is the problem you are trying to solve that need 2D/3D arrays? Maybe there is a alternative to it??

regards

23
System / Thread Memory Model
« on: June 28, 2011, 05:45:28 am »
The volatile keyword in C++ doesn't really solve all problems related to multithreading. You will end up marking everything volatile which probably slow your code more instead.

I suggest using a memory barrier or fence instead.

Are you using gcc or msvc?

if you are using gcc then from gcc 4.6 and above there is the <atomic> header which when writing or reading you can specify a release or acquire schematic. This works just like a release/acquire lock. IIRC when you do a acquire mode read/write, no instructions after that read/write can be reorder above it, however instructions before the read/write can be reorder below it.
The release mode works the opposite. It prevents compiler from reordering instruction after the call.

Think of it as acquire lock, do work, release lock.

msvc has all the interlock functions which can serve as a full memory barrier or a release/acquire barrier which is similar to <atomic>

btw <atomic> is a C++0x std header.

regards

24
Window / [SFML2][OSX] Create another window after closing the first
« on: May 15, 2011, 01:23:56 pm »
cool thanks :)

25
Window / [SFML2][OSX] Create another window after closing the first
« on: May 15, 2011, 12:53:53 pm »
hi, i was just wondering if is there a fix or a workaround for this problem?

regards

26
Window / When is the global shared context created??
« on: May 13, 2011, 09:06:00 am »
for sfml2 :D

oh i was wondering say in the main thread if the global context is already created then i can create buffers etc and other opengl resource cache.

If not I would either create a sf::Context to do it which leads me to ask, would my created resources stay alive after the sf::Context dies??

Code: [Select]

void SetupResourceCache()
{
    sf::Context temp_context;
    create opengl buffer
    create opengl texture
}


would my buffer and textures resources stay valid after the function?? I would be terribly happy if it does :D

regards

27
Window / When is the global shared context created??
« on: May 13, 2011, 08:53:27 am »
Hi, does sfml creates a global context for sharing. When is this global context created? Is it created when a sf::Window is created?

e.g

Code: [Select]

On first create of sf::Window
    create shared global context
    create render context and share with the global context


regards

28
Window / [SOLVED]I've screwed up my depth buffer :S
« on: May 06, 2011, 11:03:17 pm »
for lighting the most commonly use one is the phong lighting model. It can be done without shader or any postprocessing.

Opengl can enable lighting on the fixed function pipeline via glEnable(GL_LIGHTING);

then you enable and disable specific lights via glEnable(GL_LIGHTn) where n can go from 0 to about 8 normally :D

the you have to specify the light params via glLightfv or their family of functions

Code: [Select]

GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };
glLightfv(GL_LIGHT0, GL_POSITION, light_position);


lastly what determines the color and lighting for each set of faces is the material. The material governs how the light interact with the surfaces

Code: [Select]

glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
//draw the vertices here


basically thats how light works for opengl in the fixed function pipeline.

Personally to me, it is much easier to just use shaders :D

regards

29
Window / [SOLVED]I've screwed up my depth buffer :S
« on: May 06, 2011, 10:46:17 pm »
Quote

Instance-Model, polygon mesh, Oct-Tree... Hmm What else is there left for me to explore? Maybe missed something?


scene graph?? maybe sorting of the state within the scene graph to improve efficiency?? or maybe a generic postprocessing framework for effects?? :D

regards

30
Window / [SOLVED]I've screwed up my depth buffer :S
« on: May 06, 2011, 10:44:14 pm »
Quote

Lolz we both realized it ^^


haha.

p.s btw for your back cube face, I think you would need to respecify another set of vertices instead of just translating the existing vertices, if not you might not see anything when you rotate your viewpoint to the back of the cube. :p

regards

Pages: 1 [2] 3 4 ... 6
anything