Skip to content

Commit

Permalink
libgui|GLBuffer: Drawing is a const operation
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 12, 2014
1 parent e944681 commit 38ac04e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/libgui/include/de/gui/glbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class LIBGUI_PUBLIC GLBuffer : public Asset

void setIndices(gl::Primitive primitive, Indices const &indices, gl::Usage usage);

void draw(duint first = 0, dint count = -1);
void draw(duint first = 0, dint count = -1) const;

protected:
void setFormat(internal::AttribSpecs const &format);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/libgui/src/glbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ DENG2_PIMPL(GLBuffer)
return GL_TRIANGLES;
}

void enableArrays(bool enable)
void enableArrays(bool enable) const
{
DENG2_ASSERT(specs.first != 0); // must have a spec

Expand Down Expand Up @@ -284,7 +284,7 @@ void GLBuffer::setIndices(Primitive primitive, Indices const &indices, Usage usa
setIndices(primitive, indices.size(), indices.constData(), usage);
}

void GLBuffer::draw(duint first, dint count)
void GLBuffer::draw(duint first, dint count) const
{
if(!isReady()) return;

Expand Down

0 comments on commit 38ac04e

Please sign in to comment.