sphore 0.0.1
SPH openGL rendering engine

src/device.h File Reference

Code for managing devices. More...

#include "sphore.h"
#include <stdlib.h>
#include <GL/gl.h>

Go to the source code of this file.

Typedefs

typedef struct _device device_t
 Public handel to devices.

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)
void device_draw_to_texture (device_t *dev)
void device_draw_to_window (device_t *dev)

Detailed Description

Code for managing devices.


Typedef Documentation

typedef struct _device device_t

Public handel to 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_draw_to_texture ( device_t dev)
void device_draw_to_window ( 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