Compare commits

..

4 Commits

Author SHA1 Message Date
curt
a1c59071a1 Changes by David Megginson. 2000-05-16 16:21:08 +00:00
curt
13af443057 cygwin32 fix for gdbm 2000-04-27 01:28:22 +00:00
curt
b8e2b0d0f9 Fixes for cygwin32 builds. 2000-04-27 01:26:36 +00:00
curt
53cd776bf6 Tweaks. 2000-03-30 00:48:38 +00:00
9 changed files with 30 additions and 434 deletions

View File

@@ -6,7 +6,7 @@ dnl $Id$
AC_INIT(simgear/bucket/newbucket.cxx)
dnl Initialize the automake stuff
AM_INIT_AUTOMAKE(SimGear, 0.0.7)
AM_INIT_AUTOMAKE(SimGear, 0.0.8)
dnl Checks for programs.
AC_PROG_MAKE_SET
@@ -255,7 +255,11 @@ AC_OUTPUT( \
simgear/zlib/Makefile \
)
# AC_OUTPUT_COMMANDS([./mksymlinks.sh])
AC_OUTPUT_COMMANDS([
if test "x$ac_cv_header_windows_h" = "xyes" ; then
cp simgear/gdbm/autoconf.h.cygwin32 simgear/gdbm/autoconf.h
fi
])
echo ""
echo "Configure Summary"

View File

@@ -1,212 +0,0 @@
/* simgear/config.h. Generated automatically by configure. */
/* simgear/config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to eliminate all trace of debugging messages such as for a
release build */
/* #undef FG_NDEBUG */
/* Define to enable 3dfx/glide render in a window hack under unix.
This probably won't work under windows. */
/* #undef XMESA */
/* #undef FX */
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define if you have gdbm installed system wide. */
#define HAVE_GDBM 1
/* Define if you have zlib installed system wide. */
#define HAVE_ZLIB 1
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define if compiling on a Winbloze (95, NT, etc.) platform */
/* #undef WIN32 */
/* Define if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Define if you have the GetLocalTime function. */
/* #undef HAVE_GETLOCALTIME */
/* Define if you have the bcopy function. */
#define HAVE_BCOPY 1
/* Define if you have the ftime function. */
#define HAVE_FTIME 1
/* Define if you have the getitimer function. */
#define HAVE_GETITIMER 1
/* Define if you have the getrusage function. */
#define HAVE_GETRUSAGE 1
/* Define if you have the gettimeofday function. */
#define HAVE_GETTIMEOFDAY 1
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the mktime function. */
#define HAVE_MKTIME 1
/* Define if you have the rand function. */
#define HAVE_RAND 1
/* Define if you have the random function. */
#define HAVE_RANDOM 1
/* Define if you have the rint function. */
#define HAVE_RINT 1
/* Define if you have the setitimer function. */
#define HAVE_SETITIMER 1
/* Define if you have the signal function. */
#define HAVE_SIGNAL 1
/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
/* Define if you have the timegm function. */
#define HAVE_TIMEGM 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
#define HAVE_VALUES_H 1
/* Define if you have the <winbase.h> header file. */
/* #undef HAVE_WINBASE_H */
/* Define if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define if you have the GL library (-lGL). */
#define HAVE_LIBGL 1
/* Define if you have the GLU library (-lGLU). */
/* #undef HAVE_LIBGLU */
/* Define if you have the GLcore library (-lGLcore). */
/* #undef HAVE_LIBGLCORE */
/* Define if you have the ICE library (-lICE). */
#define HAVE_LIBICE 1
/* Define if you have the MesaGL library (-lMesaGL). */
/* #undef HAVE_LIBMESAGL */
/* Define if you have the MesaGLU library (-lMesaGLU). */
#define HAVE_LIBMESAGLU 1
/* Define if you have the SM library (-lSM). */
#define HAVE_LIBSM 1
/* Define if you have the X11 library (-lX11). */
#define HAVE_LIBX11 1
/* Define if you have the Xext library (-lXext). */
#define HAVE_LIBXEXT 1
/* Define if you have the Xi library (-lXi). */
#define HAVE_LIBXI 1
/* Define if you have the Xmu library (-lXmu). */
#define HAVE_LIBXMU 1
/* Define if you have the Xt library (-lXt). */
#define HAVE_LIBXT 1
/* Define if you have the glut library (-lglut). */
#define HAVE_LIBGLUT 1
/* Define if you have the m library (-lm). */
#define HAVE_LIBM 1
/* Define if you have the socket library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Name of package */
#define PACKAGE "SimGear"
/* Version number of package */
#define VERSION "0.0.7"

