MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / create_texture

Function create_texture

test/minimal_webgl/webgl.c:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33static GLuint create_texture()
34{
35 GLuint texture;
36 glGenTextures(1, &texture);
37 glBindTexture(GL_TEXTURE_2D, texture);
38 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
39 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
40 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
41 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
42 return texture;
43}
44
45void init_webgl(int width, int height)
46{

Callers 3

init_webglFunction · 0.85
find_or_cache_urlFunction · 0.85
find_or_cache_characterFunction · 0.85

Calls 1

glGenTexturesFunction · 0.85

Tested by

no test coverage detected