Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate

Primary tabs

  • View
  • Collections
  • Comments(active tab)
  • Followers
  • Friends
  • Favorites
Re: New art submission form design
Tuesday, May 31, 2011 - 10:44

It would be much better than the current one, especially the possibility of choosing license, author and art type on the left column

Re: Transparency in SDL
Wednesday, May 11, 2011 - 05:46

Problem solved (at least I think so...)

I had a look once more at the docs and found out that the SDL_BlitSurface function doesn't copy the alpha values from the source to the destination; then I wrote a function that copies pixel pixel from the source to the destination, including alpha values, and it works.

Thank you for your help.

Re: Transparency in SDL
Wednesday, May 11, 2011 - 04:38

The problem is not that blitting on the surface doesn't work properly, but that the surface created with SDL_CreateRGBSurface is black and opaque if amask is 0 or remains completely transparent (even if I blit something on it) if amask is 0xFF000000.

What I would like to do is creating a transparent surface (I mean that all pixels are transparent, not that the per-surface alpha is transparent).

I've tried this:

Uint32 background = SDL_MapRGBA(result->format, 0,0,0,SDL_ALPHA_TRANSPARENT);

SDL_FillRect(result, &result->clip_rect, background);

to make all the pixels transparent, but the per-pixel alpha doesn't change, while the color does (if I change the values of RGB the black rectangle becomes a colored rectangle).

Sorry if I can't explain this very well...

Thank you for your interest anyway

Re: Transparency in SDL
Tuesday, May 10, 2011 - 11:33

It's a short piece of code , so I'll just post it here... Thanks for your interest

This is inside a class; frameWidth and frameHeight are the values of the size of the image; I've skipped the part where I blit images on the surface created because there is a lot of code there to choose which image blit and how to do it, but I'm pretty sure the problem is not there, because when I do it outside from this function on an image not made with SDL_CreateRGBSurface (such as the window) I don't have any problem.

SDL_Surface* image(){

SDL_Surface* result = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, frameWidth, frameHeight, 32, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000);

//Here I just blit an image on the surface...

return result;

}

 

Re: Transparency in SDL
Tuesday, May 10, 2011 - 11:20

I'm having a problem still with transparency: when I use the function SDL_CreateRGBSurface to create an empty surface, how can I make it completely transparent? I tried changing the mask values: giving an alpha mask value of 0xFF000000 as suggested by the documentation creates an empty and transparent surface, but when I blit anything on it the surface remains empty.

Re: Transparency in SDL
Tuesday, May 10, 2011 - 11:19

I'm having a problem still with transparency: when I use the function SDL_CreateRGBSurface to create an empty surface, how can I make it completely transparent? I tried changing the mask values: giving an alpha mask value of 0xFF000000 as suggested by the documentation creates an empty and transparent surface, but when I blit anything on it the surface remains empty.

Re: Fool Goblin Shaman
Thursday, April 28, 2011 - 04:56

Well, I made this picture almost randomly, playing with myPaint, so the hat just came out... I know it's strange, but I liked it.

And yes, you're right, probably it looks like a priest rather than a shaman... But the name shouldn't make a lot of difference

Re: Magic jewel simple/vector
Saturday, April 23, 2011 - 07:30

Very nice work!

Re: Weekly Challenge: Fauna (due 2011-03-28)
Friday, March 25, 2011 - 11:03

OK

Re: Weekly Challenge: Fauna (due 2011-03-28)
Friday, March 25, 2011 - 10:58

Is it ok if I enter the challenge with art that was posted before the challenge started?

Pages

  • « first
  • ‹ previous
  • …
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • …
  • next ›
  • last »