/*
- * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
float material_ambient[] = {0.2, 0.2, 0.2, 1.0};
float material_diffuse[] = {0.8, 0.8, 0.8, 1.0};
- float material_specular[] = {0.0, 0.0, 0.0, 1.0};
+ float material_specular[] = {0.1, 0.1, 0.1, 1.0};
float material_emission[] = {0.0, 0.0, 0.0, 1.0};
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, material_ambient);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, material_diffuse);
glRotatef(lat, 1, 0, 0);
glRotatef(-lon, 0, 1, 0);
- /* Misc */
- gdouble rg = MAX(0, 1-(elev/20000));
- gdouble blue = MAX(0, 1-(elev/50000));
- glClearColor(MIN(0.65,rg), MIN(0.65,rg), MIN(1,blue), 1.0f);
- glColor4f(1, 1, 1, 1);
-
glDisable(GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/*********************
* GisViewer methods *
*********************/
-GisViewer *gis_opengl_new(GisPlugins *plugins)
+GisViewer *gis_opengl_new(GisPlugins *plugins, GisPrefs *prefs)
{
g_debug("GisOpenGL: new");
GisViewer *self = g_object_new(GIS_TYPE_OPENGL, NULL);
- self->plugins = plugins;
+ gis_viewer_setup(self, plugins, prefs);
return self;
}