Max 5 API Reference
00001 #ifndef JIT_GL_RBO_H 00002 #define JIT_GL_RBO_H 00003 00004 /* 00005 * Copyright 2001-2005 - Cycling '74 00006 * Derek Gerstmann - derek@cycling74.com 00007 * 00008 * Struct and associated methods for maintaining an OpenGL 00009 * renderbuffer object (RBO) which can be attached to a framebuffer 00010 * object (FBO) for performing a direct readback via an offscreen 00011 * framebuffer. 00012 * 00013 * Valid internal formats are any of the following: 00014 * 00015 * - Any format starting with: 00016 * RGB, RGBA, DEPTH_COMPONENT, (RGBA8, etc) 00017 * 00018 * - Any of the following stencil buffer formats (not working on NV): 00019 * STENCIL_INDEX1_EXT 00020 * STENCIL_INDEX4_EXT 00021 * STENCIL_INDEX8_EXT 00022 * STENCIL_INDEX16_EXT 00023 */ 00024 00025 /****************************************************************************/ 00026 00027 #include "jit.gl.h" 00028 #include "jit.common.h" 00029 00030 /****************************************************************************/ 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 #if C74_PRAGMA_STRUCT_PACKPUSH 00037 #pragma pack(push, 2) 00038 #elif C74_PRAGMA_STRUCT_PACK 00039 #pragma pack(2) 00040 #endif 00041 00042 /****************************************************************************/ 00043 00044 typedef struct _jit_gl_rbo 00045 { 00046 long id; // id of buffer object 00047 GLint width; // width of buffer object in pixels 00048 GLint height; // height of buffer object in pixels 00049 GLenum internal; // internal format of buffer object 00050 } t_jit_gl_rbo; 00051 00052 /****************************************************************************/ 00053 00054 // creation / deletion 00055 t_jit_gl_rbo *jit_gl_rbo_new(void); 00056 void jit_gl_rbo_free(t_jit_gl_rbo *x); 00057 00058 // usage methods 00059 t_jit_err jit_gl_rbo_create(t_jit_gl_rbo *x, GLenum internal, GLint width, GLint height); 00060 t_jit_err jit_gl_rbo_bind(t_jit_gl_rbo *x); 00061 t_jit_err jit_gl_rbo_unbind(t_jit_gl_rbo *x); 00062 t_jit_err jit_gl_rbo_destroy(t_jit_gl_rbo *x); 00063 t_jit_err jit_gl_rbo_reset(t_jit_gl_rbo *x); 00064 00065 // system query methods 00066 t_jit_err jit_gl_rbo_query_max_size(t_jit_gl_rbo *x, GLint *width, GLint *height); 00067 00068 /****************************************************************************/ 00069 00070 #if C74_PRAGMA_STRUCT_PACKPUSH 00071 #pragma pack(pop) 00072 #elif C74_PRAGMA_STRUCT_PACK 00073 #pragma pack() 00074 #endif 00075 00076 #ifdef __cplusplus 00077 } 00078 #endif 00079 00080 /****************************************************************************/ 00081 00082 #endif // JIT_GL_PBO_H
Copyright © 2008, Cycling '74