/** Uploads new data into the buffer if necessary. */
void refresh() const { if(buffer && dirty) upload_data(0); }
+ /** Returns an object which can be used to upload data to the buffer using
+ mapped memory. */
AsyncUpdater *refresh_async() const;
private:
private:
/** Uploads data to the buffer. Receives pointer to mapped buffer memory as
- parameter. If null, buffer interface should be used instead. */
+ parameter, or null to use the buffer upload interface. */
void upload_data(char *) const;
};
{
/* If the global dirty flag affects this program, add it to per-program
dirty flags and clear the global flag. A previously unseen program will
- always cause this to happen. */
+ cause this to happen if there's any dirty uniforms. */
if(affected)
{
for(BlockMap::iterator i=blocks.begin(); i!=blocks.end(); ++i)