sphore 0.0.1
SPH openGL rendering engine

src/device.c File Reference

Code for managing devices. More...

#include "device.h"
#include "settings.h"
#include "sphore.h"
#include "warning.h"
#include "offscreen.h"
#include <stdlib.h>

Data Structures

struct  _device
 Internal storage for device. More...

Functions

device_tdevice_create (SREdeviceType type, unsigned int width, unsigned int height)
 Creates a new device.
void device_destroy (device_t *dev)
void device_update_size (device_t *dev, int width, int height)
 Sets the device size.
SREdeviceType device_get_type (device_t *dev)
 Queries the type of device.
void device_get_size (device_t *dev, unsigned int *width, unsigned int *height)
void device_set_size (device_t *dev, unsigned int width, unsigned int height)

Detailed Description

Code for managing devices.

Wraps around code for specific devices.


Function Documentation

device_t* device_create ( SREdeviceType  type,
unsigned int  width,
unsigned int  height 
)

Creates a new device.

void device_destroy ( device_t dev)
void device_get_size ( device_t dev,
unsigned int *  width,
unsigned int *  height 
)
SREdeviceType device_get_type ( device_t dev)

Queries the type of device.

void device_set_size ( device_t dev,
unsigned int  width,
unsigned int  height 
)
void device_update_size ( device_t dev,
int  width,
int  height 
)

Sets the device size.

Called by device specific drivers when the size of the device has changed.

Parameters:
[in]devThe device whos size needs updating.
[in]widthThe new width of the device.
[in]heightThe new height of the device.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines