GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
|
#include "visual_manager.h"
#include "texturing.h"
#include <gpac/options.h>
#include <gpac/nodes_mpeg4.h>
#include "gl_inc.h"
Macros | |
#define | CHECK_GL_EXT(name) ((strstr(ext, name) != NULL) ? 1 : 0) |
#define | DEL_SHADER(_a) if (_a) { glDeleteShader(_a); _a = 0; } |
#define | DEL_PROGRAM(_a) if (_a) { glDeleteProgram(_a); _a = 0; } |
Functions | |
void | gf_sc_load_opengl_extensions (GF_Compositor *compositor, Bool has_gl_context) |
Bool | visual_3d_compile_shader (u32 shader_id, const char *name, const char *source) |
void | visual_3d_init_stereo_shaders (GF_VisualManager *visual) |
void | visual_3d_init_yuv_shader (GF_VisualManager *visual) |
void | visual_3d_reset_graphics (GF_VisualManager *visual) |
GF_Err | visual_3d_init_autostereo (GF_VisualManager *visual) |
void | visual_3d_end_auto_stereo_pass (GF_VisualManager *visual) |
static void | visual_3d_setup_quality (GF_VisualManager *visual) |
void | visual_3d_setup (GF_VisualManager *visual) |
void | visual_3d_set_background_state (GF_VisualManager *visual, Bool on) |
void | visual_3d_enable_antialias (GF_VisualManager *visual, Bool bOn) |
void | visual_3d_enable_depth_buffer (GF_VisualManager *visual, Bool on) |
void | visual_3d_enable_headlight (GF_VisualManager *visual, Bool bOn, GF_Camera *cam) |
void | visual_3d_set_viewport (GF_VisualManager *visual, GF_Rect vp) |
void | visual_3d_set_scissor (GF_VisualManager *visual, GF_Rect *vp) |
void | visual_3d_clear_depth (GF_VisualManager *visual) |
void | VS3D_DrawAABBNode (GF_TraverseState *tr_state, GF_Mesh *mesh, u32 prim_type, GF_Plane *fplanes, u32 *p_indices, AABBNode *n) |
void | VS3D_DrawMeshIntern (GF_TraverseState *tr_state, GF_Mesh *mesh) |
void | VS3D_DrawNormals (GF_TraverseState *tr_state, GF_Mesh *mesh) |
void | VS3D_DrawAABBNodeBounds (GF_TraverseState *tr_state, AABBNode *node) |
void | visual_3d_draw_bbox (GF_TraverseState *tr_state, GF_BBox *box) |
void | VS3D_DrawMeshBoundingVolume (GF_TraverseState *tr_state, GF_Mesh *mesh) |
void | visual_3d_mesh_paint (GF_TraverseState *tr_state, GF_Mesh *mesh) |
void | visual_3d_mesh_hatch (GF_TraverseState *tr_state, GF_Mesh *mesh, u32 hatchStyle, SFColor hatchColor) |
void | visual_3d_mesh_strike (GF_TraverseState *tr_state, GF_Mesh *mesh, Fixed width, Fixed line_scale, u32 dash_style) |
void | visual_3d_set_material_2d (GF_VisualManager *visual, SFColor col, Fixed alpha) |
void | visual_3d_set_material_2d_argb (GF_VisualManager *visual, u32 col) |
void | visual_3d_clear (GF_VisualManager *visual, SFColor color, Fixed alpha) |
void | visual_3d_draw_image (GF_VisualManager *visual, Fixed pos_x, Fixed pos_y, u32 width, u32 height, u32 pixelformat, char *data, Fixed scale_x, Fixed scale_y) |
void | visual_3d_matrix_get (GF_VisualManager *visual, u32 mat_type, Fixed *mat) |
void | visual_3d_set_matrix_mode (GF_VisualManager *visual, u32 mat_type) |
void | visual_3d_matrix_reset (GF_VisualManager *visual) |
void | visual_3d_matrix_push (GF_VisualManager *visual) |
void | visual_3d_matrix_add (GF_VisualManager *visual, Fixed *mat) |
void | visual_3d_matrix_pop (GF_VisualManager *visual) |
void | visual_3d_matrix_load (GF_VisualManager *visual, Fixed *mat) |
void | visual_3d_set_clipper_2d (GF_VisualManager *visual, GF_Rect clip) |
void | visual_3d_reset_clipper_2d (GF_VisualManager *visual) |
void | visual_3d_set_clip_plane (GF_VisualManager *visual, GF_Plane p) |
void | visual_3d_reset_clip_plane (GF_VisualManager *visual) |
void | visual_3d_set_material (GF_VisualManager *visual, u32 material_type, Fixed *rgba) |
void | visual_3d_set_shininess (GF_VisualManager *visual, Fixed shininess) |
void | visual_3d_set_state (GF_VisualManager *visual, u32 flag_mask, Bool setOn) |
Bool | visual_3d_add_spot_light (GF_VisualManager *visual, Fixed _ambientIntensity, SFVec3f attenuation, Fixed _beamWidth, SFColor color, Fixed _cutOffAngle, SFVec3f direction, Fixed _intensity, SFVec3f location) |
Bool | visual_3d_add_point_light (GF_VisualManager *visual, Fixed _ambientIntensity, SFVec3f attenuation, SFColor color, Fixed _intensity, SFVec3f location) |
Bool | visual_3d_add_directional_light (GF_VisualManager *visual, Fixed _ambientIntensity, SFColor color, Fixed _intensity, SFVec3f direction) |
void | visual_3d_remove_last_light (GF_VisualManager *visual) |
void | visual_3d_clear_all_lights (GF_VisualManager *visual) |
void | visual_3d_set_fog (GF_VisualManager *visual, const char *type, SFColor color, Fixed density, Fixed visibility) |
void | visual_3d_fill_rect (GF_VisualManager *visual, GF_Rect rc, SFColorRGBA color) |
GF_Err | compositor_3d_get_screen_buffer (GF_Compositor *compositor, GF_VideoSurface *fb, u32 depth_dump_mode) |
GF_Err | compositor_3d_release_screen_buffer (GF_Compositor *compositor, GF_VideoSurface *framebuffer) |
GF_Err | compositor_3d_get_offscreen_buffer (GF_Compositor *compositor, GF_VideoSurface *fb, u32 view_idx, u32 depth_dump_mode) |
void | visual_3d_point_sprite (GF_VisualManager *visual, Drawable *stack, GF_TextureHandler *txh, GF_TraverseState *tr_state) |
#define CHECK_GL_EXT | ( | name | ) | ((strstr(ext, name) != NULL) ? 1 : 0) |
! HORRIBLE HACK, but on my test devices, it seems that glClipPlanex is missing on the device but not in the SDK lib !!
#define DEL_SHADER | ( | _a | ) | if (_a) { glDeleteShader(_a); _a = 0; } |
#define DEL_PROGRAM | ( | _a | ) | if (_a) { glDeleteProgram(_a); _a = 0; } |
void gf_sc_load_opengl_extensions | ( | GF_Compositor * | compositor, |
Bool | has_gl_context | ||
) |
void visual_3d_init_stereo_shaders | ( | GF_VisualManager * | visual | ) |
void visual_3d_init_yuv_shader | ( | GF_VisualManager * | visual | ) |
void visual_3d_reset_graphics | ( | GF_VisualManager * | visual | ) |
GF_Err visual_3d_init_autostereo | ( | GF_VisualManager * | visual | ) |
void visual_3d_end_auto_stereo_pass | ( | GF_VisualManager * | visual | ) |
|
static |
void visual_3d_setup | ( | GF_VisualManager * | visual | ) |
void visual_3d_set_background_state | ( | GF_VisualManager * | visual, |
Bool | on | ||
) |
void visual_3d_enable_antialias | ( | GF_VisualManager * | visual, |
Bool | bOn | ||
) |
void visual_3d_enable_depth_buffer | ( | GF_VisualManager * | visual, |
Bool | on | ||
) |
void visual_3d_set_viewport | ( | GF_VisualManager * | visual, |
GF_Rect | vp | ||
) |
void visual_3d_set_scissor | ( | GF_VisualManager * | visual, |
GF_Rect * | vp | ||
) |
void visual_3d_clear_depth | ( | GF_VisualManager * | visual | ) |
void VS3D_DrawAABBNode | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh, | ||
u32 | prim_type, | ||
GF_Plane * | fplanes, | ||
u32 * | p_indices, | ||
AABBNode * | n | ||
) |
void VS3D_DrawMeshIntern | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh | ||
) |
void VS3D_DrawNormals | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh | ||
) |
void VS3D_DrawAABBNodeBounds | ( | GF_TraverseState * | tr_state, |
AABBNode * | node | ||
) |
void visual_3d_draw_bbox | ( | GF_TraverseState * | tr_state, |
GF_BBox * | box | ||
) |
void VS3D_DrawMeshBoundingVolume | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh | ||
) |
void visual_3d_mesh_paint | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh | ||
) |
void visual_3d_mesh_hatch | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh, | ||
u32 | hatchStyle, | ||
SFColor | hatchColor | ||
) |
void visual_3d_mesh_strike | ( | GF_TraverseState * | tr_state, |
GF_Mesh * | mesh, | ||
Fixed | width, | ||
Fixed | line_scale, | ||
u32 | dash_style | ||
) |
void visual_3d_set_material_2d_argb | ( | GF_VisualManager * | visual, |
u32 | col | ||
) |
void visual_3d_draw_image | ( | GF_VisualManager * | visual, |
Fixed | pos_x, | ||
Fixed | pos_y, | ||
u32 | width, | ||
u32 | height, | ||
u32 | pixelformat, | ||
char * | data, | ||
Fixed | scale_x, | ||
Fixed | scale_y | ||
) |
void visual_3d_set_matrix_mode | ( | GF_VisualManager * | visual, |
u32 | mat_type | ||
) |
void visual_3d_matrix_reset | ( | GF_VisualManager * | visual | ) |
void visual_3d_matrix_push | ( | GF_VisualManager * | visual | ) |
void visual_3d_matrix_add | ( | GF_VisualManager * | visual, |
Fixed * | mat | ||
) |
void visual_3d_matrix_pop | ( | GF_VisualManager * | visual | ) |
void visual_3d_matrix_load | ( | GF_VisualManager * | visual, |
Fixed * | mat | ||
) |
void visual_3d_set_clipper_2d | ( | GF_VisualManager * | visual, |
GF_Rect | clip | ||
) |
void visual_3d_reset_clipper_2d | ( | GF_VisualManager * | visual | ) |
void visual_3d_set_clip_plane | ( | GF_VisualManager * | visual, |
GF_Plane | p | ||
) |
void visual_3d_reset_clip_plane | ( | GF_VisualManager * | visual | ) |
void visual_3d_set_shininess | ( | GF_VisualManager * | visual, |
Fixed | shininess | ||
) |
Bool visual_3d_add_spot_light | ( | GF_VisualManager * | visual, |
Fixed | _ambientIntensity, | ||
SFVec3f | attenuation, | ||
Fixed | _beamWidth, | ||
SFColor | color, | ||
Fixed | _cutOffAngle, | ||
SFVec3f | direction, | ||
Fixed | _intensity, | ||
SFVec3f | location | ||
) |
Bool visual_3d_add_point_light | ( | GF_VisualManager * | visual, |
Fixed | _ambientIntensity, | ||
SFVec3f | attenuation, | ||
SFColor | color, | ||
Fixed | _intensity, | ||
SFVec3f | location | ||
) |
Bool visual_3d_add_directional_light | ( | GF_VisualManager * | visual, |
Fixed | _ambientIntensity, | ||
SFColor | color, | ||
Fixed | _intensity, | ||
SFVec3f | direction | ||
) |
void visual_3d_remove_last_light | ( | GF_VisualManager * | visual | ) |
void visual_3d_clear_all_lights | ( | GF_VisualManager * | visual | ) |
void visual_3d_set_fog | ( | GF_VisualManager * | visual, |
const char * | type, | ||
SFColor | color, | ||
Fixed | density, | ||
Fixed | visibility | ||
) |
void visual_3d_fill_rect | ( | GF_VisualManager * | visual, |
GF_Rect | rc, | ||
SFColorRGBA | color | ||
) |
GF_Err compositor_3d_get_screen_buffer | ( | GF_Compositor * | compositor, |
GF_VideoSurface * | fb, | ||
u32 | depth_dump_mode | ||
) |
GF_Err compositor_3d_release_screen_buffer | ( | GF_Compositor * | compositor, |
GF_VideoSurface * | framebuffer | ||
) |
GF_Err compositor_3d_get_offscreen_buffer | ( | GF_Compositor * | compositor, |
GF_VideoSurface * | fb, | ||
u32 | view_idx, | ||
u32 | depth_dump_mode | ||
) |
void visual_3d_point_sprite | ( | GF_VisualManager * | visual, |
Drawable * | stack, | ||
GF_TextureHandler * | txh, | ||
GF_TraverseState * | tr_state | ||
) |
proc_glActiveTexture glActiveTexture = 0 |
proc_glClientActiveTexture glClientActiveTexture = 0 |
proc_glBlendEquation glBlendEquation = 0 |
proc_glPointParameterf glPointParameterf = 0 |
proc_glPointParameterfv glPointParameterfv = 0 |
proc_glGenBuffers glGenBuffers = 0 |
proc_glDeleteBuffers glDeleteBuffers = 0 |
proc_glBindBuffer glBindBuffer = 0 |
proc_glBufferData glBufferData = 0 |
proc_glBufferSubData glBufferSubData = 0 |
proc_glCreateProgram glCreateProgram = 0 |
proc_glDeleteProgram glDeleteProgram = 0 |
proc_glLinkProgram glLinkProgram = 0 |
proc_glUseProgram glUseProgram = 0 |
proc_glCreateShader glCreateShader = 0 |
proc_glDeleteShader glDeleteShader = 0 |
proc_glShaderSource glShaderSource = 0 |
proc_glCompileShader glCompileShader = 0 |
proc_glAttachShader glAttachShader = 0 |
proc_glDetachShader glDetachShader = 0 |
proc_glGetShaderiv glGetShaderiv = 0 |
proc_glGetInfoLogARB glGetInfoLogARB = 0 |
proc_glGetUniformLocation glGetUniformLocation = 0 |
proc_glUniform1f glUniform1f = 0 |
proc_glUniform2f glUniform2f = 0 |
proc_glUniform3f glUniform3f = 0 |
proc_glUniform4f glUniform4f = 0 |
proc_glUniform1i glUniform1i = 0 |
proc_glUniform2i glUniform2i = 0 |
proc_glUniform3i glUniform3i = 0 |
proc_glUniform4i glUniform4i = 0 |
proc_glUniform1fv glUniform1fv = 0 |
proc_glUniform2fv glUniform2fv = 0 |
proc_glUniform3fv glUniform3fv = 0 |
proc_glUniform4fv glUniform4fv = 0 |
proc_glUniform1iv glUniform1iv = 0 |
proc_glUniform2iv glUniform2iv = 0 |
proc_glUniform3iv glUniform3iv = 0 |
proc_glUniform4iv glUniform4iv = 0 |
proc_glUniformMatrix2fv glUniformMatrix2fv = 0 |
proc_glUniformMatrix3fv glUniformMatrix3fv = 0 |
proc_glUniformMatrix4fv glUniformMatrix4fv = 0 |
proc_glUniformMatrix2x3fv glUniformMatrix2x3fv = 0 |
proc_glUniformMatrix3x2fv glUniformMatrix3x2fv = 0 |
proc_glUniformMatrix2x4fv glUniformMatrix2x4fv = 0 |
proc_glUniformMatrix4x2fv glUniformMatrix4x2fv = 0 |
proc_glUniformMatrix3x4fv glUniformMatrix3x4fv = 0 |
proc_glUniformMatrix4x3fv glUniformMatrix4x3fv = 0 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |