Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions

IPhoneGraphicsWindow Class Reference

An interface to the osx/ system for managing GL windows under X. More...

#include "iPhoneGraphicsWindow.h"

Inheritance diagram for IPhoneGraphicsWindow:
GraphicsWindow GraphicsOutput GraphicsOutputBase DrawableRegion TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 IPhoneGraphicsWindow (GraphicsEngine *engine, GraphicsPipe *pipe, const string &name, const FrameBufferProperties &fb_prop, const WindowProperties &win_prop, int flags, GraphicsStateGuardian *gsg, GraphicsOutput *host)
virtual void begin_flip ()
 This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers.
virtual bool begin_frame (FrameMode mode, Thread *current_thread)
 This function will be called within the draw thread before beginning rendering for a given frame.
virtual void clear_pipe ()
 Sets the window's _pipe pointer to NULL; this is generally called only as a precursor to deleting the window.
virtual void end_flip ()
 This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.
virtual void end_frame (FrameMode mode, Thread *current_thread)
 This function will be called within the draw thread after rendering is completed for a given frame.
virtual TypeHandle force_init_type ()
CGPoint get_average_location (NSSet *touches)
virtual TypeHandle get_type () const
virtual void process_events ()
 Do whatever processing is necessary to ensure that the window responds to user events.
void rotate_window ()
virtual void set_properties_now (WindowProperties &properties)
 Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status.
void touches_began (NSSet *touches, UIEvent *event)
void touches_cancelled (NSSet *touches, UIEvent *event)
void touches_ended (NSSet *touches, UIEvent *event)
void touches_moved (NSSet *touches, UIEvent *event)

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual void close_window ()
 Closes the window right now.
virtual bool open_window ()
 Opens the window right now.

Detailed Description

An interface to the osx/ system for managing GL windows under X.

Definition at line 31 of file iPhoneGraphicsWindow.h.


Member Function Documentation

virtual void IPhoneGraphicsWindow::begin_flip ( ) [virtual]

This function will be called within the draw thread after end_frame() has been called on all windows, to initiate the exchange of the front and back buffers.

This should instruct the window to prepare for the flip at the next video sync, but it should not wait.

We have the two separate functions, begin_flip() and end_flip(), to make it easier to flip all of the windows at the same time.

Reimplemented from GraphicsOutput.

virtual bool IPhoneGraphicsWindow::begin_frame ( FrameMode  mode,
Thread current_thread 
) [virtual]

This function will be called within the draw thread before beginning rendering for a given frame.

It should do whatever setup is required, and return true if the frame should be rendered, or false if it should be skipped.

Reimplemented from GraphicsOutput.

virtual void IPhoneGraphicsWindow::clear_pipe ( ) [virtual]

Sets the window's _pipe pointer to NULL; this is generally called only as a precursor to deleting the window.

Reimplemented from GraphicsOutput.

virtual void IPhoneGraphicsWindow::close_window ( ) [protected, virtual]

Closes the window right now.

Called from the window thread.

Reimplemented from GraphicsWindow.

virtual void IPhoneGraphicsWindow::end_flip ( ) [virtual]

This function will be called within the draw thread after begin_flip() has been called on all windows, to finish the exchange of the front and back buffers.

This should cause the window to wait for the flip, if necessary.

Reimplemented from GraphicsOutput.

virtual void IPhoneGraphicsWindow::end_frame ( FrameMode  mode,
Thread current_thread 
) [virtual]

This function will be called within the draw thread after rendering is completed for a given frame.

It should do whatever finalization is required.

Reimplemented from GraphicsOutput.

virtual bool IPhoneGraphicsWindow::open_window ( ) [protected, virtual]

Opens the window right now.

Called from the window thread. Returns true if the window is successfully opened, or false if there was a problem.

Reimplemented from GraphicsWindow.

virtual void IPhoneGraphicsWindow::process_events ( ) [virtual]

Do whatever processing is necessary to ensure that the window responds to user events.

Also, honor any requests recently made via request_properties().

This function is called only within the window thread.

Reimplemented from GraphicsWindow.

virtual void IPhoneGraphicsWindow::set_properties_now ( WindowProperties properties) [virtual]

Applies the requested set of properties to the window, if possible, for instance to request a change in size or minimization status.

The window properties are applied immediately, rather than waiting until the next frame. This implies that this method may *only* be called from within the window thread.

The properties that have been applied are cleared from the structure by this function; so on return, whatever remains in the properties structure are those that were unchanged for some reason (probably because the underlying interface does not support changing that property on an open window).

Reimplemented from GraphicsWindow.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations