Replaced lines that refered to celengine/gl.h with GL/glew.h

Added code for glewinit so all render modes work in kde
updated makefile includes path to use GL/glew.h
Removed glext from kde and gtk builds
Removed celengine/gl.h from celestia.pro
sensor-dev
cartrite 2009-08-15 17:51:15 +00:00
parent ba206096eb
commit 42281e4a53
36 changed files with 50 additions and 40 deletions

View File

@ -2,7 +2,7 @@ SUBDIRS = celutil celmath cel3ds celtxf celengine celestia
DEFS = -DHIP_DATA_DIR='"$(HIPDIR)"' @DEFS@
INCLUDES = -I$(top_srcdir)/thirdparty/Eigen
INCLUDES = -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
dosstuff = winbuild.mak
buildstardb_SOURCES = buildstardb.cpp

View File

@ -43,7 +43,6 @@ libcelengine_a_SOURCES = \
frametree.cpp \
galaxy.cpp \
glcontext.cpp \
glext.cpp \
globular.cpp \
glshader.cpp \
image.cpp \

View File

@ -10,7 +10,7 @@
#include <algorithm>
#include <celmath/mathlib.h>
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "axisarrow.h"
#include "selection.h"

View File

@ -11,7 +11,7 @@
#include <cassert>
#include "boundaries.h"
#include "astro.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
using namespace Eigen;

View File

@ -13,7 +13,7 @@
#include <cassert>
#include <algorithm>
#include "celutil/utf8.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "console.h"

View File

@ -12,7 +12,7 @@
#include <celutil/color.h>
#include <celutil/util.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#include <Eigen/Core>
class FragmentProcessor;

View File

@ -22,7 +22,7 @@
#include "galaxy.h"
#include <celutil/util.h>
#include <celutil/debug.h>
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "render.h"
#include "texture.h"

View File

@ -23,7 +23,7 @@
#include "globular.h"
#include <celutil/util.h>
#include <celutil/debug.h>
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "render.h"
#include "texture.h"

View File

@ -9,7 +9,7 @@
#include <iostream>
#include "glshader.h"
#include "gl.h"
#include <GL/glew.h>
using namespace std;

View File

@ -8,7 +8,7 @@
// of the License, or (at your option) any later version.
#include "marker.h"
#include "gl.h"
#include <GL/glew.h>
using namespace std;

View File

@ -16,7 +16,7 @@
#include <celmath/ray.h>
#include <vector>
#include <string>
#include "gl.h"
#include <GL/glew.h>
#include <Eigen/Core>
#include <Eigen/Geometry>

View File

@ -16,7 +16,7 @@
#include "astro.h"
#include "opencluster.h"
#include "meshmanager.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "render.h"

View File

@ -11,7 +11,7 @@
#include <cstdarg>
#include <cstdio>
#include <celutil/utf8.h>
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "overlay.h"

View File

@ -16,7 +16,7 @@
#include <fstream>
#include <limits>
#include "particlesystem.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "rendcontext.h"
#include "texmanager.h"

View File

@ -15,7 +15,7 @@
#include <celmath/intersect.h>
#include "planetgrid.h"
#include "body.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "render.h"
#include <Eigen/Core>

View File

@ -11,7 +11,7 @@
#define _VERTEXPROG_H_
#include <celutil/color.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#include <Eigen/Core>
class VertexProcessor;

View File

@ -17,7 +17,7 @@
#include "celutil/directory.h"
#include "celutil/filetype.h"
#include "virtualtex.h"
#include "gl.h"
#include <GL/glew.h>
#include "parser.h"
using namespace std;

View File

@ -16,7 +16,7 @@
#include "visibleregion.h"
#include "body.h"
#include "selection.h"
#include "gl.h"
#include <GL/glew.h>
#include "vecgl.h"
#include "render.h"
#include <celmath/geomutil.h>

View File

@ -201,7 +201,6 @@ ENGINE_HEADERS = \
celengine/frametree.h \
celengine/galaxy.h \
celengine/globular.h \
celengine/gl.h \
celengine/glcontext.h \
celengine/glshader.h \
celengine/image.h \

View File

@ -1,7 +1,7 @@
SUBDIRS = res
bin_PROGRAMS = celestia
INCLUDES = -I.. -I$(top_srcdir)/thirdparty/Eigen
INCLUDES = -I.. -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' -DLOCALEDIR='"$(datadir)/locale"' @DEFS@

View File

@ -23,7 +23,7 @@
#include <cstring>
#include <cassert>
#include <ctime>
#include <celengine/gl.h>
#include <GL/glew.h>
#include <celutil/util.h>
#include <celutil/filetype.h>
#include <celutil/directory.h>

View File

@ -10,7 +10,6 @@
#ifndef _CELESTIACORE_H_
#define _CELESTIACORE_H_
// #include "gl.h"
#include <celutil/timer.h>
#include <celutil/watcher.h>
// #include <celutil/watchable.h>
@ -22,7 +21,7 @@
#include <celengine/universe.h>
#include <celengine/render.h>
#include <celengine/simulation.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#include "configfile.h"
#include "favorites.h"
#include "destination.h"

View File

@ -12,7 +12,7 @@
#include "celx.h"
#include "celx_internal.h"
#include "celx_object.h"
#include <celengine/gl.h>
#include <GL/glew.h>
// ==================== OpenGL ====================

