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

Pages: [1]
1
General / Re: Transferring from java to C++
« on: December 09, 2012, 05:50:13 am »
vaironl, I hope you're not reading "The C++ Programming Language". That's a reference book by Bjarne. "Programming: Principles and Practice Using C++" is the better choice.

2
General / Quad Buffering
« on: December 09, 2012, 05:02:24 am »
I'm new to stereoscopy so I hope I make some sense.

I want to implement side-by-side stereoscopy for a project. All I know so far is that I need to create an asymmetric frustum, something like this:



It seems like sf::View should be capable of doing this, but I'm not sure how. I think I should have 2 views that sample from one window?  One is a reference view (just integer coordinates) which points at the center of the window, and a left-eye and right-eye view that is offset in their respective directions from the center view. The problem with that is that it seems a window can only set one other view with setView(...). Or can it do more?

I've been told that for this to work, the api/framework/library that I'll be using - in this case, SFML - needs to support quad buffering (as well as the video card). That would be 2 buffers, front and back, for the left and right views. However, it seems that if I'm just taking samples from one renderwindow, I'll just have to make my draw calls and then display, which is basically quad buffering, is it not? If a window can't set two views at once, then how do you ensure that the left and right buffers for both sides swap at the same time?

edit: I just tested some code and a window cannot set more than one view. So, does SFML support quad buffering or do I have to use OpenGL?

3
General / Re: SFML on Visual Studio 2012
« on: November 29, 2012, 06:54:18 am »
Edit: got things working. Had the wrong dll files with exploiter's recent build.

4
Window / Re: Window won't Render in High Resolutions
« on: November 05, 2012, 06:48:02 am »
Actually though, when I set the resolution to 1920x1080 which is the resolution of my monitor (I'm running dual monitors, one is 1680x1050), it still won't show, even with the 1920x1080 set as the main monitor. Perhaps the resolution is actually a few pixels smaller than Dell advertised.

6
Window / Window won't Render in High Resolutions
« on: November 05, 2012, 06:39:36 am »
RenderWindow window will not display at resolutions like 1920x1200 or 1920x1280. Everything below 1680x1050 works. The window is actually there, but it is like it is invisible. Nowhere to be seen. I know its there because if I hover my mouse over the application in the taskbar, I can actually see the mini-preview of it. However, clicking on it or alt-tabbing to select it has no effect. The window never shows up.

sf::RenderWindow window( sf::VideoMode( 1980, 1020 ), "title" );
        Tmx::Map *map = NULL;

        SFMLConsole console( &window );
        GameMainMenu menu( GameMenu::ILOGO_TMENU, "fonts/US101.ttf",
                32, sf::Color( 0, 0, 0, 255 ), "assets/menu/mainbg.png" );
        initMenu( menu );

        while( window.isOpen() ) {

                sf::Event event;
                while( window.pollEvent( event ) ) {
                        if ( event.type == sf::Event::Closed )
                                window.close();

                        if ( event.type == sf::Event::KeyPressed ) {
                                if ( event.key.code == sf::Keyboard::Tilde ) {
                                        if ( !console.isOpen() )
                                                console.openConsole();
                                        else
                                                console.closeConsole();
                                }

                                if ( event.key.code == sf::Keyboard::Escape )
                                        window.close();
                        }

                        if ( event.type == sf::Event::TextEntered ) {
                                if ( console.isOpen() ) {

                                        console.update( event );
                                }
                        }
                }

                menu.update( &window, event );
               
                if ( console.isOpen() ) {
                        console.drawConsole( &window );
                }

                window.display();
        }

7
General discussions / Re: SFML 2.0 RC
« on: October 16, 2012, 03:39:22 am »
Not sure if this is a bug, but on Linux (Linux Mint), the tilde key doesn't seem to be recognized, but it's fine on Windows using code:

while ( event loop ) {
   if ( event.type == sf::Event::KeyPressed ) {
        if ( event.key.code == sf::Keyboard::Tilde ) {
            //blah
       }
   }
}

8
General / Re: .so files in Linux
« on: October 10, 2012, 08:50:07 am »
Ah! I figured it out. Placed the shared libraries in /usr/local/lib.

I had done that before, but I never executed ldconfig. This must be done or it will not be detected. Got a window up and running. Cool.

9
General / Re: .so files in Linux
« on: October 10, 2012, 08:16:20 am »
That's very clear. Thank you.

Hm, I have Eclipse pointing to the folder where all the .so files are, and I've entered what libraries I needed. Do the .so files till have to be placed in a certain location? I've tried /usr/lib/, /lib/, and /usr/local/lib. None of them seem to work. I get the following error when I try to run the program (building is fine):

error while loading shared libraries: libsfml-window.so.2: cannot open shared object file: No such file or directory

10
General / .so files in Linux
« on: October 09, 2012, 08:32:21 pm »
I'm new to Linux. I was wondering what the differences in .so files are (2.0 RC). There are .so, .so.2, and .so.2.0. I've got Eclipse pointing to the .so files, but I'm getting a warning that in /Debug/ProjectName the sfml-window.so.2 cannot be found.

What are the differences in .so files?

11
Window / Re: How do I get the dimensions of a window?
« on: September 25, 2012, 09:23:47 am »
It's not a global function, but sorta is I suppose. Seems to give access to pointer to a static variable.

I suppose it wouldn't make sense though to have a method like that in SFML since SFML is capable of multiple windows, whereas SDL can only have a single window.

12
Window / Re: How do I get the dimensions of a window?
« on: September 24, 2012, 06:27:47 am »
Thanks. I was thinking SFML had something similar to SDL_GetVideoSurface() but it doesn't so I just passed as a parameter.

13
Window / How do I get the dimensions of a window?
« on: September 23, 2012, 09:56:54 am »
[Using SFML 2.0]
If a function has no access to the current RenderWindow, is it possible to get a handle of the RenderWindow? If not, I'm assuming I must pass a reference to RenderWindow in.

I'm basically trying to create a rectangle shape, initialized in a constructor that is equal to the width of a window and half its height, but I just realized I have no reference to the window, unless I pass it in.

14
General discussions / Problems linking dynamically
« on: March 07, 2011, 08:41:42 pm »
Yes.

15
General discussions / Problems linking dynamically
« on: March 07, 2011, 04:25:23 am »
I've followed tutorials, searched the threads and made changes, recompiled for VS 2010 and so on but I can't make the following error go away:

fatal error LNK1104: cannot open file 'sfml-system-d.lib'

For linker input I've used: sfml-system-d.lib;

I've added SFML_DYNAMIC;

for the preprocessor defintion. I've added all the appropriate paths for the include and library directories. I also have the .dll files in the project directories, even for the DEBUG folder. Haven't done a release build yet.

Static linking works perfectly fine and without errors but I would like to link dynamically. Any suggestions?

EDIT: sorry, this should have been posted in general.

Pages: [1]