View File

@@ -26,6 +26,10 @@
#define _EPHEMERIS_HXX
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <plib/sg.h>
#include <Time/fg_time.hxx>

View File

@@ -57,77 +57,6 @@ Moon::Moon(FGTime *t) :
0.054900, 0.000000,
115.3654, 13.0649929509, t)
{
#if 0
int width, height;
FG_LOG( FG_GENERAL, FG_INFO, "Initializing Moon Texture");
#ifdef GL_VERSION_1_1
xglGenTextures(1, &moon_texid);
xglBindTexture(GL_TEXTURE_2D, moon_texid);
#elif GL_EXT_texture_object
xglGenTexturesEXT(1, &moon_texid);
xglBindTextureEXT(GL_TEXTURE_2D, moon_texid);
#else
# error port me
#endif
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load in the texture data
FGPath tpath( current_options.get_fg_root() );
tpath.append( "Textures" );
tpath.append( "moon.rgb" );
if ( (moon_texbuf = read_rgb_texture(tpath.c_str(), &width, &height))
== NULL )
{
// Try compressed
FGPath fg_tpath = tpath;
fg_tpath.append( ".gz" );
if ( (moon_texbuf = read_rgb_texture(fg_tpath.c_str(), &width, &height))
== NULL )
{
FG_LOG( FG_GENERAL, FG_ALERT,
"Error in loading moon texture " << tpath.str() );
exit(-1);
}
}
glTexImage2D( GL_TEXTURE_2D,
0,
GL_RGB,
256, 256,
0,
GL_RGB, GL_UNSIGNED_BYTE,
moon_texbuf);
// setup the halo texture
FG_LOG( FG_GENERAL, FG_INFO, "Initializing Moon Texture");
#ifdef GL_VERSION_1_1
xglGenTextures(1, &moon_halotexid);
xglBindTexture(GL_TEXTURE_2D, moon_halotexid);
#elif GL_EXT_texture_object
xglGenTexturesEXT(1, &moon_halotexid);
xglBindTextureEXT(GL_TEXTURE_2D, moon_halotexid);
#else
# error port me
#endif
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
setHalo();
glTexImage2D( GL_TEXTURE_2D,
0,
GL_RGBA,
256, 256,
0,
GL_RGBA, GL_UNSIGNED_BYTE,
moon_halotexbuf);
moonObject = gluNewQuadric();
#endif
}
Moon::Moon() :
@@ -143,63 +72,9 @@ Moon::Moon() :
Moon::~Moon()
{
//delete moonObject;
// delete moon_texbuf;
// delete moon_halotexbuf;
}
#if 0
static int texWidth = 256; /* 64x64 is plenty */
void Moon::setHalo()
{
int texSize;
//void *textureBuf;
GLubyte *p;
int i,j;
double radius;
texSize = texWidth*texWidth;
moon_halotexbuf = new GLubyte[texSize*4];
if (!moon_halotexbuf)
return; // Ugly!
p = moon_halotexbuf;
radius = (double)(texWidth / 2);
for (i=0; i < texWidth; i++) {
for (j=0; j < texWidth; j++) {
double x, y, d;
*p = 0xff;
*(p+1) = 0xff;
*(p+2) = 0xff;
x = fabs((double)(i - (texWidth / 2)));
y = fabs((double)(j - (texWidth / 2)));
d = sqrt((x * x) + (y * y));
if (d < radius) {
double t = 1.0 - (d / radius); // t is 1.0 at center, 0.0 at edge */
// inverse square looks nice
*(p+3) = (int)((double) 0x20 * (t*t));
} else {
*(p+3) = 0x00;
}
p += 4;
}
}
//gluBuild2DMipmaps(GL_TEXTURE_2D, 1, texWidth, texWidth,
// GL_LUMINANCE,
// GL_UNSIGNED_BYTE, textureBuf);
//free(textureBuf);
}
#endif
/*****************************************************************************
* void Moon::updatePosition(FGTime *t, Star *ourSun)
* this member function calculates the actual topocentric position (i.e.)
@@ -322,95 +197,3 @@ void Moon::updatePosition(FGTime *t, double lat, Star *ourSun)
"Ra = (" << (RAD_TO_DEG *rightAscension)
<< "), Dec= (" << (RAD_TO_DEG *declination) << ")" ); */
}
#if 0
/************************************************************************
* void Moon::newImage()
*
* This function regenerates a new visual image of the moon, which is added to
* solarSystem display list.
*
* Arguments: Right Ascension and declination
*
* return value: none
**************************************************************************/
void Moon::newImage()
{
fgLIGHT *l = &cur_light_params;
float moon_angle = l->moon_angle;
/*double x_2, x_4, x_8, x_10;
GLfloat ambient;
GLfloat amb[4];*/
int moonSize = 550;
GLfloat moonColor[4] = {0.85, 0.75, 0.35, 1.0};
GLfloat black[4] = {0.0, 0.0, 0.0, 1.0};
GLfloat white[4] = {1.0, 1.0, 1.0, 0.0};
if( moon_angle*RAD_TO_DEG < 100 )
{
FG_LOG( FG_ASTRO, FG_INFO, "Generating Moon Image" );
xglPushMatrix();
{
xglRotatef(((RAD_TO_DEG * rightAscension)- 90.0), 0.0, 0.0, 1.0);
xglRotatef((RAD_TO_DEG * declination), 1.0, 0.0, 0.0);
FG_LOG( FG_GENERAL, FG_INFO,
"Ra = (" << (RAD_TO_DEG *rightAscension)
<< "), Dec= (" << (RAD_TO_DEG *declination) << ")" );
xglTranslatef(0.0, 60000.0, 0.0);
glEnable(GL_BLEND); // BLEND ENABLED
// Draw the halo...
if (current_options.get_textures())
{
// glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glEnable(GL_TEXTURE_2D); // TEXTURE ENABLED
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBindTexture(GL_TEXTURE_2D, moon_halotexid);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-5000, 0.0, -5000);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 5000, 0.0, -5000);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 5000, 0.0, 5000);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-5000, 0.0, 5000);
glEnd();
}
xglEnable(GL_LIGHTING); // LIGHTING ENABLED
xglEnable( GL_LIGHT0 );
// set lighting parameters
xglLightfv(GL_LIGHT0, GL_AMBIENT, white );
xglLightfv(GL_LIGHT0, GL_DIFFUSE, white );
// Enable( GL_CULL_FACE );
xglMaterialfv(GL_FRONT, GL_AMBIENT, black);
xglMaterialfv(GL_FRONT, GL_DIFFUSE, moonColor);
//glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_ONE, GL_ONE);
//glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
// Draw the moon-proper
if (current_options.get_textures())
{
glBindTexture(GL_TEXTURE_2D, moon_texid);
gluQuadricTexture(moonObject, GL_TRUE );
}
gluSphere(moonObject, moonSize, 12, 12 );
glDisable(GL_TEXTURE_2D); // TEXTURE DISABLED
glDisable(GL_BLEND); // BLEND DISABLED
}
xglPopMatrix();
glDisable(GL_LIGHTING); // Lighting Disabled.
}
else
{
}
}
#endif

View File

@@ -24,6 +24,10 @@
// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <iostream>
@@ -42,9 +46,6 @@ static int sgMoonOrbPreDraw( ssgEntity *e ) {
glDisable( GL_DEPTH_TEST );
glDisable( GL_FOG );
glBlendFunc ( GL_SRC_ALPHA, GL_ONE ) ;
// sgVec4 color;
// sgSetVec4( color, 0.0, 0.0, 0.0, 1.0 );
// glMaterialfv ( GL_FRONT_AND_BACK, GL_AMBIENT, color ) ;
return true;
}

View File

@@ -24,6 +24,10 @@
// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <iostream>

View File

@@ -22,6 +22,10 @@
// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <plib/ssg.h> // plib include
#include "sky.hxx"

View File

@@ -22,6 +22,10 @@
// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <plib/ssg.h>

View File

@@ -24,6 +24,10 @@
// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <iostream>