screensaver fixes

svn path=/trunk/boinc/; revision=1002
This commit is contained in:
Eric Heien 2003-03-03 18:46:06 +00:00
parent 35b7040f40
commit 7c05501da7
2 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,7 @@ extern "C" {
GLenum InitGL(GLvoid); GLenum InitGL(GLvoid);
GLenum ReSizeGLScene(GLsizei width, GLsizei height); GLenum ReSizeGLScene(GLsizei width, GLsizei height);
extern bool app_render(int xs, int ys, double time_of_day); extern bool app_render(int xs, int ys, double time_of_day);
extern void app_init_gl(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -31,6 +31,7 @@
#include <stdio.h> #include <stdio.h>
#include "graphics_api.h" #include "graphics_api.h"
#include "util.h"
#include "win_idle_tracker.h" #include "win_idle_tracker.h"
HWND hWnd=NULL; // Holds Our Window Handle HWND hWnd=NULL; // Holds Our Window Handle
@ -126,8 +127,9 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window
ReSizeGLScene(width, height); ReSizeGLScene(width, height);
InitGL(); InitGL();
app_init_gl();
app_render(width, height, time(0)); app_render(width, height, dtime());
SwapBuffers(bdc); SwapBuffers(bdc);