Login  Register

Re: how to use glDraw*Instanced()

Posted by toruwest on Oct 09, 2014; 2:30pm
URL: https://forum.jogamp.org/how-to-use-glDraw-Instanced-tp4033277p4033295.html

 I've changed my code to use com.jogamp.opengl.math.Matrix4 class instead of MyMatrixUtil2  ( I found Matrix4 class today...), and upload them to GitHub (https://github.com/toruwest/jogl-instanced/blob/master/jogl-instanced/src/InstancedRenderer1.java)
 But the screen is still blank.

> Have you ever tested your code on another machine with another operating system?

No, currently, my main concern is to write multi triangle sample code. So I am not motivated to complete to port the redbook's sample so much.
 
I have created the new demo code found here : https://github.com/toruwest/jogl-instanced-many-triangles/tree/master/jogl-instanced-many-triangles/src/demos/triangles/ManyTriangleVAOInstancedExperiment0.java   

This works very fine.  

Next step, I tried to modify it to use ShaderState, GLUniformData, and GLArrayDataServer.
(Please See https://github.com/toruwest/jogl-instanced-many-triangles/tree/master/jogl-instanced-many-triangles/src/demos/triangles/ManyTriangleVAOInstancedExperiment1.java )

This code runs without any exceptions, but the screen is blank.   Note that I use DebugGL4 and it indicates no message.

Any advice will be very appreciated.