FLTK logo

Re: [fltk.general] OpenGL - displayList - gl_draw

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: OpenGL - displayList - gl_draw Ian MacArthur Sep 25, 2020  
 
On 25 Sep 2020, at 18:44, holm.haavard wrote:
> 

Given the usual caveat that no one should take GL advice from me, since I’m rubbish at it... 

>   static GLuint DisplayList=-1;
>   if (DisplayList<0){ glDeleteLists(DisplayList, 1);


Is that even valid? Here you will be deleting a list that has never been created, which seems... wrong...

>     DisplayList = glGenLists (1);
>     glNewList(DisplayList, GL_COMPILE);
>     gl_draw(wire ? "Cube: wire" : "Cube: flat", -4.5f, -4.5f );


I’m not sure it makes sense to put this a list anyway, as the whole point is that it might change from one draw() to another, so needs to be checked on each iteration...


Also, if I understand properly, your concern is that gl_draw() is too heavy to call every time. Do you have actual measurements to show this?
In practice the gl_draw() in 1.4 generally caches it’s output texture buffer, so if the text string does not change, it should be pretty cheap to call.

What do your timings show?


-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/69A00205-B809-4916-B7D5-2F6DFF44C28D%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.