java.lang.Object | ||
↳ | com.neomades.app.Screen | |
↳ | com.neomades.opengl.GLScreen |
A GL screen is used to perform 3D drawing operations. By overriding the
renderFrame(GL10)
method, you can draw to the screen.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GLScreen() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final int |
getHeight()
Returns the height of the screen in pixels.
| ||||||||||
Rect |
getScreenRect()
Returns the rectangle corresponding to the screen.
| ||||||||||
final int |
getWidth()
Returns the width of the screen in pixels.
| ||||||||||
void |
startAutoRefresh(int timer)
Indicates that the screen will be refreshed at a regular interval.
| ||||||||||
void |
stopAutoRefresh()
Stops the screen from being automatically refreshed.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
View |
getContent()
Cannot be called for GLScreen.
| ||||||||||
abstract void |
onCreate(GL10 gl, EGLConfig config)
Override this method to initialize the OpenGL components of the screen.
| ||||||||||
void |
onSizeChanged(GL10 gl, int width, int height)
Called once Surface is created and each time the view is resized.
| ||||||||||
void | onUpdate() | ||||||||||
abstract void |
renderFrame(GL10 gl)
Override this method to do the drawing of a 3D model.
| ||||||||||
void |
setContent(View content)
Cannot be called for GLScreen.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Returns the height of the screen in pixels.
Returns the rectangle corresponding to the screen.
Returns the width of the screen in pixels.
Indicates that the screen will be refreshed at a regular interval. this will create a timer that will refresh the screen. The timer is started when this method is called.
timer | the time between two refresh calls |
---|
Stops the screen from being automatically refreshed.
Override this method to initialize the OpenGL components of the screen. This method will be called once when the screen is created.
gl | the OpenGL state |
---|---|
config | the OpenGL configuration |
Called once Surface is created and each time the view is resized. Set the OpenGL states which change with resolution.
gl | the OpenGL state |
---|---|
width | the new screen width |
height | the new screen height |
Override this method to do the drawing of a 3D model.
gl | the OpenGL state |
---|
Cannot be called for GLScreen.
content | the content of this screen |
---|