Change to make the view visible when testing, but not to allow it to use

OpenGL, since we don't want to introduce an unecessary dependency.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21334 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-06-21 00:04:36 +00:00
parent c1c8b949d8
commit eb44c977c5
4 changed files with 18 additions and 9 deletions

View file

@ -1,3 +1,9 @@
2005-06-20 20:11 Gregory John Casamento <greg_casamento@yahoo.com>
* GNUmakefile.preamble: Remove dependency on GL.
* GormCore/GormOpenGLView.h: Make a subclass of NSView.
* GormCore/GormOpenGLView.m: Comment out uneeded code.
2005-06-20 19:32 Gregory John Casamento <greg_casamento@yahoo.com>
* GNUmakefile.preamble: Add -lGL to ADDITIONAL_LIBS

View file

@ -28,8 +28,7 @@ ADDITIONAL_GUI_LIBS += \
-lGormCore \
-lGorm \
-lGormObjCHeaderParser \
-lGormPrefs \
-lGL
-lGormPrefs
ADDITIONAL_INCLUDE_DIRS += \
-IInterfaceBuilder \

View file

@ -26,11 +26,11 @@
#ifndef INCLUDED_GormOpenGLView_h
#define INCLUDED_GormOpenGLView_h
#include <AppKit/NSOpenGLView.h>
#include <AppKit/NSView.h>
@class NSTimer;
@interface GormOpenGLView : NSOpenGLView
@interface GormOpenGLView : NSView
{
float rtri;
NSTimer *timer;

View file

@ -25,27 +25,30 @@
#include <GormCore/GormOpenGLView.h>
#include <Foundation/NSTimer.h>
#include <AppKit/NSOpenGL.h>
#include <GL/gl.h>
#include <AppKit/PSOperators.h>
// #include <AppKit/NSOpenGL.h>
// #include <GL/gl.h>
@implementation GormOpenGLView
- (id) initWithFrame: (NSRect)rect
{
if((self = [super initWithFrame: rect]) != nil)
{
/*
rtri = 0.0f;
timer = [NSTimer scheduledTimerWithTimeInterval: 0.05
target: self
selector: @selector(oneStep)
userInfo: nil
repeats: YES];
*/
}
return self;
}
- (void) dealloc
{
[timer invalidate];
// [timer invalidate];
[super dealloc];
}
@ -53,14 +56,15 @@
{
// rotate.
// rtri -= 0.2f;
rtri = 0.5f; // fabs( sin( 2.0 * M_PI * [startTime timeIntervalSinceNow] ) ) ;
rtri = 0.5f;
[self setNeedsDisplay: YES];
}
- (void) drawRect: (NSRect)rect
{
// do nothing for now...
[[NSColor blackColor] set];
PSrectfill(NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect));
}
@end