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

Pages: [1]
1
Graphics / Attempting to set shape color to blue gives black
« on: July 26, 2010, 09:14:43 am »
Quote from: "Laurent"
The color that you pass to the Shape::Circle function is assigned to the shape's points. This is not the global shape color (inherited from sf::Drawable), these two are separate and modulated when the shape is drawn. So you should leave the shape's points with a white color, and play only with the global color (SetColor).


OK, thanks for the clarification. It's a bit confusing because the Circle constructor's color argument is just described as "Color used to fill the circle" in the docs.

2
Graphics / Attempting to set shape color to blue gives black
« on: July 26, 2010, 08:04:38 am »
I can set the background displayed to blue just fine using Clear(sf::Color(0,0,255)).

I'm trying to set a shape's color to blue by using the Shape::SetColor method as follows:

Code: [Select]
crit.getShape().SetColor(sf::Color(0,0,255));

crit is an object that has a sf::Shape member variable, accessed by the following function:
Code: [Select]
sf::Shape& Critter::getShape()
{
return shape;
}


and shape is instantiated in the object's constructor as follows:
Code: [Select]
shape = sf::Shape::Circle(0, 0, 15, sf::Color(128, 128, 0, 255));

When I try to set the shape's color to blue, it yields a black circle. If I set it to (0,0,255,123) it yields a grey circle when viewed against a white background.

Is there some blending mode of the Shape that is interfering with my attempt?

(255,0,0) yields red     :)
(0,255,0) yields green :)
(0,0,255) yields black  :?:
(255,255,0) and (255,255,0) both yield yellow  :!:
This seems to indicate to me there's some sort of masking going on that is ignoring blue component, but i have no idea where to look for this

3
General / Trouble Installing with CodeBlocks (Ubuntu)
« on: July 01, 2010, 07:38:58 am »
OK, I added /usr/local/lib to my linker path, and now it finds the files but I'm getting the following error:

Code: [Select]
/usr/local/lib/libsfml-system.so||undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'|
||=== Build finished: 1 errors, 0 warnings ===|


After some research, it's the same problem as this thread: http://www.sfml-dev.org/forum/viewtopic.php?p=16938&sid=5dd7c587fe67abc9337e3e9766620590 from a few months ago.

Reinstalling with apt-get install --reinstall libstdc++6 did not work.

Is there anything else I can do?

4
General / Trouble Installing with CodeBlocks (Ubuntu)
« on: July 01, 2010, 06:41:15 am »
I'm having trouble getting SFML up and running using CodeBlocks under Linux. I'm not entirely sure which tutorial I should be following (CodeBlocks of Linux), so I've done most of the things that are recommended in both.


1. Project->Build Options->Search directories->compiler contains the relative path to the include folder of the Linux version, while ->linker contains relative path to the lib folder

2. I did a "sudo make install" from the SFML-1.6 folder, which seemed successful.

After this, I tried running the test program. I got complaints about lack of definitions, which I expected  because I did not have the additional libraries linked. SO I tried to do that.

3. Project->Build Options->Linker settings -> other linker options, I added sfml-system. This is where I'm suck.
Code: [Select]

-------------- Build: Debug in RollerFuck ---------------

Linking console executable: bin/Debug/RollerFuck
g++: sfml-system: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)


I'm not quite sure where to go from here.

Pages: [1]