diff options
author | Dan Gudmundsson <[email protected]> | 2010-10-06 14:05:36 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2010-11-15 10:13:05 +0100 |
commit | a9f305c51ebccefc3ce6725b4f90700a7d250287 (patch) | |
tree | 64f522982e763eb5eda411196413a15704db36c4 /lib/wx/c_src/wxe_gl.h | |
parent | b48be79573171e530d97cdf078488eb66fc23f30 (diff) | |
download | otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.gz otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.bz2 otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.zip |
Split opengl functionality into separate dynamic library
The idea is to build a separate opengl library which can be reused
by other erlang applications.
Diffstat (limited to 'lib/wx/c_src/wxe_gl.h')
-rw-r--r-- | lib/wx/c_src/wxe_gl.h | 119 |
1 files changed, 3 insertions, 116 deletions
diff --git a/lib/wx/c_src/wxe_gl.h b/lib/wx/c_src/wxe_gl.h index 3a47b3c1bd..1b556ff4ec 100644 --- a/lib/wx/c_src/wxe_gl.h +++ b/lib/wx/c_src/wxe_gl.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. + * Copyright Ericsson AB 2008-2010. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -17,119 +17,6 @@ * %CopyrightEnd% */ +#include "egl_impl.h" -#ifndef _WIN32 -# include <dlfcn.h> -#endif - -#ifndef __WXMAC__ -# include <GL/gl.h> -# include <GL/glu.h> /* Header File For The OpenGL Library */ -#else -# include <OpenGL/glu.h> /* Header File For The OpenGL Library */ -#endif - -#ifndef CALLBACK -# define CALLBACK -#endif - -#ifdef _WIN32 -# ifndef _GLUfuncptr -// Visual studio CPP ++ compiler -# define _GLUfuncptr void (_stdcall *)() -# endif -#endif - -#ifdef _GLUfuncptr -# define GLUfuncptr _GLUfuncptr -#elif defined(TESS_CB_TIGER_STYLE) -# define GLUfuncptr GLvoid (*)(...) -#else -# define GLUfuncptr GLvoid (*)() -#endif - -#ifdef WIN32 -#include <windows.h> -#include <gl/gl.h> -#elif defined(HAVE_GL_GL_H) -#include <GL/gl.h> -#elif defined(HAVE_OPENGL_GL_H) -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif - -int initOpenGL(); -void gl_error(); -extern int gl_error_op; -extern ErlDrvTermData gl_active; - -/* Some new GL types (eliminates the need for glext.h) */ - -#ifndef HAVE_GLINTPTR -#ifndef HAVE_GLINTPTRARB -# include <stddef.h> -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif /* HAVE_GLINTPTRARB */ -typedef GLintptrARB GLintptr; -typedef GLsizeiptrARB GLsizeiptr; -#endif /* HAVE_GLINTPTR */ - -#ifndef HAVE_GLCHAR -# ifndef HAVE_GLCHARARB -/* GL types for handling shader object handles and characters */ -typedef char GLcharARB; /* native character */ -typedef unsigned int GLhandleARB; /* shader object handle */ -#endif /* HAVE_GLCHARARB */ -typedef GLcharARB GLchar; -#endif - -#ifndef HAVE_GLHALFARB -/* GL types for "half" precision (s10e5) float data in host memory */ -typedef unsigned short GLhalfARB; -#endif - -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GLX_OML_sync_control extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include <inttypes.h> -#elif defined(__sun__) -#include <inttypes.h> -#if defined(__STDC__) -#if defined(__arch64__) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) -#include <inttypes.h> -#elif defined(__SCO__) || defined(__USLC__) -#include <stdint.h> -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(WIN32) && defined(_MSC_VER) -typedef long int int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#elif defined(WIN32) && defined(__GNUC__) -#include <stdint.h> -#else -#include <inttypes.h> /* Fallback option */ -#endif - -#ifndef HAVE_GLINT64EXT -typedef int64_t GLint64EXT; -typedef uint64_t GLuint64EXT; -#endif - -void init_tess(); -void exit_tess(); -int wxe_tess_impl(char* buff, ErlDrvTermData caller); +void wxe_initOpenGL(wxeReturn, char*); |