Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions

GPU_extensions.h File Reference

Go to the source code of this file.

Classes

struct  GPUVertexAttribs

Defines

#define GPU_MAX_ATTRIB   32

Typedefs

typedef struct GPUTexture GPUTexture
typedef struct GPUFrameBuffer GPUFrameBuffer
typedef struct GPUOffScreen GPUOffScreen
typedef struct GPUShader GPUShader
typedef enum GPUDeviceType GPUDeviceType
typedef enum GPUOSType GPUOSType
typedef enum GPUDriverType GPUDriverType
typedef struct GPUVertexAttribs GPUVertexAttribs

Enumerations

enum  GPUDeviceType {
  GPU_DEVICE_NVIDIA = (1<<0), GPU_DEVICE_ATI = (1<<1), GPU_DEVICE_INTEL = (1<<2), GPU_DEVICE_SOFTWARE = (1<<3),
  GPU_DEVICE_UNKNOWN = (1<<4), GPU_DEVICE_ANY = (0xff)
}
enum  GPUOSType { GPU_OS_WIN = (1<<8), GPU_OS_MAC = (1<<9), GPU_OS_UNIX = (1<<10), GPU_OS_ANY = (0xff00) }
enum  GPUDriverType { GPU_DRIVER_OFFICIAL = (1<<16), GPU_DRIVER_OPENSOURCE = (1<<17), GPU_DRIVER_SOFTWARE = (1<<18), GPU_DRIVER_ANY = (0xff0000) }

Functions

void GPU_extensions_disable (void)
void GPU_extensions_init (void)
void GPU_extensions_exit (void)
int GPU_print_error (const char *str)
int GPU_glsl_support (void)
int GPU_non_power_of_two_support (void)
int GPU_color_depth (void)
void GPU_code_generate_glsl_lib (void)
int GPU_bicubic_bump_support (void)
int GPU_type_matches (GPUDeviceType device, GPUOSType os, GPUDriverType driver)
GPUTextureGPU_texture_create_1D (int w, float *pixels, char err_out[256])
GPUTextureGPU_texture_create_2D (int w, int h, float *pixels, char err_out[256])
GPUTextureGPU_texture_create_3D (int w, int h, int depth, float *fpixels)
GPUTextureGPU_texture_create_depth (int w, int h, char err_out[256])
GPUTextureGPU_texture_from_blender (struct Image *ima, struct ImageUser *iuser, double time, int mipmap)
void GPU_texture_free (GPUTexture *tex)
void GPU_texture_ref (GPUTexture *tex)
void GPU_texture_bind (GPUTexture *tex, int number)
void GPU_texture_unbind (GPUTexture *tex)
GPUFrameBufferGPU_texture_framebuffer (GPUTexture *tex)
int GPU_texture_target (GPUTexture *tex)
int GPU_texture_opengl_width (GPUTexture *tex)
int GPU_texture_opengl_height (GPUTexture *tex)
int GPU_texture_opengl_bindcode (GPUTexture *tex)
GPUFrameBufferGPU_framebuffer_create (void)
int GPU_framebuffer_texture_attach (GPUFrameBuffer *fb, GPUTexture *tex, char err_out[256])
void GPU_framebuffer_texture_detach (GPUFrameBuffer *fb, GPUTexture *tex)
void GPU_framebuffer_texture_bind (GPUFrameBuffer *fb, GPUTexture *tex, int w, int h)
void GPU_framebuffer_texture_unbind (GPUFrameBuffer *fb, GPUTexture *tex)
void GPU_framebuffer_free (GPUFrameBuffer *fb)
void GPU_framebuffer_restore (void)
GPUOffScreenGPU_offscreen_create (int width, int height, char err_out[256])
void GPU_offscreen_free (GPUOffScreen *ofs)
void GPU_offscreen_bind (GPUOffScreen *ofs)
void GPU_offscreen_unbind (GPUOffScreen *ofs)
void GPU_offscreen_read_pixels (GPUOffScreen *ofs, int type, void *pixels)
GPUShaderGPU_shader_create (const char *vertexcode, const char *fragcode, const char *libcode)
void GPU_shader_free (GPUShader *shader)
void GPU_shader_bind (GPUShader *shader)
void GPU_shader_unbind (GPUShader *shader)
int GPU_shader_get_uniform (GPUShader *shader, const char *name)
void GPU_shader_uniform_vector (GPUShader *shader, int location, int length, int arraysize, float *value)
void GPU_shader_uniform_texture (GPUShader *shader, int location, GPUTexture *tex)
int GPU_shader_get_attribute (GPUShader *shader, const char *name)

