Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed unvalid pod

  • Loading branch information...
commit e4be4aced51b8a62a903c445e5ae245eff043f5e 1 parent 6a52958
Tobias Leich authored
Showing with 111 additions and 53 deletions.
  1. +1 −1  lib/pods/SDL/Mixer.pod
  2. +110 −52 lib/pods/SDL/Video.pod
View
2  lib/pods/SDL/Mixer.pod
@@ -177,7 +177,7 @@ Sets the volume for the left or right channels. To do true panning:
$mixer->set_panning($channel, $left, 254 - $left);
-=end
+=end verbatim
=head1 AUTHORS
View
162 lib/pods/SDL/Video.pod
@@ -43,32 +43,63 @@ It returns 0 if the mode is not supported at all, or the suggested bpp.
Sets up a video mode with the specified width, height, bits-per-pixel and flags.
set_video_mode returns a SDL::Surface on succés or it returns undef on error, the error message is retrieved using C<SDL::get_error>.
-=head4 List of avalaibles flags
+=head3 List of avalaibles flags
=over 4
+=item SDL_SWSURFACE
- SDL_SWSURFACE Create the video surface in system memory
- SDL_HWSURFACE Create the video surface in video memory
- SDL_ASYNCBLIT Enables the use of asynchronous updates of the display surface.
- This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.
- SDL_ANYFORMAT Normally, if a video surface of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface.
- Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its pixel depth.
- SDL_HWPALETTE Give SDL exclusive palette access. Without this flag you may not always get the colors you request with SDL::set_colors or SDL::set_palette.
- SDL_DOUBLEBUF Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling SDL::flip will flip the buffers and update the screen.
- All drawing will take place on the surface that is not displayed at the moment.
- If double buffering could not be enabled then SDL_Flip will just perform a SDL::update_rect on the entire screen.
- SDL_FULLSCREEN SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason),
- the next higher resolution will be used and the display window centered on a black background.
- SDL_OPENGL Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL::gl_setattribute.
- SDL_OPENGLBLIT Create an OpenGL rendering context, like above, but allow normal blitting operations.
- The screen (2D) surface may have an alpha channel, and SDL::update_rects must be used for updating changes to the screen surface.
- NOTE: This option is kept for compatibility only, and will be removed in next versions. Is not recommended for new code.
- SDL_RESIZABLE Create a resizable window.
- When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL::set_video_mode can be called again with the new size.
- SDL_NOFRAME If possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration.
- Fullscreen modes automatically have this flag set.
+Create the video surface in system memory
+=item SDL_HWSURFACE
+
+Create the video surface in video memory
+
+=item SDL_ASYNCBLIT
+
+Enables the use of asynchronous updates of the display surface.
+This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.
+
+=item SDL_ANYFORMAT
+
+Normally, if a video surface of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface.
+Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its pixel depth.
+
+=item SDL_HWPALETTE
+
+Give SDL exclusive palette access. Without this flag you may not always get the colors you request with SDL::set_colors or SDL::set_palette.
+
+=item SDL_DOUBLEBUF
+
+Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling SDL::flip will flip the buffers and update the screen.
+All drawing will take place on the surface that is not displayed at the moment.
+If double buffering could not be enabled then SDL_Flip will just perform a SDL::update_rect on the entire screen.
+
+=item SDL_FULLSCREEN
+
+SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason),
+the next higher resolution will be used and the display window centered on a black background.
+
+=item SDL_OPENGL
+
+Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL::gl_setattribute.
+
+=item SDL_OPENGLBLIT
+
+Create an OpenGL rendering context, like above, but allow normal blitting operations.
+The screen (2D) surface may have an alpha channel, and SDL::update_rects must be used for updating changes to the screen surface.
+NOTE: This option is kept for compatibility only, and will be removed in next versions. Is not recommended for new code.
+
+=item SDL_RESIZABLE
+
+Create a resizable window.
+When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL::set_video_mode can be called again with the new size.
+
+
+=item SDL_NOFRAME
+
+If possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration.
+Fullscreen modes automatically have this flag set.
=back
@@ -210,22 +241,30 @@ If bitsPerPixel is 8 an empty palette is allocated for the surface, otherwise a
=over 4
- SDL_SWSURFACE SDL will create the surface in system memory.
- This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.
+=item SDL_SWSURFACE
+
+SDL will create the surface in system memory.
+This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.
+
+=item SDL_HWSURFACE
+
+SDL will attempt to create the surface in video memory.
+This will allow SDL to take advantage of Video->Video blits (which are often accelerated).
- SDL_HWSURFACE SDL will attempt to create the surface in video memory.
- This will allow SDL to take advantage of Video->Video blits (which are often accelerated).
+=item SDL_SRCCOLORKEY
- SDL_SRCCOLORKEY This flag turns on color keying for blits from this surface.
- If SDL_HWSURFACE is also specified and color keyed blits are hardware-accelerated, then SDL will attempt to place the surface in video memory.
- If the screen is a hardware surface and color keyed blits are hardware-accelerated then the SDL_HWSURFACE flag will be set.
- Use SDL_SetColorKey to set or clear this flag after surface creation.
+This flag turns on color keying for blits from this surface.
+If SDL_HWSURFACE is also specified and color keyed blits are hardware-accelerated, then SDL will attempt to place the surface in video memory.
+If the screen is a hardware surface and color keyed blits are hardware-accelerated then the SDL_HWSURFACE flag will be set.
+Use SDL_SetColorKey to set or clear this flag after surface creation.
- SDL_SRCALPHA This flag turns on alpha-blending for blits from this surface.
- If SDL_HWSURFACE is also specified and alpha-blending blits are hardware-accelerated,
- then the surface will be placed in video memory if possible.
- If the screen is a hardware surface and alpha-blending blits are hardware-accelerated then the SDL_HWSURFACE flag will be set.
- Use SDL_SetAlpha to set or clear this flag after surface creation.
+=item SDL_SRCALPHA
+
+This flag turns on alpha-blending for blits from this surface.
+If SDL_HWSURFACE is also specified and alpha-blending blits are hardware-accelerated,
+then the surface will be placed in video memory if possible.
+If the screen is a hardware surface and alpha-blending blits are hardware-accelerated then the SDL_HWSURFACE flag will be set.
+Use SDL_SetAlpha to set or clear this flag after surface creation.
=back
@@ -323,31 +362,50 @@ Note: The per-surface alpha value of 128 is considered a special case and is opt
Alpha affects surface blitting in the following ways:
- RGBA->RGB with SDL_SRCALPHA The source is alpha-blended with the destination, using the alpha channel.
- SDL_SRCCOLORKEY and the per-surface alpha are ignored.
+=over 4
+
+=item RGBA->RGB with SDL_SRCALPHA
+
+The source is alpha-blended with the destination, using the alpha channel.
+SDL_SRCCOLORKEY and the per-surface alpha are ignored.
- RGBA->RGB without SDL_SRCALPHA The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+=item RGBA->RGB without SDL_SRCALPHA
- RGB->RGBA with SDL_SRCALPHA The source is alpha-blended with the destination using the per-surface alpha value.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
- The alpha channel of the copied pixels is set to opaque.
+The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
- RGB->RGBA without SDL_SRCALPHA The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+=item RGB->RGBA with SDL_SRCALPHA
- RGBA->RGBA with SDL_SRCALPHA The source is alpha-blended with the destination using the source alpha channel.
- The alpha channel in the destination surface is left untouched. SDL_SRCCOLORKEY is ignored.
+The source is alpha-blended with the destination using the per-surface alpha value.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+The alpha channel of the copied pixels is set to opaque.
- RGBA->RGBA without SDL_SRCALPHA The RGBA data is copied to the destination surface.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+=item RGB->RGBA without SDL_SRCALPHA
- RGB->RGB with SDL_SRCALPHA The source is alpha-blended with the destination using the per-surface alpha value.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
- RGB->RGB without SDL_SRCALPHA The RGB data is copied from the source.
- If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+=item RGBA->RGBA with SDL_SRCALPHA
+The source is alpha-blended with the destination using the source alpha channel.
+The alpha channel in the destination surface is left untouched. SDL_SRCCOLORKEY is ignored.
+
+=item RGBA->RGBA without SDL_SRCALPHA
+
+The RGBA data is copied to the destination surface.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+=item RGB->RGB with SDL_SRCALPHA
+
+The source is alpha-blended with the destination using the per-surface alpha value.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+=item RGB->RGB without SDL_SRCALPHA
+
+The RGB data is copied from the source.
+If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+=back
Note: When blitting, the presence or absence of SDL_SRCALPHA is relevant only on the source surface, not the destination.
Note: Note that RGBA->RGBA blits (with SDL_SRCALPHA set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as a mask.
@@ -438,7 +496,7 @@ It returns 0 on succés or -1 on error.
=head2 unlock_YUV_overlay(overlay)
-The opposite to C<SDL::lock_YUV_overlay. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed.
+The opposite to C<SDL::lock_YUV_overlay>. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed.
It returns 0 on succés or -1 on error.
=head2 display_YUV_overlay(overlay,dstrect)
Please sign in to comment.
Something went wrong with that request. Please try again.