This is a list of API changes in SDL's version history.
Version 1.0:
1.2.14:
Added cast macros for correct usage with C++:
SDL_reinterpret_cast(type, expression)
SDL_static_cast(type, expression)
Added SDL_VIDEO_FULLSCREEN_DISPLAY as a preferred synonym for
SDL_VIDEO_FULLSCREEN_HEAD on X11.
Added SDL_DISABLE_LOCK_KEYS environment variable to enable normal
up/down events for Caps-Lock and Num-Lock keys.
1.2.13:
Added SDL_BUTTON_X1 and SDL_BUTTON_X2 constants.
1.2.12:
Added SDL_VIDEO_ALLOW_SCREENSAVER to override SDL's disabling
of the screensaver on Mac OS X and X11.
1.2.10:
If SDL_OpenAudio() is passed zero for the desired format
fields, the following environment variables will be used
to fill them in:
SDL_AUDIO_FREQUENCY
SDL_AUDIO_FORMAT
SDL_AUDIO_CHANNELS
SDL_AUDIO_SAMPLES
If an environment variable is not specified, it will be set
to a reasonable default value.
Added support for the SDL_VIDEO_FULLSCREEN_HEAD environment
variable, currently supported on X11 Xinerama configurations.
Added SDL_GL_SWAP_CONTROL to wait for vsync in OpenGL applications.
Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
Added current_w and current_h to the SDL_VideoInfo structure,
which is set to the desktop resolution during video intialization,
and then set to the current resolution when a video mode is set.
SDL_SetVideoMode() now accepts 0 for width or height and will use
the current video mode (or the desktop mode if no mode has been set.)
Added SDL_GetKeyRepeat()
Added SDL_config.h, with defaults for various build environments.
1.2.7:
Added CPU feature detection functions to SDL_cpuinfo.h:
SDL_HasRDTSC(), SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE(),
SDL_HasAltiVec()
Added function to create RWops from const memory: SDL_RWFromConstMem()
1.2.6:
Added SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject()
Added SDL_GL_MULTISAMPLEBUFFERS and SDL_GL_MULTISAMPLESAMPLES for FSAA
1.2.5:
Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
Added SDL_GL_STEREO for stereoscopic OpenGL contexts
1.2.0:
Added SDL_VIDEOEXPOSE event to signal that the screen needs to
be redrawn. This is currently only delivered to OpenGL windows
on X11, though it may be delivered in the future when the video
memory is lost under DirectX.
1.1.8:
You can pass SDL_NOFRAME to SDL_VideoMode() to create a window
that has no title bar or frame decoration. Fullscreen video
modes automatically have this flag set.
Added a function to query the clipping rectangle for a surface:
void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect)
Added a function to query the current event filter:
SDL_EventFilter SDL_GetEventFilter(void)
If you pass -1 to SDL_ShowCursor(), it won't change the current
cursor visibility state, but will still return it.
SDL_LockSurface() and SDL_UnlockSurface() are recursive, meaning
you can nest them as deep as you want, as long as each lock call
has a matching unlock call. The surface remains locked until the
last matching unlock call.
Note that you may not blit to or from a locked surface.
1.1.7:
The SDL_SetGammaRamp() and SDL_GetGammaRamp() functions now take
arrays of Uint16 values instead of Uint8 values. For the most part,
you can just take your old values and shift them up 8 bits to get
new correct values for your gamma ramps.
You can pass SDL_RLEACCEL in flags passed to SDL_ConvertSurface()
and SDL will try to RLE accelerate colorkey and alpha blits in the
resulting surface.
1.1.6:
Added a function to return the thread ID of a specific thread:
Uint32 SDL_GetThreadID(SDL_Thread *thread)
If 'thread' is NULL, this function returns the id for this thread.
1.1.5:
The YUV overlay structure has been changed to use an array of
pitches and pixels representing the planes of a YUV image, to
better enable hardware acceleration. The YV12 and IYUV formats
each have three planes, corresponding to the Y, U, and V portions
of the image, while packed pixel YUV formats just have one plane.
For palettized mode (8bpp), the screen colormap is now split in
a physical and a logical palette. The physical palette determines
what colours the screen pixels will get when displayed, and the
logical palette controls the mapping from blits to/from the screen.
A new function, SDL_SetPalette() has been added to change
logical and physical palettes separately. SDL_SetColors() works
just as before, and is equivalent to calling SDL_SetPalette() with
a flag argument of (SDL_LOGPAL|SDL_PHYSPAL).
SDL_BlitSurface() no longer modifies the source rectangle, only the
destination rectangle. The width/height members of the destination
rectangle are ignored, only the position is used.
The old source clipping function SDL_SetClipping() has been replaced
with a more useful function to set the destination clipping rectangle:
SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect)
Added a function to see what subsystems have been initialized:
Uint32 SDL_WasInit(Uint32 flags)
The Big Alpha Flip: SDL now treats alpha as opacity like everybody
else, and not as transparency:
A new cpp symbol: SDL_ALPHA_OPAQUE is defined as 255
A new cpp symbol: SDL_ALPHA_TRANSPARENT is defined as 0
Values between 0 and 255 vary from fully transparent to fully opaque.
New functions:
SDL_DisplayFormatAlpha()
Returns a surface converted to a format with alpha-channel
that can be blit efficiently to the screen. (In other words,
like SDL_DisplayFormat() but the resulting surface has
an alpha channel.) This is useful for surfaces with alpha.
SDL_MapRGBA()
Works as SDL_MapRGB() but takes an additional alpha parameter.
SDL_GetRGBA()
Works as SDL_GetRGB() but also returns the alpha value
(SDL_ALPHA_OPAQUE for formats without an alpha channel)
Both SDL_GetRGB() and SDL_GetRGBA() now always return values in
the [0..255] interval. Previously, SDL_GetRGB() would return
(0xf8, 0xfc, 0xf8) for a completely white pixel in RGB565 format.
(N.B.: This is broken for bit fields < 3 bits.)
SDL_MapRGB() returns pixels in which the alpha channel is set opaque.
SDL_SetAlpha() can now be used for both setting the per-surface
alpha, using the new way of thinking of alpha, and also to enable
and disable per-pixel alpha blending for surfaces with an alpha
channel:
To disable alpha blending:
SDL_SetAlpha(surface, 0, 0);
To re-enable alpha blending:
SDL_SetAlpha(surface, SDL_SRCALPHA, 0);
Surfaces with an alpha channel have blending enabled by default.
SDL_SetAlpha() now accepts SDL_RLEACCEL as a flag, which requests
RLE acceleration of blits, just as like with SDL_SetColorKey().
This flag can be set for both surfaces with an alpha channel
and surfaces with an alpha value set by SDL_SetAlpha().
As always, RLE surfaces must be locked before pixel access is
allowed, and unlocked before any other SDL operations are done
on it.
The blit semantics for surfaces with and without alpha and colorkey
have now been defined:
RGBA->RGB:
SDL_SRCALPHA set:
alpha-blend (using alpha-channel).
SDL_SRCCOLORKEY ignored.
SDL_SRCALPHA not set:
copy RGB.
if SDL_SRCCOLORKEY set, only copy the pixels matching the
RGB values of the source colour key, ignoring alpha in the
comparison.
RGB->RGBA:
SDL_SRCALPHA set:
alpha-blend (using the source per-surface alpha value);
set destination alpha to opaque.
SDL_SRCALPHA not set:
copy RGB, set destination alpha to opaque.
both:
if SDL_SRCCOLORKEY set, only copy the pixels matching the
source colour key.
RGBA->RGBA:
SDL_SRCALPHA set:
alpha-blend (using the source alpha channel) the RGB values;
leave destination alpha untouched. [Note: is th
没有合适的资源?快使用搜索试试~ 我知道了~
SDL 显示YUV,RGB, BMP
共275个文件
html:204个
h:46个
txt:6个
3星 · 超过75%的资源 需积分: 50 21 下载量 189 浏览量
2016-01-14
17:33:52
上传
评论
收藏 1.2MB RAR 举报
温馨提示
通过SDL1显示BMP,YUV的示例程序。 功能: 支持直接显示文件BMP 支持显示内存BMP 支持显示YUV 附: BMP缩放需要SDL_GFX扩展。 工程是VS2010的WIN32
资源推荐
资源详情
资源评论
收起资源包目录
SDL 显示YUV,RGB, BMP (275个子文件)
hello.bmp 401KB
sdl__win32.cpp 5KB
sdl_wrapper.cpp 4KB
stdafx.cpp 297B
SDL.dll 300KB
SDL.dll 297KB
SDL.dll 297KB
rainbow.gif 2KB
SDL_opengl.h 329KB
SDL_video.h 37KB
SDL_stdinc.h 16KB
SDL_events.h 13KB
SDL_audio.h 11KB
SDL_keysym.h 7KB
SDL_syswm.h 6KB
SDL_endian.h 6KB
SDL_cdrom.h 6KB
SDL_mutex.h 6KB
SDL_joystick.h 5KB
begin_code.h 5KB
SDL_rwops.h 5KB
SDL_mouse.h 5KB
SDL_config_win32.h 4KB
SDL_timer.h 4KB
SDL_thread.h 4KB
SDL_config_macosx.h 4KB
SDL_keyboard.h 4KB
SDL_config_os2.h 4KB
SDL.h 3KB
SDL_config_symbian.h 3KB
SDL_config_nds.h 3KB
SDL_main.h 3KB
SDL_config_dreamcast.h 3KB
SDL_config_macos.h 3KB
SDL_loadso.h 3KB
SDL_platform.h 3KB
SDL_version.h 3KB
SDL_cpuinfo.h 2KB
SDL_quit.h 2KB
SDL_config_minimal.h 2KB
SDL_active.h 2KB
SDL_error.h 2KB
close_code.h 1KB
SDL_config.h 1KB
SDL_byteorder.h 986B
SDL_types.h 979B
SDL_getenv.h 979B
SDL_copying.h 869B
Resource.h 747B
sdl_wrapper.h 533B
stdafx.h 529B
targetver.h 314B
SDL_name.h 183B
sdl__win32.h 39B
sdlkey.html 27KB
index.html 21KB
docs.html 19KB
guideinputkeyboard.html 17KB
guidevideoopengl.html 16KB
guideinput.html 15KB
sdlenvvars.html 15KB
sdlevent.html 13KB
video.html 11KB
sdlopenaudio.html 9KB
guidevideo.html 9KB
sdlpixelformat.html 8KB
sdlsetvideomode.html 8KB
sdlsetalpha.html 8KB
sdlsurface.html 8KB
sdlaudiocvt.html 7KB
sdlaudiospec.html 7KB
eventfunctions.html 7KB
sdlcreatergbsurface.html 7KB
sdlconvertaudio.html 6KB
sdlcreatecursor.html 6KB
sdlsetpalette.html 6KB
VisualC.html 5KB
thread.html 5KB
sdlblitsurface.html 5KB
joystick.html 5KB
sdlsetcolors.html 5KB
sdlvideoinfo.html 5KB
sdljoyhatevent.html 5KB
sdloverlay.html 5KB
sdlglattr.html 5KB
sdlmousemotionevent.html 5KB
guidecdromexamples.html 5KB
sdlkeysym.html 5KB
sdlkeyboardevent.html 5KB
sdlmousebuttonevent.html 5KB
cdrom.html 5KB
sdladdtimer.html 5KB
guideeventexamples.html 5KB
sdlactiveevent.html 4KB
sdlcd.html 4KB
guidebasicsinit.html 4KB
sdljoybuttonevent.html 4KB
sdllocksurface.html 4KB
sdlsemwaittimeout.html 4KB
sdllistmodes.html 4KB
共 275 条
- 1
- 2
- 3
资源评论
- chenghai_rd882022-03-24YUV是弄了个纯色,要是文件就好了
mingxin505
- 粉丝: 1
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功