Detailed Description

Definition in file GPU_extensions.h.


Define Documentation

#define GPU_MAX_ATTRIB   32

Definition at line 174 of file GPU_extensions.h.

Referenced by cdDM_drawMappedFacesGLSL(), and gpu_nodes_get_vertex_attributes().


Typedef Documentation

Definition at line 46 of file GPU_extensions.h.

typedef struct GPUOffScreen GPUOffScreen

Definition at line 49 of file GPU_extensions.h.

typedef enum GPUOSType GPUOSType
typedef struct GPUShader GPUShader

Definition at line 52 of file GPU_extensions.h.

typedef struct GPUTexture GPUTexture

Definition at line 43 of file GPU_extensions.h.


Enumeration Type Documentation

Enumerator:
GPU_DEVICE_NVIDIA 
GPU_DEVICE_ATI 
GPU_DEVICE_INTEL 
GPU_DEVICE_SOFTWARE 
GPU_DEVICE_UNKNOWN 
GPU_DEVICE_ANY 

Definition at line 69 of file GPU_extensions.h.

Enumerator:
GPU_DRIVER_OFFICIAL 
GPU_DRIVER_OPENSOURCE 
GPU_DRIVER_SOFTWARE 
GPU_DRIVER_ANY 

Definition at line 85 of file GPU_extensions.h.

enum GPUOSType
Enumerator:
GPU_OS_WIN 
GPU_OS_MAC 
GPU_OS_UNIX 
GPU_OS_ANY 

Definition at line 78 of file GPU_extensions.h.


Function Documentation

int GPU_bicubic_bump_support ( void  )

Definition at line 654 of file gpu_codegen.c.

Referenced by do_material_tex(), and GPU_code_generate_glsl_lib().

void GPU_code_generate_glsl_lib ( void  )
int GPU_color_depth ( void  )
void GPU_extensions_disable ( void  )

Definition at line 91 of file gpu_extensions.c.

References GPUGlobal::extdisabled, and GG.

Referenced by no_glsl().

void GPU_extensions_exit ( void  )

Definition at line 192 of file gpu_extensions.c.

References GPU_codegen_exit(), and gpu_extensions_init.

Referenced by GPG_Application::exitEngine(), and WM_exit_ext().

void GPU_extensions_init ( void  )
GPUFrameBuffer* GPU_framebuffer_create ( void  )
void GPU_framebuffer_free ( GPUFrameBuffer fb)
void GPU_framebuffer_restore ( void  )
int GPU_framebuffer_texture_attach ( GPUFrameBuffer fb,
GPUTexture tex,
char  err_out[256] 
)
void GPU_framebuffer_texture_bind ( GPUFrameBuffer fb,
GPUTexture tex,
int  w,
int  h 
)
void GPU_framebuffer_texture_detach ( GPUFrameBuffer fb,
GPUTexture tex 
)
void GPU_framebuffer_texture_unbind ( GPUFrameBuffer fb,
GPUTexture tex 
)
int GPU_glsl_support ( void  )
int GPU_non_power_of_two_support ( void  )
void GPU_offscreen_bind ( GPUOffScreen ofs)
GPUOffScreen* GPU_offscreen_create ( int  width,
int  height,
char  err_out[256] 
)
void GPU_offscreen_free ( GPUOffScreen ofs)
void GPU_offscreen_read_pixels ( GPUOffScreen ofs,
int  type,
void *  pixels 
)
void GPU_offscreen_unbind ( GPUOffScreen ofs)
int GPU_print_error ( const char *  str)
void GPU_shader_bind ( GPUShader shader)

