[PD] use gl_VertexID
claude at mathr.co.uk
Thu Jun 14 13:12:23 CEST 2018
On 14/06/18 10:51, Philippe Boisnard wrote:
> I continue to search to use gl_VertexID
> when I want to declare a version in vertex shader script, I want to declare for example
> #version 2.1 (it’s the openGL version when I check with print gemwin)
> but I have this in the PD_Terminal
> ERROR: 0:1: '' : version '2' is not supported
The GL/GLSL version numbering is a bit obscure:
For OpenGL 2.1 you need this as first line of your shader:
The good news is that gl_VertexID is supported in almost all GLSL versions:
For OpenGL ES (as found on embedded devices, eg mobile phones) you might
not be so lucky:
But I don't know if Gem supports attribute-less rendering (ie, just
using gl_VertexID without any vertex data or element index buffers).
> Can I use a version 2 for a vertex shader ?
> if I don’t declare a version
> gl_VertexID is not recognized
>> Le 14 juin 2018 à 06:27, Philippe Boisnard <philemon1 at mac.com> a écrit :
>> I have a question about shader
>> I search to work with gl_VertexID in .vert script.
>> Some one have an example to implement this in .vert.
>> With gl_VertexID, you can have an array of vertex with no input array for VBO and you can detreminate in real time the size of VertexArray with no latencies.
>> I know that we can use this, but I have difficulties.
>> best regards
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
More information about the Pd-list