mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Cleaning up Some..
This commit is contained in:
parent
5a52512d8e
commit
325e42d530
@ -1,10 +1,7 @@
|
||||
// Filename: config_glxdisplay.cxx
|
||||
// Created by: cary (07Oct99)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
// Copyright (c) 2001 - 2006, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
@ -55,8 +52,6 @@ init_libosxdisplay() {
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
printf("****** In libosx init \n");
|
||||
|
||||
osxGraphicsStateGuardian::init_type();
|
||||
osxGraphicsPipe::init_type();
|
||||
osxGraphicsWindow::init_type();
|
||||
@ -69,8 +64,4 @@ init_libosxdisplay() {
|
||||
|
||||
PandaSystem *ps = PandaSystem::get_global_ptr();
|
||||
ps->set_system_tag("OpenGL", "window_system", "OSX");
|
||||
|
||||
|
||||
|
||||
printf("****** out libosx init \n");
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
// Copyright (c) 2001 - 2006, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
@ -26,6 +26,5 @@ NotifyCategoryDecl( osxdisplay , EXPCL_PANDAGL, EXPTP_PANDAGL);
|
||||
extern EXPCL_PANDAGL void init_libosxdisplay();
|
||||
|
||||
extern ConfigVariableString display_cfg;
|
||||
extern ConfigVariableBool osx_error_abort;
|
||||
|
||||
#endif /* __CONFIG_OSXDISPLAY_H__ */
|
||||
|
@ -38,8 +38,6 @@ osxGraphicsBuffer(GraphicsPipe *pipe, GraphicsStateGuardian *gsg,
|
||||
osxGraphicsPipe *osx_pipe;
|
||||
DCAST_INTO_V(osx_pipe, _pipe);
|
||||
|
||||
// Since the pbuffer never gets flipped, we get screenshots from the
|
||||
// same buffer we draw into.
|
||||
_screenshot_buffer_type = _draw_buffer_type;
|
||||
}
|
||||
|
||||
@ -74,13 +72,10 @@ begin_frame(FrameMode mode) {
|
||||
DCAST_INTO_R(osxgsg, _gsg, false);
|
||||
// osxMakeCurrent(_display, _pbuffer, osxgsg->_context);
|
||||
|
||||
// Now that we have made the context current to a window, we can
|
||||
// reset the GSG state if this is the first time it has been used.
|
||||
// (We can't just call reset() when we construct the GSG, because
|
||||
// reset() requires having a current context.)
|
||||
osxgsg->reset_if_new();
|
||||
|
||||
if (mode == FM_render) {
|
||||
if (mode == FM_render)
|
||||
{
|
||||
// begin_render_texture();
|
||||
clear_cube_map_selection();
|
||||
}
|
||||
@ -99,7 +94,8 @@ end_frame(FrameMode mode) {
|
||||
end_frame_spam();
|
||||
nassertv(_gsg != (GraphicsStateGuardian *)NULL);
|
||||
|
||||
if (mode == FM_render) {
|
||||
if (mode == FM_render)
|
||||
{
|
||||
// end_render_texture();
|
||||
copy_to_textures();
|
||||
}
|
||||
@ -138,7 +134,7 @@ release_gsg() {
|
||||
void osxGraphicsBuffer::
|
||||
close_buffer() {
|
||||
|
||||
// _is_valid = false;
|
||||
_is_valid = false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,14 +26,11 @@
|
||||
#include "graphicsBuffer.h"
|
||||
#include "glgsg.h"
|
||||
|
||||
// This must be included after we have included glgsg.h (which
|
||||
// includes gl.h).
|
||||
//#include "wglext.h"
|
||||
|
||||
//#include <windows.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : OSXGraphicsBuffer
|
||||
// rhh mar-2006
|
||||
// Sorry ... this is not functional at all... I have no need for it yet ?
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDAGL osxGraphicsBuffer : public GraphicsBuffer {
|
||||
public:
|
||||
@ -42,20 +39,16 @@ public:
|
||||
int x_size, int y_size);
|
||||
virtual ~osxGraphicsBuffer();
|
||||
|
||||
|
||||
virtual bool begin_frame(FrameMode mode);
|
||||
virtual void end_frame(FrameMode mode);
|
||||
|
||||
virtual void release_gsg();
|
||||
|
||||
// virtual void begin_render_texture();
|
||||
// virtual void end_render_texture();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void close_buffer();
|
||||
virtual bool open_buffer();
|
||||
|
||||
private:
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "osxGraphicsBuffer.h"
|
||||
#include "osxGraphicsStateGuardian.h"
|
||||
|
||||
//typedef enum {Software, MCD, ICD} OGLDriverType;
|
||||
|
||||
TypeHandle osxGraphicsPipe::_type_handle;
|
||||
|
||||
|
@ -64,6 +64,4 @@ private:
|
||||
friend class osxGraphicsBuffer;
|
||||
};
|
||||
|
||||
//#include "osxGraphicsPipe.I"
|
||||
|
||||
#endif
|
||||
|
@ -60,7 +60,6 @@ osxGraphicsStateGuardian(const FrameBufferProperties &properties,
|
||||
_aglPixFmt(NULL),
|
||||
_aglcontext(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -102,7 +101,8 @@ void osxGraphicsStateGuardian::reset()
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: osxGraphicsStateGuardian::buildGL
|
||||
// Access: Public, Virtual
|
||||
// Description:
|
||||
// Description: This function will build up a context for a gsg..
|
||||
// rhh.. This does not respect the flags passed into it for context type ?? hmmm things to do things to do..
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
OSStatus osxGraphicsStateGuardian::buildGL (osxGraphicsWindow &window)
|
||||
|
@ -39,19 +39,15 @@ public:
|
||||
osxGraphicsStateGuardian(const FrameBufferProperties &properties,
|
||||
osxGraphicsStateGuardian *share_with,
|
||||
int pfnum);
|
||||
virtual ~osxGraphicsStateGuardian();
|
||||
|
||||
virtual ~osxGraphicsStateGuardian();
|
||||
virtual void reset();
|
||||
|
||||
|
||||
|
||||
AGLContext get_context(void) { return _aglcontext; };
|
||||
|
||||
OSStatus buildGL (osxGraphicsWindow &window);
|
||||
protected:
|
||||
virtual void *get_extension_func(const char *prefix, const char *name);
|
||||
|
||||
private:
|
||||
OSStatus buildGL (osxGraphicsWindow &window);
|
||||
AGLContext get_context(void) { return _aglcontext; };
|
||||
|
||||
// We have to save a pointer to the GSG we intend to share texture
|
||||
// context with, since we don't create our own context in the
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -43,20 +43,19 @@ public:
|
||||
const string &name);
|
||||
virtual ~osxGraphicsWindow();
|
||||
|
||||
// virtual bool move_pointer(int device, int x, int y);
|
||||
virtual bool move_pointer(int device, int x, int y);
|
||||
|
||||
//virtual bool make_context();
|
||||
virtual void make_current();
|
||||
virtual void release_gsg();
|
||||
|
||||
virtual bool begin_frame(FrameMode mode);
|
||||
virtual void end_frame(FrameMode mode);
|
||||
|
||||
virtual void begin_flip();
|
||||
|
||||
virtual void process_events();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
void ReleaseSystemResources();
|
||||
|
||||
|
||||
@ -65,11 +64,19 @@ protected:
|
||||
virtual bool open_window();
|
||||
|
||||
private:
|
||||
//
|
||||
// a singleton .. for the events to find the right pipe to push the event into
|
||||
//
|
||||
static osxGraphicsWindow * FullScreenWindow;
|
||||
|
||||
static osxGraphicsWindow * GetCurrentOSxWindow (WindowRef hint);
|
||||
|
||||
public: // do not call direct ..
|
||||
OSStatus handleKeyInput (EventHandlerCallRef myHandler, EventRef event, Boolean keyDown);
|
||||
OSStatus handleTextInput (EventHandlerCallRef myHandler, EventRef event);
|
||||
OSStatus handleWindowMouseEvents (EventHandlerCallRef myHandler, EventRef event);
|
||||
ButtonHandle OSX_TranslateKey( UInt32 key, EventRef event );
|
||||
|
||||
void HandleModifireDeleta(UInt32 modifiers);
|
||||
void DoResize(void);
|
||||
|
||||
@ -92,10 +99,10 @@ public: // do not call direct ..
|
||||
}
|
||||
|
||||
|
||||
inline bool IsAlive(void)
|
||||
{
|
||||
return (_is_fullsreen || _osx_window != NULL);
|
||||
}
|
||||
// inline bool IsAlive(void)
|
||||
// {
|
||||
// return (_is_fullsreen || _osx_window != NULL);
|
||||
// }
|
||||
|
||||
WindowProperties & properties() { return _properties; };
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user