2014-03-10 14:04:58 +08:00
--------------------------------
-- @module GLView
2014-08-01 15:53:19 +08:00
-- @extend Ref
2014-06-25 17:36:50 +08:00
-- @parent_module cc
2014-03-18 15:55:30 +08:00
2014-03-10 14:04:58 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Set the frame size of EGL view.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] setFrameSize
2014-03-10 14:04:58 +08:00
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float width
-- @param #float height
2014-03-10 14:04:58 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the opengl view port rectangle.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getViewPortRect
2014-03-10 14:04:58 +08:00
-- @param self
2014-08-01 15:53:19 +08:00
-- @return rect_table#rect_table ret (return value: rect_table)
2014-03-10 14:04:58 +08:00
2014-08-12 10:08:16 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- only works on ios platform
2014-08-12 10:08:16 +08:00
-- @function [parent=#GLView] setContentScaleFactor
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float scaleFactor
2014-08-12 10:08:16 +08:00
-- @return bool#bool ret (return value: bool)
2014-03-10 14:04:58 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getContentScaleFactor
2014-03-10 14:04:58 +08:00
-- @param self
2014-08-01 15:53:19 +08:00
-- @return float#float ret (return value: float)
2014-03-10 14:04:58 +08:00
2014-03-18 15:55:30 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Open or close IME keyboard , subclass must implement this method.
2014-03-18 15:55:30 +08:00
-- @function [parent=#GLView] setIMEKeyboardState
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #bool open
2014-03-18 15:55:30 +08:00
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Set Scissor rectangle with points.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] setScissorInPoints
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float x
-- @param #float y
-- @param #float w
-- @param #float h
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getViewName
-- @param self
-- @return string#string ret (return value: string)
2014-03-18 15:55:30 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get whether opengl render system is ready, subclass must implement this method.
2014-03-18 15:55:30 +08:00
-- @function [parent=#GLView] isOpenGLReady
-- @param self
-- @return bool#bool ret (return value: bool)
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Force destroying EGL view, subclass must implement this method.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] end
-- @param self
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get scale factor of the vertical direction.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getScaleY
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get scale factor of the horizontal direction.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getScaleX
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the visible origin point of opengl viewport.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getVisibleOrigin
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the frame size of EGL view.<br>
-- In general, it returns the screen size since the EGL view is a fullscreen view.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getFrameSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
2014-08-12 10:08:16 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Set and get zoom factor for frame. This two methods are for<br>
-- debugging big resolution (e.g.new ipad) app on desktop.
2014-08-12 10:08:16 +08:00
-- @function [parent=#GLView] setFrameZoomFactor
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float zoomFactor
2014-08-12 10:08:16 +08:00
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getFrameZoomFactor
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get design resolution size.<br>
-- Default resolution size is the same as 'getFrameSize'.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getDesignResolutionSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] windowShouldClose
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Exchanges the front and back buffers, subclass must implement this method.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] swapBuffers
-- @param self
--------------------------------
2014-09-02 13:45:07 +08:00
-- Set the design resolution size.<br>
-- param width Design resolution width.<br>
-- param height Design resolution height.<br>
-- param resolutionPolicy The resolution policy desired, you may choose:<br>
-- [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.<br>
-- [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.<br>
-- [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] setDesignResolutionSize
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float width
-- @param #float height
-- @param #int resolutionPolicy
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- returns the current Resolution policy
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getResolutionPolicy
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
2014-09-02 13:45:07 +08:00
-- returns whether or not the view is in Retina Display mode
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] isRetinaDisplay
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Set opengl view port rectangle with points.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] setViewPortInPoints
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #float x
-- @param #float y
-- @param #float w
-- @param #float h
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the current scissor rectangle
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getScissorRect
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get retina factor
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getRetinaFactor
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] setViewName
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #string viewname
2014-08-01 15:53:19 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the visible rectangle of opengl viewport.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getVisibleRect
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get the visible area size of opengl viewport.
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] getVisibleSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
2014-09-02 13:45:07 +08:00
-- Get whether GL_SCISSOR_TEST is enable
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] isScissorEnabled
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-01 15:53:19 +08:00
-- @function [parent=#GLView] pollEvents
-- @param self
2014-08-25 10:34:32 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-25 10:34:32 +08:00
-- @function [parent=#GLView] setGLContextAttrs
-- @param self
2014-09-02 13:45:07 +08:00
-- @param #GLContextAttrs glContextAttrs
2014-08-25 10:34:32 +08:00
--------------------------------
2014-09-02 13:45:07 +08:00
--
2014-08-25 10:34:32 +08:00
-- @function [parent=#GLView] getGLContextAttrs
-- @param self
-- @return GLContextAttrs#GLContextAttrs ret (return value: GLContextAttrs)
2014-03-10 14:04:58 +08:00
return nil