As I understand it, calling ES 2.0 functions are not yet supported correct? Also a mesh is rendered as a VBO. Is there a way to explicit specify vertices for a mesh, say with (GL_TRIANGLES)?
I'm trying to draw a mesh many times with an offset. But I'm thinking it would be better performance to just repeat the vertices and offsets(as vertices) in one mesh declaration instead of constantly calling the rendering of a small mesh many times sending the offsets to the shader. This the way I was doing it in android ndk project. How could I do something similar with ZGE.
Maybe I can do an expression that that create a the mesh multiple times modifying the offset(vertices) and then combines the meshes together using mesh combine, not sure if it can be used that way.
Thanks, any advice/help.
-Jazz
Calling gl ES 2.0 functions.
Moderator: Moderators
Hi Jazz,
You can achieve this with the MeshLoop component.
For an example, try copying the text below and paste into the Content node in ZGE.
Also, if you want to make direct GL calls: right click in tree, select Add from library, then External Libaries - OpenGL 4.0 graphics. This is the full 4.0 API but all the GL ES 2.0 calls should be included there.
You can achieve this with the MeshLoop component.
For an example, try copying the text below and paste into the Content node in ZGE.
Code: Select all
ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Mesh Name="Mesh1">
<Producers>
<MeshLoop Scale="1.1 1.1 1.1" Count="5" Position="0.25 0.25 0.25">
<OnIteration>
<MeshSphere/>
</OnIteration>
</MeshLoop>
</Producers>
</Mesh>