add openglexample from OpenHMD
This commit is contained in:
34
examples/opengl/gl.h
Normal file
34
examples/opengl/gl.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* OpenHMD - Free and Open Source API and drivers for immersive technology.
|
||||
* Copyright (C) 2013 Fredrik Hultin.
|
||||
* Copyright (C) 2013 Jakob Bornecrantz.
|
||||
* Distributed under the Boost 1.0 licence, see LICENSE for full text.
|
||||
*/
|
||||
|
||||
/* OpenGL Test - Interface For GL Helper Functions */
|
||||
|
||||
#ifndef GL_H
|
||||
#define GL_H
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include <lvrc.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int w, h;
|
||||
EGLDisplay display;
|
||||
EGLSurface surface;
|
||||
EGLContext context;
|
||||
int is_fullscreen;
|
||||
} gl_ctx;
|
||||
|
||||
void ortho(gl_ctx* ctx);
|
||||
void perspective(gl_ctx* ctx);
|
||||
void init_gl(gl_ctx* ctx, struct lvrcInstance * compositor);
|
||||
void draw_cube(void);
|
||||
void create_fbo(int eye_width, int eye_height, GLuint* fbo, GLuint* color_tex, GLuint* depth_tex);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user