loading png files

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
somename
Posts: 9
Joined: March 13th, 2013, 6:34 am

loading png files

Post by somename » March 13th, 2013, 6:38 am

well, i am using this tutorials to build a game and i found a problem that i need a transperancy.
i searched the web and found out that PNG have transperancy while bmp is not supporting it.
i am talking about alpha blending.
anyone can give me a code to generate png files?

Musi
Posts: 106
Joined: November 25th, 2012, 1:06 am

Re: loading png files

Post by Musi » March 13th, 2013, 8:15 pm

If you get to intermediate lesson 2 Chili shows you how to load a png using GDI and also writes a function to draw transparent sprites.
Musi

There are 10 types of people that understand binary.
Those that do, and those that don't.

ghilllie
Posts: 72
Joined: May 2nd, 2012, 3:25 am

Re: loading png files

Post by ghilllie » March 14th, 2013, 10:22 am

Try to understand the scripts inside the downloadable file in this topic

Loading Png's, jpg's, bmp's, dds's etc. files
Chili++ for President :)

somename
Posts: 9
Joined: March 13th, 2013, 6:34 am

Re: loading png files

Post by somename » March 14th, 2013, 6:17 pm

actually few hours later i watched lesson 2 and 7 after this threat...
well, wierd thing, but lesson 7 made my program run slower, but constant speed..
any ideas how to optimize more? because 3D games are bigger with lots of colculations, yet they run faster then my 2D game now :\

Musi
Posts: 106
Joined: November 25th, 2012, 1:06 am

Re: loading png files

Post by Musi » March 14th, 2013, 7:27 pm

From what i've read most games use whats called the Graphics Pipeline to render graphics. It works directly with the graphics card and is much faster. I think chili was gonna get there eventually.
Musi

There are 10 types of people that understand binary.
Those that do, and those that don't.

somename
Posts: 9
Joined: March 13th, 2013, 6:34 am

Re: loading png files

Post by somename » March 14th, 2013, 7:59 pm

does it work to boost 2D? or only 3D?

Post Reply