2 * Copyright 2008 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
8 Copyright 1999, Be Incorporated. All Rights Reserved.
9 This file may be used under the terms of the Be Sample Code License.
18 #define kMsgFPS 'fps '
19 #define kMsgAddModel 'addm'
20 #define kMsgGouraud 'gour'
21 #define kMsgZBuffer 'zbuf'
22 #define kMsgCulling 'cull'
23 #define kMsgTextured 'txtr'
24 #define kMsgFog 'fog '
25 #define kMsgLighting 'lite'
26 #define kMsgLights 'lits'
27 #define kMsgFilled 'fill'
28 #define kMsgPerspective 'prsp'
50 GLObject
*pickedObject
;
54 class ObjectView
: public BGLView
{
56 ObjectView(BRect rect
, const char* name
,
57 ulong resizingMode
, ulong options
);
60 virtual void MouseDown(BPoint point
);
61 virtual void MouseUp(BPoint point
);
62 virtual void MouseMoved(BPoint point
, uint32 transit
, const BMessage
*msg
);
64 virtual void MessageReceived(BMessage
* msg
);
65 virtual void AttachedToWindow();
66 virtual void DetachedFromWindow();
67 virtual void FrameResized(float width
, float height
);
69 int ObjectAtPoint(const BPoint
&point
);
70 virtual void DrawFrame(bool noPause
);
73 bool RepositionView();
79 thread_id fDrawThread
;
80 ResScroll
* fResScroll
;
84 int32 fHistEntries
,fOldestEntry
;
85 bool fFps
, fLastGouraud
, fGouraud
;
86 bool fLastZbuf
, fZbuf
, fLastCulling
, fCulling
;
87 bool fLastLighting
, fLighting
, fLastFilled
, fFilled
;
88 bool fLastPersp
, fPersp
, fLastTextured
, fTextured
;
89 bool fLastFog
, fFog
, fForceRedraw
;
90 float fLastYXRatio
, fYxRatio
, fFpsHistory
[HISTSIZE
];
91 float fObjectDistance
, fLastObjectDistance
;
92 TrackingInfo fTrackingInfo
;
95 #endif // OBJECT_VIEW_H