23 lines
669 B
C++
23 lines
669 B
C++
#ifndef WC3RE_RENDER_RENDERUTIL_HH__
|
|
#define WC3RE_RENDER_RENDERUTIL_HH__
|
|
|
|
#include "GlResource.hh"
|
|
|
|
namespace render {
|
|
unsigned ilog2(unsigned in);
|
|
|
|
// Return (GL_MAX_TEXTURE_SIZE, GL_MAX_ARRAY_TEXTURE_LAYERS)
|
|
std::tuple<unsigned, unsigned> getGLTextureMaximums();
|
|
|
|
// call glUseProgram if program != current program
|
|
void useProgram(gl::GLuint program);
|
|
|
|
bool extensionSupported(std::string const& extname);
|
|
|
|
TextureResource create2DTexture(unsigned width, unsigned height, bool alpha, unsigned levels = 0);
|
|
TextureResource create2DArrayTexture(unsigned width, unsigned height, unsigned count,
|
|
bool alpha, unsigned levels = 0);
|
|
}
|
|
|
|
#endif
|