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

Pages: [1] 2
1
SFML projects / Re: SFML Light System - Let There Be Light
« on: May 01, 2013, 02:39:33 pm »
Has anyone out there ever managed to get LTBL to work without convex hulls and instead with line segments? I'm just curious if this is possible as I use box2d with Chain shapes as my level terrain collision.

2
Graphics / Re: SetDrawingBounds help
« on: May 17, 2012, 08:19:16 pm »
Not well enough I suppose. I just assumed and made myself look like an idiot.
Correct use of viewport here:
http://sfml-dev.org/documentation/2.0/classsf_1_1View.php#a8eaec46b7d332fe834f016d0187d4b4a

 Sorry for the bad info..

3
Graphics / Re: SetDrawingBounds help
« on: May 17, 2012, 06:53:52 pm »
really? Sorry I think my noobishness is showing but how do the two differ?
I looked like he was using the floatrect of the view as the drawing bounds. so...

Wouldn't this:
sf::view mView;
level.SetDrawingBounds(mView.getviewport());

be the same as reconstructing the rectangle using center and size, except less code?


4
Graphics / Re: SetDrawingBounds help
« on: May 17, 2012, 03:42:40 am »
I dont know about the first part not sure how your level class is implemented but the GetRect() function in sf::view has been changed to getviewport(). this will return a floatrect same as GetRect(). Although I think that might have been modified too. I think in sfml 1.6 a floatrect contained a 'right' and a 'bottom' member.

5
Graphics / Re: sf::view.zoom() sync with framerate...
« on: May 08, 2012, 01:16:01 am »
Yes that is exactly what I found. With a framerate of 1000 fps I would have a very slow zoom speed when I multiplied my zoom factor by the delta time. At 60 fps it would look normal. However the strange thing is that it works just fine on either framerate if i just put in my zoom factor.  Maybe there is a slight difference but I cant notice any. I must say I dont completely understand the math behind why it appears the same but it does...

6
Graphics / Re: sf::view.zoom() sync with framerate...
« on: May 07, 2012, 06:42:07 am »
 ::)... another case of overthinking a simple problem. You dont need to multiply by frametime at all. It will zoom consistently with a factor (aka percentage) alone. Man I need to reread what I write before hitting submit next time.

7
Graphics / sf::view.zoom() sync with framerate...
« on: May 07, 2012, 06:34:03 am »
Anyone have a suggestion as how to do this? Similar to how you would keep a sprite moving at constistent speed independent of frametime. I'm trying something like this...

Code: [Select]
///CAMERA CONTROLS (main app update loop)
if (IsKeyDown[sf::Keyboard::Subtract])      mCamera.ZoomOut();


///Camera Class
Camera::ZoomOut(){
    mview.zoom(1 + mApp->GetFrameTime());
}

This wont quite cut it though. If the framerate is 1000 fps the factor is 1.001 or100.1% of original viewport size.
If it is 60 fps it is 101%.

Since a higher framerate means ZoomOut() gets called more often I was thinking that It would naturally appear to zoom at the same speed but It seems thats not the case.

So basically I'm not sure what kind of math to use here to get a consistent zoom factor across different framerates and my brain is hurting a little bit. Any thoughts?


8
General discussions / Re: SFML 2.0 Disable Screensaver
« on: April 17, 2012, 02:50:49 am »
You cant disable it with SFML like OniLinkPlus said but maybe you could use sf::mouse::SetPosition() every few seconds.just move it by like a pixel from its current position or something so it doesn't look weird. Not 100% sure if it would work and pretty hacky but if you plan on just having the program run without user input for an extended period of time it might not be a big deal

9
General discussions / Re: SFML 2.0 RC
« on: April 16, 2012, 11:31:04 pm »
You were correct Laurent. Apparently my drivers were not installed correctly so I was stuck with Opengl 1.1. I reinstalled my video drivers and I now have OpenGL 3.3. Error messages gone life is good. Sorry for the false alarm.

10
General discussions / Re: SFML 2.0 RC
« on: April 16, 2012, 02:23:36 pm »
I highly doubt it. Its an Nvidia Geforce Card (cant remember the model off the top of my head) thats only a a few years old. It will run just about any game I've thrown at it pretty well. I updated the drivers a couple months ago too. I will post the exact specs and version numbers later today when I get home. (I'll try running off the onboard graphics card as well)

11
General discussions / Re: SFML 2.0 RC
« on: April 16, 2012, 06:50:35 am »
I know there has been an issue with the sf::text constructor and the default font recently. Just downloaded the latest SFML release version (SFML-2.0-rc, debug libs, dynamic link) with codeblocks 10.05, Windows 7 and I get this error output to the console:

It repeats these two errors a total of 3 times...
Code: [Select]
An internal OpenGL call failed in Texture.cpp (146) : GL_INVALID_ENUM, an unacceptable value has been specified for an enumerated argument.
An internal OpenGL call failed in Texture.cpp (147) : GL_INVALID_ENUM, an unacceptable value has been specified for an enumerated argument.


Heres my code:
Code: [Select]
sf::Font mFont;
mFont.loadFromFile("fonts/arial.ttf");
sf::Text mText("Hello",mFont);

Its only when I initialize the sf::text or set the string it produces these errors. It will still draw and display correctly though. Just thought it might mean something.

Ps: love the new forum layout.

12
General / SFML 2.0 : Missing DLL's
« on: January 20, 2012, 03:42:08 am »
ah yes I see it right there. It was indeed set to shared. Thank you for the tip!

13
General / SFML 2.0 : Missing DLL's
« on: January 19, 2012, 04:19:07 am »
alright no more working when I'm tired....
It cant find the dll so you link against the libs and put the dlls IN THE FOLDER...
I know I know it makes no sense right ... (facepalm)
..Please disregard..

14
General / SFML 2.0 : Missing DLL's
« on: January 19, 2012, 03:51:09 am »
sorry if this has been asked before as I'm sure it may have been, but I could not find anything.

Before I upgraded to 2.0 from 1.6 I was linking against the static libs which had a -s suffix ("libsfml-graphics-s.a" I believe) because if I tried any other way I would get this same problem and it just seemed easier. I'm now linking with the 2.0 libs which dont have the '-s' in the filename. I can get my project to compile but it says I'm missing the dlls.

Should I be linking with the DLL's until this version is finalized? Or am I missing something else?

15
Graphics / Create a line segment shape in sfml 2.0?
« on: January 18, 2012, 03:25:23 am »
Ok so I think I found it. (sorry for spamming) I think a vertex array is what I'm looking for... Which I suppose is more suitable than a line segment class. I didn't realize it inherited from sf::drawable. I assumed it was just some sort of data type :)

Pages: [1] 2
anything