Commit 7d2def5a authored by Robert Menzel's avatar Robert Menzel
Browse files

added VAO constructor parameter

parent bd934fce
......@@ -156,6 +156,7 @@ public:
//! Bind this buffer
inline void bind( GLenum _target )
{
glBindBuffer( _target, mBuffer->mObjectName );
openGLRareError();
}
......
......@@ -67,7 +67,7 @@ public:
// ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/
public:
VertexArrayObject();
VertexArrayObject( GLenum _mode = GL_TRIANGLES );
virtual ~VertexArrayObject(void)
{
......
......@@ -71,7 +71,7 @@ typename FileManager<RESOURCE>::ConstSharedRESOURCE FileManager<RESOURCE>::get(c
{
Resource resource = { pController, pResource };
mResourceMap[_controller.getResourceName()] = resource;
Utils::debug() << "FileManager::getResource: Resource loaded: " << _controller.getResourceName() << std::endl;
//Utils::debug() << "FileManager::getResource: Resource loaded: " << _controller.getResourceName() << std::endl;
return pResource;
}
else
......@@ -194,7 +194,7 @@ typename MultiFileManager<RESOURCE>::ConstSharedRESOURCE MultiFileManager<RESOUR
{
Resource resource = { pController, pResource };
mResourceMap[_controller.getResourceName()] = resource;
Utils::debug() << "FileManager::getResource: Resource loaded: " << _controller.getResourceName() << std::endl;
//Utils::debug() << "FileManager::getResource: Resource loaded: " << _controller.getResourceName() << std::endl;
return pResource;
}
else
......
......@@ -59,7 +59,7 @@ typename NameManager<RESOURCE>::SharedResource NameManager<RESOURCE>::get(const
if(pResource)
{
mResourceMap[_key] = pResource;
Utils::debug() << "NameManager::getResource: Resource loaded: " << _key << std::endl;
//Utils::debug() << "NameManager::getResource: Resource loaded: " << _key << std::endl;
return pResource;
}
else
......
......@@ -49,7 +49,7 @@ SharedVertexArrayObject VertexArrayObjectControlFile::create(void)
{
updateFileModificationTime();
SharedVertexArrayObject vao(new VertexArrayObject());
SharedVertexArrayObject vao(new VertexArrayObject);
if(!load(vao))
return SharedVertexArrayObject();
......
......@@ -62,8 +62,6 @@ void LocationMappings::setLocations( const SharedLocationMappings &_other )
void LocationMappings::addLocation( const std::string& _name, GLuint _location )
{
ACGL::Utils::message() << "addLocation( "<< _name<< ", "<<_location<<" )"<<std::endl;
LocationMap::const_iterator location = mMappings.find(_name);
if (location == mMappings.end()) {
// name did not exist jet
......
......@@ -10,11 +10,11 @@ using namespace ACGL;
using namespace ACGL::Utils;
using namespace ACGL::OpenGL;
VertexArrayObject::VertexArrayObject() :
VertexArrayObject::VertexArrayObject( GLenum _mode ) :
mpElementArrayBuffer(),
mAttributes(),
mObjectName(0),
mMode(GL_TRIANGLES)
mMode(_mode)
{
glGenVertexArrays(1, &mObjectName);
GLint maxAttributes;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment