o use gl_VertexID with #version 120 it ’s necessar to indicate #extension : #extension GL_EXT_gpu_shader4 : require
> Le 14 juin 2018 à 13:12, Claude Heiland-Allen <cla...@mathr.co.uk> a écrit : > > Hi Philippe, > > 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: > > https://stackoverflow.com/questions/19021567/finding-supported-glsl-version#19022416 > > <https://stackoverflow.com/questions/19021567/finding-supported-glsl-version#19022416> > > For OpenGL 2.1 you need this as first line of your shader: > > #version 120 > > The good news is that gl_VertexID is supported in almost all GLSL versions: > > http://docs.gl/sl4/gl_VertexID <http://docs.gl/sl4/gl_VertexID> > > For OpenGL ES (as found on embedded devices, eg mobile phones) you might not > be so lucky: > > http://docs.gl/el3/gl_VertexID <http://docs.gl/el3/gl_VertexID> > > But I don't know if Gem supports attribute-less rendering (ie, just using > gl_VertexID without any vertex data or element index buffers). > > > Claude >> Can I use a version 2 for a vertex shader ? >> >> if I don’t declare a version >> gl_VertexID is not recognized >> >> Philippe >> >> >> >>> Le 14 juin 2018 à 06:27, Philippe Boisnard <philem...@mac.com> a écrit : >>> >>> >>> Hello >>> >>> 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 >>> >>> Philippe >>> _______________________________________________ >>> Pd-list@lists.iem.at mailing list >>> UNSUBSCRIBE and account-management -> >>> https://lists.puredata.info/listinfo/pd-list >> >> _______________________________________________ >> Pd-list@lists.iem.at <mailto:Pd-list@lists.iem.at> mailing list >> UNSUBSCRIBE and account-management -> >> https://lists.puredata.info/listinfo/pd-list >> <https://lists.puredata.info/listinfo/pd-list> > -- > https://mathr.co.uk <https://mathr.co.uk/> > > > _______________________________________________ > Pd-list@lists.iem.at <mailto:Pd-list@lists.iem.at> mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > <https://lists.puredata.info/listinfo/pd-list>
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list