Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux fixes #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lux/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
# Plugins by Fenn
import guilloche
import tween_chain
import party_in_your_pants
import butterfly_curve
import harmonograph
#import mesh

# local only
#import physics
#import sandbox

# Plugins by Tristan U.
import swallow_tail
Expand Down
6 changes: 4 additions & 2 deletions xenon/Lux/VideoEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
#include <xenon/Core/Log.h>
#include <xenon/Core/Time.h>

#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <AGL/agl.h>
#else // Linux
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#endif

// OpenCV
Expand Down Expand Up @@ -163,13 +165,13 @@ void lux::VideoEngine::draw_gl() {

if (!m_initialized)
return;

#ifdef __APPLE__
int syphon_width = m_syphon_client.getWidth();
int syphon_height = m_syphon_client.getHeight();
float syphon_aspect = 1.0;
if (syphon_width != 0 && syphon_height != 0)
syphon_aspect = float(syphon_width) / syphon_height;

#endif
// FIRST: DRAW INTO THE RENDER BUFFER (AT LOW RES) AND READ OUT THE PIXELS
glViewport(0, 0, m_viewport_width, m_viewport_height);
glMatrixMode(GL_PROJECTION);
Expand Down
12 changes: 12 additions & 0 deletions xenon/Lux/VideoEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
#include <xenon/Graphics/SyphonClient.h>
#endif


#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <AGL/agl.h>
#else // Linux
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#endif

// OpenCV
#include <opencv/cv.h>

Expand Down