Closed nonlinear1 closed 5 years ago
Hello, try asking on the Discord channel https://discordapp.com/invite/NgJ4SEP
I cann't link the web cite, may be my internet is constrained.
在 2019-09-20 17:23:19,omar notifications@github.com 写道:
Hello, try asking on the Discord channel https://discordapp.com/invite/NgJ4SEP
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Thank you ocornut, I have join the channel
I have now written a tutorial to cover image file loading for common graphics API: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
hi ocornut, i readed u document, i not found any about vulkan add image content. just have gl and dx, for use vulkan what should to do?
@AncientPaper The Vulkan backend doesn't support user-specified textures. You can try applying https://github.com/ocornut/imgui/pull/914 to your local copy of the backend to enable support.
here is my environment: My os: ubuntu18.04 Hardware: i7-7700 ram 16G GPU: gtx1070 the following is my program source code: // ImGui - standalone example application for GLFW + OpenGL 3, using programmable pipeline // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. // (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
include
include "imgui.h"
include "imgui_impl_glfw.h"
include "imgui_impl_opengl3.h"
include
define STB_IMAGE_IMPLEMENTATION
include
// About OpenGL function loaders: modern OpenGL doesn't have a standard header file and requires individual function pointers to be loaded manually. // Helper libraries are often used for this purpose! Here we are supporting a few common ones: gl3w, glew, glad. // You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
include <GL/gl3w.h> // Initialize with gl3wInit()
elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
include <GL/glew.h> // Initialize with glewInit()
elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
include <glad/glad.h> // Initialize with gladLoadGL()
else
include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
endif
include <GLFW/glfw3.h> // Include glfw3.h after our OpenGL definitions
static void glfw_error_callback(int error, const char* description) { fprintf(stderr, "Glfw Error %d: %s\n", error, description); }
int main(int, char**) { // Setup window glfwSetErrorCallback(glfw_error_callback); if (!glfwInit()) return 1;
if APPLE
else
endif
if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
endif
}