Advertisement

opengl es texturing line

Started by November 25, 2017 10:40 AM
2 comments, last by cebugdev 7 years, 2 months ago

i have an application that allows drawing thru touch just like paint and using opengl es (mobile),

currently, the line is just drawing with simple/default line style of opengl using GL_LINE_STRIP,

i want to have different pen style on it, just like attached, 

so my question, is it possible to texture an opengl Line (GL_LINE_STRIP) so i can achieve my desired effect (see attached)?

i know its possible to texture an OpenGL point via point sprite, but i have not found anything related to texturing an opengl Line.

is this possible?

S2.png

I think you'll have to use GL_TRIANGLES to create a strip of quads to achieve any reasonable level of control over line thickness and texturing.

Advertisement

if that's the case, can you guys point me to any resources or tutorials on how to render lines as triangles efficiently without using so m any vertices?

This topic is closed to new replies.

Advertisement