OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::BufferTypedMap< Type > Class Template Reference

Typed mapping of the buffer to the client address space. More...

#include </home/chochlik/devel/oglplus/include/oglplus/buffer_map.hpp>

Inheritance diagram for oglplus::BufferTypedMap< Type >:
Collaboration diagram for oglplus::BufferTypedMap< Type >:

Public Member Functions

 BufferTypedMap (BufferTarget target, BufferTypedSize< Type > offset, BufferTypedSize< Type > size, Bitfield< BufferMapAccess > access)
 Maps a range of the buffer. More...
 
 BufferTypedMap (BufferTarget target, Bitfield< BufferMapAccess > access)
 Maps the whole buffer. More...
 
 BufferTypedMap (BufferTypedMap &&temp)
 Move construction is enabled.
 
GLsizeiptr Count (void) const
 Returns the count of elements of Type in the mapped buffer.
 
const Type * Data (void) const
 Returns a const pointer to the mapped data.
 
Type * Data (void)
 Returns a pointer to the mapped data.
 
const Type & At (GLuint index) const
 Returns a const reference to the element at the specified index.
 
Type & At (GLuint index)
 Returns a reference to the element at the specified index.
 
void FlushElements (BufferTypedSize< Type > start, BufferTypedSize< Type > count)
 Indicate modifications to a mapped range of elements of Type. More...
 
void Unmap (void)
 Unmaps the buffer from client address space. More...
 
bool Mapped (void) const
 Returns true if the buffer is mapped.
 
GLsizeiptr Size (void) const
 Returns the size (in bytes) of the mapped buffer.
 
const GLvoid * RawData (void) const
 Returns a const pointer to the mapped data. More...
 
GLvoid * RawData (void)
 Returns a pointer to the mapped data. More...
 
void FlushRange (BufferSize offset, BufferSize length)
 Indicate modifications to a mapped range. More...
 

Detailed Description

template<typename Type>
class oglplus::BufferTypedMap< Type >

Typed mapping of the buffer to the client address space.

Constructor & Destructor Documentation

template<typename Type >
oglplus::BufferTypedMap< Type >::BufferTypedMap ( BufferTarget  target,
BufferTypedSize< Type >  offset,
BufferTypedSize< Type >  size,
Bitfield< BufferMapAccess access 
)

Maps a range of the buffer.

Parameters
targetuse the buffer bound to the target specified
offsetmap offset in units of Type
sizemap size in units of Type
accessthe access specifier for the buffer mapping
Exceptions
Error
template<typename Type >
oglplus::BufferTypedMap< Type >::BufferTypedMap ( BufferTarget  target,
Bitfield< BufferMapAccess access 
)

Maps the whole buffer.

Parameters
targetuse the buffer bound to the target specified
accessthe access specifier for the buffer mapping

This class is non-copyable.

Exceptions
Error

Member Function Documentation

template<typename Type >
void oglplus::BufferTypedMap< Type >::FlushElements ( BufferTypedSize< Type >  start,
BufferTypedSize< Type >  count 
)

Indicate modifications to a mapped range of elements of Type.

Parameters
startIndex of the first element.
countThe number of elements to be flushed.
Related OpenGL symbols:
glFlushMappedBufferRange
Precondition
this->Mapped()
Exceptions
Error

References oglplus::BufferRawMap::FlushRange().

void oglplus::BufferRawMap::FlushRange ( BufferSize  offset,
BufferSize  length 
)
inherited

Indicate modifications to a mapped range.

Related OpenGL symbols:
glFlushMappedBufferRange
Precondition
Mapped()
Exceptions
Error

References oglplus::BufferSize::Get().

Referenced by oglplus::BufferTypedMap< Type >::FlushElements().

const GLvoid* oglplus::BufferRawMap::RawData ( void  ) const
inherited

Returns a const pointer to the mapped data.

Precondition
Mapped()

References oglplus::BufferRawMap::Mapped().

Referenced by oglplus::BufferTypedMap< Type >::Data().

GLvoid* oglplus::BufferRawMap::RawData ( void  )
inherited

Returns a pointer to the mapped data.

Precondition
Mapped()

References oglplus::BufferRawMap::Mapped().

void oglplus::BufferRawMap::Unmap ( void  )
inherited

Unmaps the buffer from client address space.

Related OpenGL symbols:
glUnmapBuffer
Exceptions
Error

Referenced by oglplus::BufferRawMap::~BufferRawMap().


The documentation for this class was generated from the following file:

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).