Definition at line 1082 of file gpu_extensions.c.

References GPU_print_error(), and GPUShader::object.

Referenced by GPU_nodes_extract_dynamic_inputs(), and GPU_pass_bind().

GPUShader* GPU_shader_create ( const char *  vertexcode,
const char *  fragcode,
const char *  libcode 
)
void GPU_shader_free ( GPUShader shader)
int GPU_shader_get_attribute ( GPUShader shader,
const char *  name 
)

Definition at line 1159 of file gpu_extensions.c.

References GPU_print_error(), and GPUShader::object.

Referenced by gpu_material_set_attrib_id().

int GPU_shader_get_uniform ( GPUShader shader,
const char *  name 
)

Definition at line 1109 of file gpu_extensions.c.

References GPUShader::object.

Referenced by GPU_material_construct_end(), and GPU_nodes_extract_dynamic_inputs().

void GPU_shader_unbind ( GPUShader shader)
void GPU_shader_uniform_texture ( GPUShader shader,
int  location,
GPUTexture tex 
)

Referenced by GPU_pass_bind().

void GPU_shader_uniform_vector ( GPUShader shader,
int  location,
int  length,
int  arraysize,
float *  value 
)
void GPU_texture_bind ( GPUTexture tex,
int  number 
)
GPUTexture* GPU_texture_create_1D ( int  w,
float *  pixels,
char  err_out[256] 
)

Definition at line 559 of file gpu_extensions.c.

References GPU_texture_create_nD(), and GPU_texture_unbind().

GPUTexture* GPU_texture_create_2D ( int  w,
int  h,
float *  pixels,
char  err_out[256] 
)

Definition at line 569 of file gpu_extensions.c.

References GPU_texture_create_nD(), and GPU_texture_unbind().

Referenced by gpu_node_input_link(), and GPU_offscreen_create().

GPUTexture* GPU_texture_create_3D ( int  w,
int  h,
int  depth,
float *  fpixels 
)
GPUTexture* GPU_texture_create_depth ( int  w,
int  h,
char  err_out[256] 
)

Definition at line 579 of file gpu_extensions.c.

References GPU_texture_create_nD(), GPU_texture_unbind(), and NULL.

Referenced by GPU_lamp_from_blender(), and GPU_offscreen_create().

GPUFrameBuffer* GPU_texture_framebuffer ( GPUTexture tex)

Definition at line 681 of file gpu_extensions.c.

References GPUTexture::fb.

void GPU_texture_free ( GPUTexture tex)
GPUTexture* GPU_texture_from_blender ( struct Image ima,
struct ImageUser iuser,
double  time,
int  mipmap 
)
int GPU_texture_opengl_bindcode ( GPUTexture tex)

Definition at line 676 of file gpu_extensions.c.

References GPUTexture::bindcode.

Referenced by GPU_shader_export().

int GPU_texture_opengl_height ( GPUTexture tex)

Definition at line 671 of file gpu_extensions.c.

References GPUTexture::h.

Referenced by GPU_lamp_shadow_buffer_bind(), and GPU_shader_export().

int GPU_texture_opengl_width ( GPUTexture tex)

Definition at line 666 of file gpu_extensions.c.

References GPUTexture::w.

Referenced by GPU_lamp_shadow_buffer_bind(), and GPU_shader_export().

void GPU_texture_ref ( GPUTexture tex)

Definition at line 656 of file gpu_extensions.c.

References GPUTexture::refcount.

int GPU_texture_target ( GPUTexture tex)

Definition at line 661 of file gpu_extensions.c.

References GPUTexture::target.

void GPU_texture_unbind ( GPUTexture tex)
int GPU_type_matches ( GPUDeviceType  device,
GPUOSType  os,
GPUDriverType  driver 
)