Added EGL linking and useage for the linux cl_khr_gl_sharing
interaction. This still crashes on my machine but at least its getting closer to working. Fixed some warnings and errors while compiling with clang++
This commit is contained in:
@@ -171,11 +171,11 @@ bool Application::game_loop() {
|
||||
sf::Vector2f dir = camera->get_direction();
|
||||
sf::Vector3f pos = camera->get_position();
|
||||
|
||||
ImGui::Text(std::to_string(dir.x).c_str());
|
||||
ImGui::Text(std::to_string(dir.y).c_str());
|
||||
ImGui::Text(std::to_string(pos.x).c_str());
|
||||
ImGui::Text(std::to_string(pos.y).c_str());
|
||||
ImGui::Text(std::to_string(pos.z).c_str());
|
||||
ImGui::Text("%f", dir.x);
|
||||
ImGui::Text("%f", dir.y);
|
||||
ImGui::Text("%f", pos.x);
|
||||
ImGui::Text("%f", pos.y);
|
||||
ImGui::Text("%f", pos.z);
|
||||
|
||||
ImGui::NextColumn();
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CLCaster.h"
|
||||
|
||||
|
||||
CLCaster::CLCaster() {}
|
||||
CLCaster::~CLCaster() {}
|
||||
|
||||
@@ -570,8 +569,10 @@ bool CLCaster::create_shared_context()
|
||||
#ifdef linux
|
||||
|
||||
cl_context_properties context_properties[] = {
|
||||
CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
|
||||
CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
|
||||
//CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
|
||||
//CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
|
||||
CL_GL_CONTEXT_KHR, (cl_context_properties)eglGetCurrentContext(),
|
||||
CL_EGL_DISPLAY_KHR, (cl_context_properties)eglGetCurrentDisplay(),
|
||||
CL_CONTEXT_PLATFORM, (cl_context_properties)platform_id,
|
||||
0
|
||||
};
|
||||
|
||||
@@ -13,8 +13,8 @@ ConfigDB::~ConfigDB()
|
||||
|
||||
bool ConfigDB::init(std::string root_config_path) {
|
||||
|
||||
for (auto& p : std::experimental::filesystem::directory_iterator("../config"))
|
||||
std::cout << p << '\n';
|
||||
//for (auto& p : std::experimental::filesystem::directory_iterator("../config"))
|
||||
// std::cout << p << '\n';
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Logger::LogDest Logger::log_destination = LogDest::STDOUT;
|
||||
Logger::LogLevel Logger::log_level = LogLevel::INFO;
|
||||
std::ofstream Logger::log_file;
|
||||
|
||||
void Logger::log(std::string log_string, LogLevel severity, uint32_t line_number, char* file_name) {
|
||||
void Logger::log(std::string log_string, LogLevel severity, uint32_t line_number,const char* file_name) {
|
||||
|
||||
if (severity < log_level)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user