mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Fixed OpenGL texture loading example in comment + Discourse link to root of discourse
This commit is contained in:
@ -598,6 +598,8 @@ CODE
|
||||
GLuint my_opengl_texture;
|
||||
glGenTextures(1, &my_opengl_texture);
|
||||
glBindTexture(GL_TEXTURE_2D, my_opengl_texture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image_width, image_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_data);
|
||||
|
||||
|
Reference in New Issue
Block a user