SDL_SetVideoMode - Online Linux Manual PageSection : 3
Updated : Tue 11 Sep 2001, 23:01
Source : SDL
Note : SDL API Reference

NAMESDL_SetVideoMode − Set up a video mode with the specified width, height and bits-per-pixel​.

SYNOPSIS#include "SDL​.h" SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);

DESCRIPTIONSet 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​. The flags parameter is the same as the flags field of the SDL_Surface structure​. OR​'d combinations of the following values are valid​. 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 the colors you request with SDL_SetColors or SDL_SetPalette​. 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_UpdateRect 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_UpdateRects must be used for updating changes to the screen surface​. SDL_RESIZABLE  Create a resizable window​. When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL_SetVideoMode 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​. Note: Whatever flags SDL_SetVideoMode could satisfy are set in the flags member of the returned surface​. Note: The bpp parameter is the number of bits per pixel, so a bpp of 24 uses the packed representation of 3 bytes/pixel​. For the more common 4 bytes/pixel mode, use a bpp of 32​. Somewhat oddly, both 15 and 16 will request a 2 bytes/pixel mode, but different pixel formats​.

RETURN VALUEThe framebuffer surface, or NULL if it fails​. The surface returned is freed by SDL_Quit() and should nt be freed by the caller​.

SEE ALSOSDL_LockSurface, SDL_SetColors, SDL_Flip, SDL_Surface
0
Johanes Gumabo
Data Size   :   13,279 byte
man-SDL_SetVideoMode.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   5 / 172,412
Visitor ID   :     :  
Visitor IP   :   3.145.168.68   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.