matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

Expose ? #62

Closed ucacaxm closed 10 years ago

ucacaxm commented 10 years ago

hi again,

In the last update, the exposed.hpp does not exist any more ? The standard way to get the GL ID is now like that FriendOf::GetName( m_texture );

Instead of before Expose( m_texture ]).Name() ?

Thanks, alex

matus-chochlik commented 10 years ago

Hi,

yeah, the Expose function was internally IMO little overdone, it created a new copy of the object with additional methods just to return the name. So right now the FriendOf template is used instead which is admittedly more verbose. I'm thinking about adding an ExposeGLName function that would be a little more convenient:

GLuint ExposeGLName(const Object& object)
{
    return FriendOf<Object>::GetName(object);
}