I want to develop a little GUI for Games and other thing with Buttons, Scrollbars and so on. But how should I store and render the Textures? Should I use Buffer Objects or Texture Objects? Should I use Texture Mapping to map the Textures on a Polygon or should I use glDrawPixels?
What is the most efficient way to render the textures for the control elements?
ok I try to ask in another way. What is fastest and most efficient way to draw a Texture?
Hmm… most efficient way. In Opengl you won’t get a direct response for that kind of things. I can tell you how i do it though. I have vector of a struct that contains texcoord, size of a quad and some other things i want to draw for that frame and at the end i draw every widget in the same layer/frame in one pass like.
dd.set_stream(vs_vertex, type_f32, 2, stride, &v.pos);
dd.set_stream(vs_texcoord, type_f32, 2, stride, &v.tuv);
dd.set_vertex_format(has_vertex | has_texcoord);
Hope it gives you an idea.