Jump to content
  • Advertisement
Sign in to follow this  
xtr33me

Transparent particle images?

This topic is 3982 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am programming my first 2d particle editor and I recently realized just how important the particle images are with having transparency. I have been having an issue finding any libraries and it is looking like I am probably going to be opening up my photoshop app. However I figured I would post here in hopes to maybe find some direction in where I can find some already made. Any help or a kick in the right direction would be great! Thanks all!!

Share this post


Link to post
Share on other sites
Advertisement
Most libraries that allow you to draw images to the screen will allow you to draw those images at varying levels of transparency. SDL will do it for you, as will straight OpenGL or DirectX.

Share this post


Link to post
Share on other sites
If you are going towards opengl for transparent images perhaps this would lead you to what you want, make sure glEnable(GL_ALPHA); has been called and after binding the texture data to a quad call glDisable(GL_ALPHA):

http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html

Pay attention to the sfactor and dfactor parameters.


http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html

Pay attention to the internalformat , format and pixel parameters.

Also the OGL Programming Guide:

http://www.glprogramming.com/red/

You can also "load" other image fomats and assign the data to a SDL_Surface type object and then "bind" the data stored in the SDL_Surface type object to a texture using an opengl call.

Hoped that helped

-Mad_Coder

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!