docs/README-ios.md
changeset 10167 d3db276c1fa6
parent 9997 e330f785a5e7
child 11365 a9bd2625fa01
     1.1 --- a/docs/README-ios.md	Tue May 10 21:14:36 2016 +0200
     1.2 +++ b/docs/README-ios.md	Tue May 10 21:15:11 2016 +0200
     1.3 @@ -74,17 +74,17 @@
     1.4  Retina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when
     1.5  creating your window to enable high-dpi support.
     1.6  
     1.7 -When high-dpi support is enabled, SDL_GetWindowSize and display mode sizes
     1.8 +When high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes
     1.9  will still be in "screen coordinates" rather than pixels, but the window will
    1.10  have a much greater pixel density when the device supports it, and the
    1.11 -SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize functions (depending on
    1.12 +SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on
    1.13  whether raw OpenGL or the SDL_Render API is used) can be queried to determine
    1.14  the size in pixels of the drawable screen framebuffer.
    1.15  
    1.16  Some OpenGL ES functions such as glViewport expect sizes in pixels rather than
    1.17  sizes in screen coordinates. When doing 2D rendering with OpenGL ES, an
    1.18  orthographic projection matrix using the size in screen coordinates
    1.19 -(SDL_GetWindowSize) can be used in order to display content at the same scale
    1.20 +(SDL_GetWindowSize()) can be used in order to display content at the same scale
    1.21  no matter whether a Retina device is used or not.
    1.22  
    1.23  ==============================================================================
    1.24 @@ -156,7 +156,7 @@
    1.25  
    1.26  SDL for iPhone supports polling the built in accelerometer as a joystick device.  For an example on how to do this, see the accelerometer.c in the demos directory.
    1.27  
    1.28 -The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis reports joystick values as signed integers.  Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver.  To convert SDL_JoystickGetAxis reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.
    1.29 +The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers.  Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver.  To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.
    1.30  
    1.31  ==============================================================================
    1.32  Notes -- OpenGL ES
    1.33 @@ -164,7 +164,7 @@
    1.34  
    1.35  Your SDL application for iOS uses OpenGL ES for video by default.
    1.36  
    1.37 -OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute.
    1.38 +OpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute().
    1.39  
    1.40  If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.
    1.41  
    1.42 @@ -172,11 +172,11 @@
    1.43  
    1.44  OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this:
    1.45  
    1.46 -- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow is called.
    1.47 -- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow is called.
    1.48 +- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called.
    1.49 +- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called.
    1.50  - If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called.
    1.51  
    1.52 -The above objects can be obtained via SDL_GetWindowWMInfo (in SDL_syswm.h).
    1.53 +The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
    1.54  
    1.55  ==============================================================================
    1.56  Notes -- Keyboard
    1.57 @@ -219,7 +219,7 @@
    1.58  ==============================================================================
    1.59  
    1.60  Windows:
    1.61 -	Full-size, single window applications only.  You cannot create multi-window SDL applications for iPhone OS.  The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow the flag SDL_WINDOW_BORDERLESS).
    1.62 +	Full-size, single window applications only.  You cannot create multi-window SDL applications for iPhone OS.  The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS).
    1.63  
    1.64  Textures:
    1.65  	The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats.