Skip to content

Commit e635ce8

Browse files
committed
Merge branch 'master' into registration
2 parents a2b72c6 + 9580419 commit e635ce8

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

examples/protonect/src/cpu_depth_packet_processor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include <iostream>
3333
#include <fstream>
3434

35+
#include <limits>
36+
3537
#if defined(WIN32)
3638
#define _USE_MATH_DEFINES
3739
#include <math.h>

examples/protonect/src/opencl_depth_packet_processor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
#ifdef __APPLE__
4343
#include <OpenCL/cl.hpp>
4444
#else
45+
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
46+
#include <CL/cl.h>
47+
#undef CL_VERSION_1_2
4548
#include <CL/cl.hpp>
4649
#endif
4750

examples/protonect/src/opengl_depth_packet_processor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,15 @@ struct Texture : public WithOpenGLBindings
278278
bindToUnit(GL_TEXTURE0);
279279
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
280280
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
281+
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
282+
glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
281283
glTexImage2D(GL_TEXTURE_RECTANGLE, 0, FormatT::InternalFormat, width, height, 0, FormatT::Format, FormatT::Type, 0);
282284
}
283285

284286
void upload()
285287
{
286288
bindToUnit(GL_TEXTURE0);
289+
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
287290
glTexSubImage2D(GL_TEXTURE_RECTANGLE, /*level*/0, /*xoffset*/0, /*yoffset*/0, width, height, FormatT::Format, FormatT::Type, data);
288291
}
289292

examples/protonect/src/test_opengl_depth_packet_processor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ int main(int argc, char **argv) {
5858
glfwInit();
5959
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
6060
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
61+
#ifdef __APPLE__
62+
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
63+
#endif
6164
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
6265

6366
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);

0 commit comments

Comments
 (0)