modify hunam render to translate
This commit is contained in:
parent
5d96f91a26
commit
0825075587
@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES(
|
||||
${Thirdparty}
|
||||
${Thirdparty}/spdlog/include
|
||||
${Thirdparty}/libipc/include
|
||||
${Thirdparty}/zeromq/include
|
||||
#${Thirdparty}/zeromq/include
|
||||
)
|
||||
|
||||
link_directories(
|
||||
@ -33,7 +33,7 @@ link_directories(
|
||||
${Thirdparty}/glew/lib
|
||||
${Thirdparty}/spdlog/lib
|
||||
${Thirdparty}/libipc/lib
|
||||
${Thirdparty}/zeromq/debug/lib
|
||||
#${Thirdparty}/zeromq/debug/lib
|
||||
)
|
||||
|
||||
# IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
@ -72,7 +72,7 @@ target_link_libraries(
|
||||
glfw3
|
||||
debug spdlogd
|
||||
optimized spdlog
|
||||
libzmq-mt-gd-4_3_5
|
||||
#libzmq-mt-gd-4_3_5
|
||||
)
|
||||
|
||||
|
||||
|
@ -26,6 +26,6 @@ public:
|
||||
private:
|
||||
std::chrono::time_point<std::chrono::steady_clock> lastHeartbeatTime_;
|
||||
|
||||
std::unique_ptr<ZmqMoudle> zmqMoudle_;
|
||||
//std::unique_ptr<ZmqMoudle> zmqMoudle_;
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <assert.h>
|
||||
|
||||
#if 0
|
||||
#include <zmq.hpp>
|
||||
|
||||
ZmqMoudle::ZmqMoudle(ZmqMoudleCallback callback)
|
||||
@ -58,3 +58,4 @@
|
||||
work_->join();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <functional>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
|
||||
#if 0
|
||||
using ZmqMoudleCallback = std::function<void(const char* , unsigned int)>;
|
||||
class ZmqMoudle {
|
||||
public:
|
||||
@ -19,3 +19,4 @@ private:
|
||||
void* context_{ nullptr };
|
||||
std::atomic<bool> shouldExit_;
|
||||
};
|
||||
#endif
|
||||
|
13
src/Main.cpp
13
src/Main.cpp
@ -40,8 +40,8 @@ static int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevI
|
||||
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE);
|
||||
}
|
||||
|
||||
glfwWindowHint(GLFW_RESIZABLE, true);
|
||||
glfwWindowHint(GLFW_DECORATED, true);
|
||||
//glfwWindowHint(GLFW_RESIZABLE, true);
|
||||
//glfwWindowHint(GLFW_DECORATED, true);
|
||||
glfwWindowHint(GLFW_FOCUSED, true);
|
||||
glfwWindowHint(GLFW_MAXIMIZED, false);
|
||||
glfwWindowHint(GLFW_FLOATING, false);
|
||||
@ -49,6 +49,11 @@ static int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevI
|
||||
glfwWindowHint(GLFW_AUTO_ICONIFY, true);
|
||||
//glfwWindowHint(GLFW_REFRESH_RATE, settings.refreshRate);
|
||||
glfwWindowHint(GLFW_SAMPLES, 4);
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
|
||||
glfwWindowHint(GLFW_DECORATED, GL_FALSE);
|
||||
|
||||
//glfwWindowHint(GLFW_MOVABLE, GL_TRUE);
|
||||
|
||||
GLFWwindow* window = glfwCreateWindow(860, 540, "humanRender", nullptr, nullptr);
|
||||
if (!window) {
|
||||
@ -57,6 +62,8 @@ static int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevI
|
||||
return false;
|
||||
}
|
||||
|
||||
glfwSetWindowPos(window, 300, 600);
|
||||
glfwSetWindowAttrib(window, GLFW_FLOATING, GLFW_TRUE);
|
||||
glfwSetKeyCallback(window, [](GLFWwindow* window, int key, int scancode, int action, int mods) {
|
||||
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
|
||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||
@ -121,7 +128,7 @@ static int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevI
|
||||
Texture2D background;
|
||||
int width, height, nrChannels;
|
||||
// The FileSystem::getPath(...) is part of the GitHub repository so we can find files on any IDE/platform; replace it with your own image path.
|
||||
unsigned char* data = stbi_load("./data/background/background.jpg", &width, &height, &nrChannels, 0);
|
||||
unsigned char* data = stbi_load("./data/background/background.png", &width, &height, &nrChannels, 0);
|
||||
if (data) {
|
||||
background.Create(width, height, nrChannels, nullptr);
|
||||
background.Update(width, height, nrChannels, data);
|
||||
|
Loading…
Reference in New Issue
Block a user