Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //snippe 1
- GLuint texture = 0;
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexStorage2D(GL_TEXTURE_2D, 10, GL_RGBA8, 512, 512);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 512, 512, GL_RGBA, GL_UNSIGNED_BYTE, image_buffer);
- glGenerateMipmap(GL_TEXTURE_2D);
- //snippe 2
- GLuint texture = 0;
- glGenTextures(1, &texture);
- glTextureImage2DEXT(texture, GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_buffer);
- glGenerateTextureMipmapEXT(texture, GL_TEXTURE_2D);
- //snippe 3
- GLuint texture = 0;
- glGenTextures(1, &texture);
- glTextureStorage2DEXT(texture, GL_TEXTURE_2D, 10, GL_RGBA8, 512, 512);
- glTextureSubImage2DEXT(texture, GL_TEXTURE_2D, 0, 0, 0, 512, 512, GL_RGBA, GL_UNSIGNED_BYTE, image_buffer);
- glBindTexture(GL_TEXTURE_2D, texture);
- glGenerateMipmap(GL_TEXTURE_2D);
- //snippe 4
- GLuint texture = 0;
- glGenTextures(1, &texture);
- glTextureStorage2DEXT(texture, GL_TEXTURE_2D, 10, GL_RGBA8, 512, 512);
- glTextureSubImage2DEXT(texture, GL_TEXTURE_2D, 0, 0, 0, 512, 512, GL_RGBA, GL_UNSIGNED_BYTE, image_buffer);
- glBindTexture(GL_TEXTURE_2D, texture); //for some reason
- glGenerateTextureMipmapEXT(texture, GL_TEXTURE_2D);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement