Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2002-12-16 13:57:08 +0300
committerKent Mein <mein@cs.umn.edu>2002-12-16 13:57:08 +0300
commita5b42eb62618cf53c4a0917f20a71ac3d3243c4c (patch)
treec2acbf5ae3c10947cb490bcb7d98e46cd2eb2d5d /intern/ghost/test/gears/GHOST_C-Test.c
parent4a9377a861f659cf35a1bfa70e628a8277af3246 (diff)
Fixed the files so they compile...
Had to add an argument to Create_window... (it was missing the sterio flag) Also cleaned up some variable overloading warnings... (i.e. window shadows previous def) Kent
Diffstat (limited to 'intern/ghost/test/gears/GHOST_C-Test.c')
-rw-r--r--intern/ghost/test/gears/GHOST_C-Test.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/intern/ghost/test/gears/GHOST_C-Test.c b/intern/ghost/test/gears/GHOST_C-Test.c
index 731e711b1c3..bb4ecd0082e 100644
--- a/intern/ghost/test/gears/GHOST_C-Test.c
+++ b/intern/ghost/test/gears/GHOST_C-Test.c
@@ -46,6 +46,8 @@
#include <string.h>
#include <math.h>
+#define FALSE 0
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -66,6 +68,7 @@
static void gearsTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time);
+int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData);
static GLfloat view_rotx=20.0, view_roty=30.0, view_rotz=0.0;
static GLfloat fAngle = 0.0;
@@ -78,7 +81,6 @@ static GHOST_WindowHandle sFullScreenWindow = NULL;
static GHOST_TimerTaskHandle sTestTimer;
static GHOST_TimerTaskHandle sGearsTimer;
-
static void testTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time)
{
printf("timer1, time=%d\n", (int)time);
@@ -345,7 +347,7 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
*/
sFullScreenWindow = GHOST_BeginFullScreen(shSystem, &setting,
- false /* stereo flag */);
+ FALSE /* stereo flag */);
}
else
{
@@ -400,8 +402,8 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
case GHOST_kEventWindowClose:
{
- GHOST_WindowHandle window = GHOST_GetEventWindow(hEvent);
- if (window == sMainWindow)
+ GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
+ if (window2 == sMainWindow)
{
sExitRequested = 1;
}
@@ -412,7 +414,7 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
GHOST_RemoveTimer(shSystem, sGearsTimer);
sGearsTimer = 0;
}
- GHOST_DisposeWindow(shSystem, window);
+ GHOST_DisposeWindow(shSystem, window2);
}
}
break;
@@ -425,15 +427,12 @@ int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData)
break;
case GHOST_kEventWindowUpdate:
{
- GHOST_WindowHandle window = GHOST_GetEventWindow(hEvent);
- if (!GHOST_ValidWindow(shSystem, window))
+ GHOST_WindowHandle window2 = GHOST_GetEventWindow(hEvent);
+ if (!GHOST_ValidWindow(shSystem, window2))
break;
- //if (!m_fullScreenWindow)
- {
- setViewPortGL(window);
- drawGL();
- GHOST_SwapWindowBuffers(window);
- }
+ setViewPortGL(window2);
+ drawGL();
+ GHOST_SwapWindowBuffers(window2);
}
break;
@@ -465,7 +464,8 @@ int main(int argc, char** argv)
320,
200,
GHOST_kWindowStateNormal,
- GHOST_kDrawingContextTypeOpenGL);
+ GHOST_kDrawingContextTypeOpenGL,
+ FALSE);
if (!sMainWindow)
{
printf("could not create main window\n");
@@ -480,7 +480,8 @@ int main(int argc, char** argv)
320,
200,
GHOST_kWindowStateNormal,
- GHOST_kDrawingContextTypeOpenGL);
+ GHOST_kDrawingContextTypeOpenGL,
+ FALSE);
if (!sSecondaryWindow)
{
printf("could not create secondary window\n");