![]()  | 
  
    libgpac
    
   Documentation of the core library of GPAC 
   | 
  
#include "visual_manager.h"#include "texturing.h"#include <gpac/nodes_mpeg4.h>#include "gl_inc.h"
 Include dependency graph for visual_manager_3d_gl.c:Macros | |
| #define | CHECK_GL_EXT(name) ((strstr(ext, name) != NULL) ? 1 : 0) | 
| #define | GLES_VERSION_STRING "#version 120 \n" | 
| #define | GLSL_PREFIX | 
| #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 (GF_SHADERID shader_id, const char *name, const char *source) | 
| static GF_SHADERID | visual_3d_shader_from_source_file (const char *src_path, u32 shader_type) | 
| static GF_SHADERID | visual_3d_shader_with_flags (const char *src_path, u32 shader_type, u32 flags, u32 pixfmt) | 
| void | visual_3d_init_stereo_shaders (GF_VisualManager *visual) | 
| static GF_GLProgInstance * | visual_3d_build_program (GF_VisualManager *visual, u32 flags, u32 pix_fmt) | 
| static Bool | visual_3d_init_generic_shaders (GF_VisualManager *visual) | 
| void | visual_3d_init_shaders (GF_VisualManager *visual) | 
| void | visual_3d_reset_graphics (GF_VisualManager *visual) | 
| void | visual_3d_set_clipper_scissor (GF_VisualManager *visual, GF_TraverseState *tr_state) | 
| static void | visual_3d_load_matrix_shaders (GF_SHADERID program, Fixed *mat, const char *name) | 
| 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_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) | 
| static void | visual_3d_draw_aabb_node (GF_TraverseState *tr_state, GF_Mesh *mesh, u32 prim_type, GF_Plane *fplanes, u32 *p_indices, AABBNode *n, void *idx_addr) | 
| static void | visual_3d_matrix_load (GF_VisualManager *visual, Fixed *mat) | 
| static void | visual_3d_update_matrices (GF_TraverseState *tr_state) | 
| static void | visual_3d_set_clippers (GF_VisualManager *visual, GF_TraverseState *tr_state) | 
| static void | visual_3d_reset_clippers (GF_VisualManager *visual) | 
| void | visual_3d_reset_lights (GF_VisualManager *visual) | 
| static void | visual_3d_set_lights (GF_VisualManager *visual) | 
| void | visual_3d_enable_fog (GF_VisualManager *visual) | 
| static void | visual_3d_do_draw_mesh (GF_TraverseState *tr_state, GF_Mesh *mesh) | 
| static Bool | visual_3d_bind_buffer (GF_Compositor *compositor, GF_Mesh *mesh, void **base_address) | 
| static void | visual_3d_update_matrices_shaders (GF_TraverseState *tr_state) | 
| static void | visual_3d_set_lights_shaders (GF_TraverseState *tr_state) | 
| static void | visual_3d_set_fog_shaders (GF_VisualManager *visual) | 
| static void | visual_3d_set_clippers_shaders (GF_VisualManager *visual, GF_TraverseState *tr_state) | 
| GF_GLProgInstance * | visual_3d_check_program_exists (GF_VisualManager *root_visual, u32 flags, u32 pix_fmt) | 
| static void | visual_3d_draw_mesh_shader_only (GF_TraverseState *tr_state, GF_Mesh *mesh) | 
| static void | visual_3d_draw_mesh (GF_TraverseState *tr_state, GF_Mesh *mesh) | 
| static void | visual_3d_set_debug_color (u32 col) | 
| static void | visual_3d_draw_normals (GF_TraverseState *tr_state, GF_Mesh *mesh) | 
| void | visual_3d_draw_aabb_nodeBounds (GF_TraverseState *tr_state, AABBNode *node) | 
| void | visual_3d_draw_bbox (GF_TraverseState *tr_state, GF_BBox *box, Bool is_debug) | 
| static void | visual_3d_draw_bounds (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_clear (GF_VisualManager *visual, SFColor color, Fixed alpha) | 
| 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) | 
| GF_Err | compositor_3d_setup_fbo (u32 width, u32 height, u32 *fbo_id, u32 *tx_id, u32 *depth_id) | 
| void | compositor_3d_delete_fbo (u32 *fbo_id, u32 *fbo_tx_id, u32 *fbo_depth_id, Bool keep_tx_id) | 
| u32 | compositor_3d_get_fbo_pixfmt () | 
| void | compositor_3d_enable_fbo (GF_Compositor *compositor, Bool enable) | 
| void | visual_3d_clean_state (GF_VisualManager *visual) | 
Variables | |
| static char * | glsl_autostereo_vertex | 
| static char * | glsl_view_anaglyph | 
| static char * | glsl_view_columns | 
| static char * | glsl_view_rows | 
| static char * | glsl_view_5VSP19 | 
| static char * | glsl_view_8VAlio | 
| static GLubyte | hatch_horiz [] | 
| static GLubyte | hatch_vert [] | 
| static GLubyte | hatch_up [] | 
| static GLubyte | hatch_down [] | 
| static GLubyte | hatch_cross [] | 
| #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 GLES_VERSION_STRING "#version 120 \n" | 
| #define GLSL_PREFIX | 
| #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 | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| Bool visual_3d_compile_shader | ( | GF_SHADERID | shader_id, | 
| const char * | name, | ||
| const char * | source | ||
| ) | 
parses (glShaderSource) and compiles (glCompileShader) shader source
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_init_stereo_shaders | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_init_shaders | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_reset_graphics | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_set_clipper_scissor | ( | GF_VisualManager * | visual, | 
| GF_TraverseState * | tr_state | ||
| ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:| GF_Err visual_3d_init_autostereo | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_end_auto_stereo_pass | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:| void visual_3d_setup | ( | GF_VisualManager * | visual | ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_set_background_state | ( | GF_VisualManager * | visual, | 
| Bool | on | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_enable_antialias | ( | GF_VisualManager * | visual, | 
| Bool | bOn | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_enable_depth_buffer | ( | GF_VisualManager * | visual, | 
| Bool | on | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_set_viewport | ( | GF_VisualManager * | visual, | 
| GF_Rect | vp | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_set_scissor | ( | GF_VisualManager * | visual, | 
| GF_Rect * | vp | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_clear_depth | ( | GF_VisualManager * | visual | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:| void visual_3d_reset_lights | ( | GF_VisualManager * | visual | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_enable_fog | ( | GF_VisualManager * | visual | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| GF_GLProgInstance * visual_3d_check_program_exists | ( | GF_VisualManager * | root_visual, | 
| u32 | flags, | ||
| u32 | pix_fmt | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_draw_aabb_nodeBounds | ( | GF_TraverseState * | tr_state, | 
| AABBNode * | node | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_mesh_paint | ( | GF_TraverseState * | tr_state, | 
| GF_Mesh * | mesh | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_mesh_hatch | ( | GF_TraverseState * | tr_state, | 
| GF_Mesh * | mesh, | ||
| u32 | hatchStyle, | ||
| SFColor | hatchColor | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_mesh_strike | ( | GF_TraverseState * | tr_state, | 
| GF_Mesh * | mesh, | ||
| Fixed | width, | ||
| Fixed | line_scale, | ||
| u32 | dash_style | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void visual_3d_fill_rect | ( | GF_VisualManager * | visual, | 
| GF_Rect | rc, | ||
| SFColorRGBA | color | ||
| ) | 
 Here is the caller graph for this function:| GF_Err compositor_3d_get_screen_buffer | ( | GF_Compositor * | compositor, | 
| GF_VideoSurface * | fb, | ||
| u32 | depth_dump_mode | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| GF_Err compositor_3d_release_screen_buffer | ( | GF_Compositor * | compositor, | 
| GF_VideoSurface * | framebuffer | ||
| ) | 
 Here is the caller graph for this function:| GF_Err compositor_3d_get_offscreen_buffer | ( | GF_Compositor * | compositor, | 
| GF_VideoSurface * | fb, | ||
| u32 | view_idx, | ||
| u32 | depth_dump_mode | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:| void visual_3d_point_sprite | ( | GF_VisualManager * | visual, | 
| Drawable * | stack, | ||
| GF_TextureHandler * | txh, | ||
| GF_TraverseState * | tr_state | ||
| ) | 
 Here is the call graph for this function:
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void compositor_3d_delete_fbo | ( | u32 * | fbo_id, | 
| u32 * | fbo_tx_id, | ||
| u32 * | fbo_depth_id, | ||
| Bool | keep_tx_id | ||
| ) | 
 Here is the caller graph for this function:| u32 compositor_3d_get_fbo_pixfmt | ( | ) | 
 Here is the caller graph for this function:| void compositor_3d_enable_fbo | ( | GF_Compositor * | compositor, | 
| Bool | enable | ||
| ) | 
 Here is the caller graph for this function:| void visual_3d_clean_state | ( | GF_VisualManager * | visual | ) | 
 Here is the caller graph for this function:
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static |