MiniB3D GLES2 Startup Template


Tweet monkey-x opengl-es2
(Posted 6 months ago) RonTek

The barebones to get you started with MiniB3D-Monkey and GLES 2.0

Strict

Import minib3d.opengl.opengles20
Import minib3d.app

Class MyApp Extends MiniB3DApp

  Field Player:TEntity

  Method Create:Int()
        SetUpdateRate 60
        SetRender()
        PreLoad(["2Dand3DTexturesHere.jpg","More2Dand3DTexturesHere.jpg"])

        Return 0
    End

    Method Update:Int()

        If KeyHit(KEY_CLOSE) Or KeyHit(KEY_ESCAPE) Then Error ""

        'Game Loop and Logic here

        UpdateWorld()

        Return 0
    End

    Method Render:Int()

        SetMojoEmulation() 
        DrawText("Debug or HUD Text Here",10,10)

        Return 0
    End

    Method Init:Int()

        'Setup your entities and scene here

        Return 0
    End
End

Function Main:Int()
    New MyApp   
    Return True
End

Reply To Topic (minimum 10 characters)

Please log in to reply