Beatmup
storage.cpp File Reference
#include "storage.h"
#include "../gpu/bgl.h"
#include "../gpu/texture_handler.h"
#include "../utils/string_builder.h"
#include "../utils/bitset.h"
#include "../exception.h"
#include "../platform.h"
#include <cstring>
#include <map>

Go to the source code of this file.

Functions

static void bind (int unit, GL::handle_t texture)
 

Function Documentation

◆ bind()

static void bind ( int  unit,
GL::handle_t  texture 
)
inlinestatic

Definition at line 38 of file storage.cpp.

38  {
39  glActiveTexture(GL_TEXTURE0 + unit);
40  glBindTexture(GL_TEXTURE_2D, texture);
41  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
42  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
43 #ifdef BEATMUP_DEBUG
44  GL::GLException::check("binding storage texture");
45 #endif
46 }