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

Pages: 1 2 3 [4] 5 6 ... 9
46
Graphics / App crashes if more than 1 sprite used
« on: August 19, 2009, 03:20:54 am »
what do you mean "crash?" you have no event loop and thus it only draws once then closes.  Though that doesn't explain the process return or anything.

47
Window / Show FPS In Title Bar Window
« on: August 05, 2009, 09:32:55 pm »
Or if you really want to you can get the window handle and change the title yourself...but that would require work.

48
In the code I see a
Code: [Select]
if(fullscreen= !fullscreen)
shouldn't it be
Code: [Select]
if(fullscreen==!fullscreen)
or
Code: [Select]
if(fullscreen!= fullscreen)

or wait, shouldn't it be set to something other than itself? Sorry i didnt do a thorough readthrough, this just popped up at me.

49
Graphics / Dislpaying floats
« on: July 12, 2009, 12:41:32 am »
I think there's an entry in the wiki for this.  But yeah string stream should work well (you can also do a template function to take any stream capable object and insert it into a string).

50
Graphics / SetFramerateLimit problem
« on: July 08, 2009, 08:03:15 pm »
I did a simple test and I got my framerate ~62 using SetFramerateLimit.  With VerticalSync enabled I get from 59-61.

51
Window / Recieving more than one Key at the same time?
« on: July 06, 2009, 04:41:45 am »
Quote

Key events (KeyPressed, KeyReleased)

    * Event.Key.Code contains the code of the key that was pressed / released
    * Event.Key.Alt tells whether or not Alt key is pressed
    * Event.Key.Control tells whether or not Control key is pressed
    * Event.Key.Shift tells whether or not Shift key is pressed

I think you could use Event.Key.Shift to see if Shift is pressed with the key

52
Graphics / Unnecessary redrawing of sprites and shapes?
« on: June 28, 2009, 06:56:56 pm »
What you could do is just draw a rectangle or something around the dynamic sprites (essentially just "clearing" the old position of the sprites) that way you wouldn't have to clear the whole screen (but would have to take into account previous positions, etc.


EDIT: or what you could do is draw the static sprites to an image and then just draw that image over the screen when clearing.

53
General / SFML and Visual Studio 2010 Beta 1 (Visual C++ 10 only)
« on: June 25, 2009, 09:45:40 pm »
Well I tried statically linking the CRT but it broke everything.  In the end I figured out that especially when using 3rd party libraries on visual studio you have to use dynamically linked CRT.  Or atleast that's how it is for me.

54
General / SFML and Visual Studio 2010 Beta 1 (Visual C++ 10 only)
« on: June 25, 2009, 08:50:48 pm »
I tried code::blocks and I didn't really like it.  The intelisense (or code completion in this case) never worked properly (and in some Visual Studio instances it also didnt work,) but in VS2010 it worked like a charm (and didnt have that lag that occured with VS2008).  Moving from VS to Code::Blocks takes some effort (I'm used to setting up and debugging on VS) but I'm sure if I worked with Code::Blocks long enough I'd grow to like it.

However, I was wondering, if I used code::blocks and GCC, would I need any crt dlls like I do with VS (meaning, could I truely statically link everything (other than openal i guess))?

55
General / SFML and Visual Studio 2010 Beta 1 (Visual C++ 10 only)
« on: June 25, 2009, 06:08:29 pm »
Awesome! the first time I opened VS2010 i was like wtf? but since I used a vs2008 project I didnt have to mess with the settings...but now I know how (if I want to make a new project)

56
Graphics / window::SetBackgroundColor -> where is it?
« on: June 23, 2009, 02:09:51 am »
use RenderWindow.Clear(sf::Color)

57
Graphics / SFML 2.0 Drawing doesn't work
« on: June 14, 2009, 07:59:56 pm »
Hmm that's stupid... ah well I guess using extensions still work.  Thanks for fixing it so quickly!

58
Graphics / SFML 2.0 Drawing doesn't work
« on: June 14, 2009, 08:59:57 am »
Ah, yeah it works flawlessly now.  Is there a way to update the headers?

59
Graphics / SFML 2.0 Drawing doesn't work
« on: June 14, 2009, 08:38:43 am »
Okay, I tried that and, just like using the image, if I put the code
Code: [Select]
std::cout<<sf::PostFX::CanUsePostFX()<<std::endl;
it works (and returns 1).  If I comment out the code then it doesn't work.  Could there be a setting that isn't set unless some (other) graphical command is called (like creating an Image or asking if PostFX is available)?

60
Graphics / SFML 2.0 Drawing doesn't work
« on: June 14, 2009, 08:19:51 am »
If I set the blend mode to None it works perfectly.  Also if I use a custom View it seems to work well.  
The problem seems to be at this point:
Code: [Select]

 switch (myBlendMode)
        {
            case Blend::Alpha :
                GLCheck(glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
                break;
            case Blend::Add :
                GLCheck(glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
                break;
            case Blend::Multiply :
                GLCheck(glBlendFuncSeparate(GL_DST_COLOR, GL_ZERO, GL_ONE, GL_ONE_MINUS_SRC_ALPHA));
                break;
            default :
                break;
        }

But again if I use a custom view it works fine.  Without a custom view only None seems to work.  

I'm using revision 1139, OS is Windows 7, GPU is nvidia 800GTS.

EDIT: Okay, this is really weird, it works if I have sprites in the code somewhere (even if I don't draw them) but doesn't work if I edit an existing piece of code to match the change...

EDIT AGAIN: if I add:
Code: [Select]

sf::Image Image;
if(!Image.LoadFromFile("Ship.png"))
return 1;

to the code after I create the Rect, it works, I remove this piece of code and it breaks.  I tried to see if putting any code would work (an empty for loop, a cout/cin statement, etc) but only using the Image does it somehow do something to make it work[/code]

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