forked from haxenme/nme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial GLES3. All changes are within a "#define NME_GLES3" and it is not activated so it doesn't modify current behaivor. To use it, build nme/project with -DNME_GLES3 flag or uncomment on ToolkitBuild.xml Then use -Dgles3 flag when compiling a haxe NME sample. Tested on Windows (Angle) with https://github.com/madrazo/nme-opengl-tutorials tutorials 1 to 5, with both -Dgles3 and without (current gles2). Needs patch for SDL nme-toolkit: native-toolkit/libsdl#11
- Loading branch information
Showing
8 changed files
with
158 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package nme.gl; | ||
|
||
@:nativeProperty | ||
class GL3 | ||
{ | ||
#if (gles3 && !flash) | ||
|
||
public static inline function bindVertexArray(vertexarray:GLVertexArray):Void | ||
{ | ||
nme_gl_bind_vertexarray(vertexarray); | ||
} | ||
|
||
public static inline function createVertexArray():GLVertexArray | ||
{ | ||
return new GLVertexArray(GL.version, nme_gl_create_vertexarray()); | ||
} | ||
|
||
|
||
// Native Methods | ||
private static var nme_gl_create_vertexarray = GL.load("nme_gl_create_vertexarray", 0); | ||
private static var nme_gl_bind_vertexarray = GL.load("nme_gl_bind_vertexarray", 1); | ||
|
||
#end | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package nme.gl; | ||
#if (gles3 && !flash) | ||
|
||
@:nativeProperty | ||
class GLVertexArray extends GLObject | ||
{ | ||
public function new(inVersion:Int, inId:Dynamic) | ||
{ | ||
super(inVersion, inId); | ||
} | ||
|
||
override function getType():String | ||
{ | ||
return "VertexArray"; | ||
} | ||
} | ||
|
||
#end |