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

Interoperability with GL / Texture Unbind #81

Closed ucacaxm closed 9 years ago

ucacaxm commented 10 years ago

Hi Matus,

I have just updated and I have two questions:

1) How do I get the ID of GL? I used //oglplus::Expose( m_t) .Name() //FriendOfoglplus::Texture::GetName( m_t) but it has changed and I can not find how to do it now ... Maybe it could be interesting to point to an example in this page or to give the code example: http://oglplus.org/oglplus/html/index.html#feat_interoperability_with_opengl

2) I would like to Unbind Texture Unbind I found to unbind a VertexArray and different object: oglplus::NoVertexArray::Bind() but I can not do NoTexture::Bind() or something like that ..

Sorry for these two stupid questions ... Thanks, alex

matus-chochlik commented 10 years ago

Hi Alex,

now you can do:

Texture tex;
GLuint raw_name = GetGLName(tex);

to unbind use DefaultTexture (=texture object zero):

DefaultTexture::Bind(target);

HTH

Best, Matus