View File

@ -17,7 +17,7 @@
#include <cstring>
#include <time.h>
#include <unistd.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#ifndef MACOSX
#include <GL/glut.h>
#else

View File

@ -1,6 +1,6 @@
SUBDIRS = data
INCLUDES = -I../.. -I$(top_srcdir)/thirdparty/Eigen
INCLUDES = -I../.. -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include
DEFS = -DCONFIG_DATA_DIR='"$(PKGDATADIR)"' -DLOCALEDIR='"$(datadir)/locale"' @DEFS@

View File

@ -23,8 +23,7 @@
#endif /* GNOME */
#include <celengine/body.h>
#include <celengine/gl.h>
#include <celengine/glext.h>
#include <GL/glew.h>
#include <celengine/simulation.h>
#include <celengine/cmdparser.h>
#include <celengine/render.h>

View File

@ -32,7 +32,7 @@
#include <celengine/astro.h>
#include <celengine/celestia.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#include <celengine/glext.h>
#include <celengine/galaxy.h>
#include <celengine/simulation.h>

View File

@ -9,7 +9,7 @@
#include <cstdio>
#include <celutil/debug.h>
#include "../celengine/gl.h"
#include <GL/glew.h>
#include <celengine/celestia.h>
#include "imagecapture.h"

View File

@ -30,7 +30,7 @@ if ENABLE_KDE
noinst_LIBRARIES = libkdegui.a
noinst_HEADERS = $(wildcard *.h)
INCLUDES = -I../.. -I.. -I$(top_srcdir)/thirdparty/Eigen $(QT_INCLUDES) $(KDE_INCLUDES)
INCLUDES = -I../.. -I.. -I$(top_srcdir)/thirdparty/Eigen -I$(top_srcdir)/thirdparty/glew/include $(QT_INCLUDES) $(KDE_INCLUDES)
libkdegui_a_SOURCES = \
celsplashscreen.moc.cpp \

View File

@ -16,6 +16,7 @@
***************************************************************************/
#include <GL/glew.h>
#include <libintl.h>
#include <fstream>
#include <sstream>
@ -87,8 +88,6 @@
#include "videocapturedlg.h"
#endif
#include "celengine/glext.h"
#define MENUMAXSIZE 100
using namespace Eigen;
@ -109,6 +108,7 @@ static uint32 FilterOtherLocations = ~(Location::City |
KdeApp::KdeApp(std::string config, std::string dir, std::vector<std::string> extrasDirs, bool fullscreen, bool disableSplash) : KMainWindow(0, 0)
{
#if KDE_VERSION >= 0x030200
CelSplashScreen *splash = NULL;
if (!disableSplash) {
@ -203,6 +203,20 @@ KdeApp::KdeApp(std::string config, std::string dir, std::vector<std::string> ext
}
#endif
glWidget->makeCurrent();
GLenum glewErr = glewInit();
{
if (GLEW_OK != glewErr)
{
KMessageBox::queuedMessageBox(this, KMessageBox::Information, i18n("Celestia was unable to initialize OpenGL extensions (error %1). Graphics quality will be reduced."));
}
}
// We use a timer with a null timeout value
// to add appCore->tick to Qt's event loop
QTimer *t = new QTimer( dynamic_cast<QObject *>(this) );
@ -970,7 +984,7 @@ QString KdeApp::getOpenGLInfo() {
char buf[100];
GLint simTextures = 1;
if (ExtensionSupported("GL_ARB_multitexture"))
if (glewIsExtensionSupported("GL_ARB_multitexture"))
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &simTextures);
sprintf(buf, "%s%d\n", _("Max simultaneous textures: "), simTextures);
s += buf;

View File

@ -19,8 +19,6 @@
#include <kaccel.h>
#include <unistd.h>
#include <celengine/gl.h>
//#include <celengine/glext.h>
#include <celengine/celestia.h>
#include <celengine/starbrowser.h>
#include <kmainwindow.h>

View File

@ -18,6 +18,7 @@
#ifndef KDEGLWIDGET_H
#define KDEGLWIDGET_H
#include <GL/glew.h>
#include <qgl.h>
#include <qevent.h>
#include <kaction.h>
@ -28,6 +29,7 @@
#include <string>
#include <vector>
/**
*@author Christophe Teyssier
*/

View File

@ -64,7 +64,7 @@
#include <cmath>
#include <celutil/debug.h>
#include <celutil/util.h>
#include "../celengine/gl.h"
#include <GL/glew.h>
#include <string>
#include <cstring>
#include "theora/theora.h"

View File

@ -9,7 +9,7 @@
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
#include "celengine/gl.h"
#include <GL/glew.h>
//#define WGL_WGLEXT_PROTOTYPES 1
#include "wglext.h"
#include <windows.h>

View File

@ -5,7 +5,7 @@ noinst_DATA = $(dosstuff)
EXTRA_DIST = $(noinst_DATA)
INCLUDES = -I..
INCLUDES = -I.. -I$(top_srcdir)/thirdparty/glew/include
libceltxf_a_SOURCES = \
texturefont.cpp

View File

@ -21,7 +21,7 @@
#include <celutil/bytes.h>
#include <celutil/utf8.h>
#include <celutil/util.h>
#include <celengine/gl.h>
#include <GL/glew.h>
#include "texturefont.h"
using namespace std;