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

Pages: [1] 2 3 ... 5
1
General / Make some sfml objects as static
« on: December 01, 2010, 12:31:38 am »
Always post error messages, "i get some erros" is not very helpful.
I'm assuming you're getting linker errors.
I think you want something like this:
Code: [Select]

//GameObjects.hpp
class GameObjects
{

private:
  static sf::RenderWindow myApp;
};
//GameObjects.cpp
sf::RenderWindow GameObjects::myApp(sf::VideoMode(800, 600, 32), "SFML Graphics");

2
Graphics / C++ writing out pictures from an array
« on: January 28, 2009, 11:07:41 am »
:chuckles:
I can see how he could get confused though.
I always though sf::String should be sf::Text or something so it wouldn't be confused with a std::string like object.

Anyways, I believe what you're looking for Jamie is sf::String, not std::string.

3
Network / Alternative to whatismyip.org
« on: January 25, 2009, 10:57:15 am »
I just thought I'd add another alternative in case anyone needs one:
http://www.showmyip.com/simple

4
General / 1st Demo Using SFML - Only Get Console Window - HELP
« on: January 23, 2009, 05:14:55 am »
Oh yeah. I wasn't very awake when I wrote all that...

5
Window / Re: Multiple keys pressed
« on: January 21, 2009, 01:18:53 pm »
Post more of the code if you can.
If I had to guess I'd say you're making a simple logic mistake.
Step through with a debugger if you can.

6
General / Re: 1st Demo Using SFML - Only Get Console Window - HELP
« on: January 21, 2009, 01:11:12 pm »
I don't see anything really wrong with your code.
Although, I'm not sure this is doing what you think it is:
Quote from: "JeZ-l-Lee"

Code: [Select]

     // Start the game loop
     while (App.IsOpened())


See here
I think IsOpened will only return false when the window has not been created.
I would recommend something like this:
Code: [Select]

bool Done = false;
while (!Done)
{
    //Render...
}


Quote from: "JeZ-l-Lee"

Code: [Select]
-------------- Build: Debug in SFML_Beginning ---------------

Compiling: main.cpp
Linking console executable: bin\Debug\SFML_Beginning.exe
Info: resolving sf::Font::ourDefaultCharset      by linking to __imp___ZN2sf4Font17ourDefaultCharsetE (auto-import)
Info: resolving vtable for sf::Spriteby linking to __imp___ZTVN2sf6SpriteE (auto-import)
Info: resolving vtable for sf::Stringby linking to __imp___ZTVN2sf6StringE (auto-import)
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
Output size is 67.00 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 1 warnings


This is what concerns me.
I've never seen these auto-import messages.
I'm wondering if you're using SFML DLLs and not defining SFML_DYNAMIC.
Is that it?

7
Graphics / Image::CopyScreen
« on: January 12, 2009, 08:10:57 pm »
Ah I see it.
Seems like it wasn't there last time I checked.
Oh well.

8
Graphics / Image::CopyScreen
« on: January 12, 2009, 06:56:56 pm »
Image::CopyScreen appears to still be flipped in SFML 1.4.

I only tested by saving to a png.

I'm using RenderWindow::Capture now instead.

9
Graphics / Image::Copy
« on: January 03, 2009, 10:41:20 pm »
I can't seem to produce a working example outside of some sfttf code.

I'll have to investigate it a little more.
I'm tired of it today, so maybe tomorrow.  :P

10
Graphics / Image::Copy
« on: January 03, 2009, 04:36:11 pm »
Using sf::Image::Copy (or LoadFromPixels w/GetPixelsPtr) I keep getting a single white pixel in the bottom-right corner of the destination image.

Code: [Select]

sf::Image sourceImage;
... (load image, etc)
sf::Image destImage;
destImage.Create(sourceImage.GetWidth(), sourceImage.GetHeight());
destImage.Copy(sourceImage, 0, 0);

So here destImage would look just like sourceImage, except it would have a white pixel in the bottom-right corner.

This doesn't seem to happen every time, but often it does.
I'm using the latest SVN.
I can post more info later if needed.

11
SFML projects / sfttf - truetype scalable fonts in SFML
« on: January 02, 2009, 11:35:46 pm »
Quote from: "dabo"
Quote from: "dewyatt"
They are drawn separately.
The filled layer is drawn on the bottom, the outline on top.


What if you reverse the order?

You'd get pretty much the same results, I already tested it.

12
SFML projects / sfttf - truetype scalable fonts in SFML
« on: January 02, 2009, 05:14:14 pm »
Quote from: "dabo"
How is it drawn on screen? is the fill color and outline color drawn at the same time or are they like separate "layers"?

I don't know much of this nor the terms used :)

They are drawn separately.
The filled layer is drawn on the bottom, the outline on top.

I'm thinking maybe I can use the filled character to create the outline character and xor it so it is only on the 'outside'.

13
SFML projects / sfttf - truetype scalable fonts in SFML
« on: January 02, 2009, 03:24:59 pm »
It's looking like outlines need a minimum size of around 30-34 with the fonts I tested.
The ftview freetype demo program is the same way.

I don't think there's really an easy way around this.

It seems the outline is rendered more in the 'middle' than the outside.

14
SFML projects / sfttf - truetype scalable fonts in SFML
« on: January 02, 2009, 02:04:42 pm »
Quote from: "dabo"
Thanks a lot!

However in order to compile the source I had to do the following:

Move this to Glyph.hpp from Glyph.cpp:
Code: [Select]
#include <SFML/Graphics/RenderWindow.hpp>

Thanks, not sure why my compiler didn't complain about that.  :oops:

Quote from: "dabo"

...and change row 301 in Font.cpp from:
Code: [Select]
if (0 != FT_Stroker_New(myFreeType, &myStroker))
to:
Code: [Select]
if (0 != FT_Stroker_New(reinterpret_cast<FT_Memory>(myFreeType), &myStroker))

Sorry! I forgot about this!
I posted a feature request here:
http://www.sfml-dev.org/forum/viewtopic.php?t=841
I'm using a newer version of FreeType.
I'll switch it back to the older version and add the reinterpret_cast.

This also made me realize I wasn't calling FT_Stroker_Done too.
So thanks!
Quote from: "dabo"

Also, is the outline drawn on the inside of the character? because using small font sizes the only thing you can see is the outline color. I tried using font size 20 and outline size 1 and the only thing I could see was the white outline.

Yes, this could be a problem.
This is something I'll be looking into.
I'm not really sure how to do this right now.
The whole stroker/outline API in FreeType is a bit confusing to me unfortunately.

15
Feature requests / Upgrade to freetype 2.3.7
« on: December 31, 2008, 09:27:59 pm »
Ok!
I went ahead and released it here:
http://www.sfml-dev.org/forum/viewtopic.php?p=5562

Pages: [1] 2 3 ... 5