Some important functions of SDL

Source: Internet
Author: User

/** Restart one of the threads that are waiting on the condition variable, * @ return 0 or-1 on error. */extern declspec int sdlcall sdl_condsignal (sdl_cond * Cond);/** wait on the condition variable, unlocking the provided mutex. * The mutex must be locked before entering this function! * The mutex is re-locked once the condition variable is signaled. * @ return 0 when it is signaled, or-1 on error. */extern declspec int sdlcall sdl_condwait (sdl_cond * cond, sdl_mutex * MUT);/* The ratio of width to height directly affects the video display ratio. For example, width * = 2; then the width is changed to the original 1/2. If the height * = 2 is the same, the screen after the video is not changed to the original 1/2. */Extern declspec sdl_overlay * sdlcall sdl_createyuvoverlay (INT width, int height, uint32 format, sdl_surface * display);/*** srcw, srch: width and height of the Source Video dstw and DTH: width and height of the target video **/struct swscontext * sws_getcontext (INT srcw, int srch, int srcformat, int dstw, int DTH, int dstformat, int flags, swsfilter * srcfilter, swsfilter * dstfilter, double * PARAM );

/*** Set up a video mode with the specified width, height and bits-per-pixel. ** if 'bpp 'is 0, it is treated as the current display bits per pixel. ** if sdl_anyformat is set in 'flags ', the SDL library will try to set the * Requested bits-per-pixel, but will return whatever video pixel format is * available. the default is to emulate the requested pixel format if it * is not natively available. ** if sdl_hwsurface is set in 'flags ', the video surface will be placed in * video memory, if possible, and you may have to call sdl_locksurface () * In order to access the raw framebuffer. otherwise, the video surface * will be created in system memory. ** if sdl_asyncb1_is set in 'flags ', SDL will try to perform rectangle * updates asynchronously, but you must always lock before accessing pixels. * SDL will wait for updates to complete before returning from the lock. ** if sdl_hwpalette is set in 'flags ', the SDL library will guarantee * that the colors set by sdl_setcolors () will be the colors you get. * otherwise, in 8-Bit mode, sdl_setcolors () may not be able to set all * of the colors exactly the way they are requested, and you shoshould look * at the video surface structure to determine the actual palette. * If SDL cannot guarantee that the colors you request can be set, * I. e. if the colormap is shared, then the video surface may be created * under emulation in system memory, overriding the sdl_hwsurface flag. ** if sdl_fullscreen is set in 'flags ', the SDL library will try to set * A fullscreen video mode. the default is to create a custom wed mode * if the current graphics system has a window manager. * If the SDL library is able to set a fullscreen video mode, this flag * will be set in the surface that is returned. ** if sdl_doublebuf is set in 'flags ', the SDL library will try to set up * two surfaces in video memory and swap between them when you call * sdl_flip (). this is usually slower than the normal single-buffering * scheme, but prevents "Tearing" Artifacts Caused by modifying video * memory while the monitor is refreshing. it shoshould only be used by * applications that redraw the entire Screen on every update. ** if sdl_resizable is set in 'flags ', the SDL library will allow the * window manager, if any, to resize the window at runtime. when this * occurs, SDL will send a sdl_videoresize event to you application, * and you must respond to the event by re-calling sdl_setvideomode () * With the requested size (or another size that suits the application ). ** if sdl_noframe is set in 'flags ', the SDL library will create a window * without any title bar or frame decoration. fullscreen video modes have * this flag set automatically. ** this function returns the video framebuffer surface, or null if it fails. ** if you rely on functionality provided by certain video flags, check the * flags of the returned surface to make sure that functionality is available. * SDL will fall back to CED functionality if the exact flags you wanted * are not available. * // * change the int width and INT height parameters of the function, the size and size of the frame */extern declspec sdl_surface * sdlcall sdl_setvideomode (INT width, int height, int bpp, uint32 flags );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.