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

Pages: [1]
1
Graphics / Re: SFML [2.0] Lot of images in one file
« on: November 17, 2012, 06:19:18 pm »
I have a computer program, which loading lot of images from file and use them to create a map to game. I save all map information except images. I want to save them with everything in one file.

2
Graphics / SFML [2.0] Lot of images in one file
« on: November 17, 2012, 05:41:48 pm »
Can I save a lot of images in one file?

3
Graphics / Okno.Capture() - it takes too much time
« on: January 26, 2012, 05:31:14 pm »
How to use a shader? Can you give me example?

4
Graphics / Okno.Capture() - it takes too much time
« on: January 25, 2012, 07:40:21 pm »
Hi! I did gray-scale effect in SFML 1.6, but it works too slowly (half second).
Here is the code:
Code: [Select]
void odcien::zrob_obraz(unsigned int x1,unsigned int y1,unsigned int szerokosc,unsigned int wysokosc, RenderWindow & Okno_) {
Okno = &Okno_;
czy_okno = true;
m = Okno_.Capture();
Color stary;
for(int i=y1;i<wysokosc;i++) {
for(int ii=x1;ii<szerokosc;ii++) {
stary = m.GetPixel(ii,i);
int ile = (stary.r + stary.g + stary.b)/3;
if(ile==0)
ile = 1;
m.SetPixel(ii,i,Color(ile * w_r,ile * w_g,ile * w_b));
}
}
sprajt.SetImage(m);
sprajt.SetSubRect(IntRect(x1,y1,x1 + szerokosc, y1 + wysokosc));
sprajt.SetPosition(x1,y1);
Okno_.Draw(sprajt);
Okno_.Display();
}


Problem is a function: Okno.Capture() - it takes 0.4 second!

Class RenderWindow hasn't function SetPixel(). What can I do to make this algorithm run faster?

5
Window / TextBox from WinAPI
« on: July 16, 2011, 09:17:34 pm »
Thank you. I will read this tutorial tommorow.

6
Window / TextBox from WinAPI
« on: July 15, 2011, 11:27:05 pm »
Hi! I have problem, because I want TextBox from WinAPI in my SFML project and It's hard for me. Should I create main window in WinAPI or in SFML?

Pages: [1]
anything