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 - general sirhc

Pages: [1] 2
1
Graphics / Simple static 2d shadows
« on: August 18, 2010, 03:21:48 pm »
Well since I am converting my project from GML to C++ basically everywhere that has draw_clear_alpha(c_black,0) now becomes draw_clear_alpha(c_white,0)

Which is about 4 lines :P

(Yes I want to hit me too, so feel free to get in line haha)

There is also some other stuff so it would be more like a total of 10 lines

2
Graphics / Simple static 2d shadows
« on: August 18, 2010, 02:34:44 pm »
Neither

So I chose to do in between, I half discussed it and I half care

My point of view is that having it would make my life easier.

3
Graphics / Simple static 2d shadows
« on: August 18, 2010, 01:14:46 pm »
Id argue but you already won. Well hopefully that day comes soon that someone really needs it.

4
Graphics / Simple static 2d shadows
« on: August 18, 2010, 12:37:48 pm »
Personally I think its necessary, maybe you should do a poll of what the users think, blend modes are an important part of graphics rendering

5
Graphics / Simple static 2d shadows
« on: August 18, 2010, 11:10:29 am »
Blendmodes are not my strong point so I hope you don't mind me quoting the GM manual here.

Quote
Besides the normal mode it is possible to indicate that the new color must be added to the existing color or subtracted from the existing color. This can be used to create e.g. spot lights or shadows.


Basically with subtract black takes nothing off the color already drawn and white would take all the color. So if you draw 128,128,128 color with subtract blend mode what ever it was drawn over would be darkened by half.

Also again from the book of GM it would be much better to simply have a second command which is for advanced users.

SetBlendMode(blend mode)
SetBlendModeAdv(source blend,destination blend)
Or a different naming scheme
SetBlendModeExt(source blend,destination blend)

Either way it allows basic users to keep using the simply blend modes and advanced users to use the more advanced version... Although I think it would be for intermediate users not advanced since I probably can do this through openGL how things are now instead, couldn't I?

6
Graphics / Simple static 2d shadows
« on: August 18, 2010, 10:41:33 am »
subtract: Because its an important on for doing shadows

There is also
add
max
one
zero

But I personally have no use for them at the moment

Why can't you add custom blend modes?

7
Graphics / Simple static 2d shadows
« on: August 18, 2010, 08:34:00 am »
Laurent I can't help it if you have a tendency of being right all the time.

Although I still think it would be nice if it had the 4 arguments in the documentation just so it was nice and clear for dumb dumbs =)

Btw do you plan on adding more blend modes or custom blend modes? Either would be very nice =)

8
Graphics / Simple static 2d shadows
« on: August 18, 2010, 07:40:30 am »
Oh I getcha, well it would be nice if it was

clear(0,0,0,255) for the default in the documentation, I was confused for a while about it

9
Graphics / Simple static 2d shadows
« on: August 18, 2010, 07:15:44 am »
Quote from: "OniLink10"
Quote from: "general sirhc"
Well the documentation says that clear only supports R G B and not A
No it doesn't.



Quote

Public Member Functions
    RenderImage ()
    Default constructor.
virtual    ~RenderImage ()
    Destructor.
...
...
...
void    Clear (const Color &color=Color(0, 0, 0))
    Clear the entire target with a single color.


Yes it does

10
Graphics / Simple static 2d shadows
« on: August 18, 2010, 12:56:49 am »
Well the documentation says that clear only supports R G B and not A

11
Graphics / Won't Display Polygon
« on: August 17, 2010, 04:01:10 pm »
or a couple of if statements =)

if (points==1)
draw_rectangle of 1pixel
if (points==2)
draw a line
if (points>2)
draw polygon

12
Graphics / Simple static 2d shadows
« on: August 17, 2010, 02:44:11 pm »
Okay so I got everything working with the views, I was doing some bad maths that was screwing it up. However I finally managed to find something that isn't my fault (at least I don't think it is)

In the documentation you say

Quote
Clear (const Color &color=Color(0, 0, 0))
Clear the entire target with a single color.


However I made a RenderImage and just because I am a persistant bastard I decided I would put

Quote
image.Clear(sf::Color(0,0,0,0));


And to my surprise it worked... The RenderImage was invisible and the stuff I drew on it wasn't! I tried different background colors just in case I had white on white but I am pretty confident its not me. If I am right about this we will both be very happy =)

(Sorry if I didn't make sense, im excited about RenderImage's having alpha support!)

13
Graphics / Simple static 2d shadows
« on: August 11, 2010, 05:21:28 pm »
Hehe woops =p

Yeah it probably isn't worth the effort.

Btw I fixed my other problem and it compiles and runs and the login screen is fine and everything is drawn as normal (however this bit doesn't have views yet) After the login screen it starts using views, so I am using view.SetCenter but the screen is just black, im not sure if its something I'm doing or what, however I just realised I have some HUD which are always drawn no matter where the view is so the HUD should be getting drawn but its not, any ideas?

14
Graphics / Simple static 2d shadows
« on: August 11, 2010, 04:38:38 pm »
Never mind, it couldn't find the files because when they're compiled by the SFML 2.0 stuff they get put into a mingw folder inside the lib folder and that was the problem cause I was searching in the lib folder and not the mingw folder

Btw I added some more things to my list

15
Graphics / Simple static 2d shadows
« on: August 11, 2010, 02:33:47 pm »
Wow you're so helpful =) Definitely the best forum admin I have ever seen =)

Thanks so much and I don't know if it is helpful but here is my current list of things that I needed to changed from 1.6 -> 2.0

    [-]Image() default constructor doesn't take width, height and color arguments anymore instead you have to use create after making the image.
    [-]To get the height and width of a float rect you just use .height or .width instead of GetHeight or GetWidth
    [-]SetText is now SetString
    [-]SetCenter is now SetOrigin
    [-]SetSize is now SetCharacterSize
    [-]GetCharacterSize has been removed because you can set font size in the text object
    [-]SetFromRect for views is now SetViewport
    [-]SocketTCP is not TcpSocket (Note the capitals it is case sensitive)
    [-]Connect(port,IP) is now Connect(IP,port,timeout)
    [-]Close() for networking is now Disconnect()


If you would like I will continue editting this post with all the things I had to change in my project <Not really sure if its useful to you>

EDIT:
Thanks for the clarification on SetCenters replacement

Pages: [1] 2