PDA

View Full Version : How to read the values inside VBOs?



SagoO
01-08-2011, 02:25 AM
I had created vertex arrays and passed into VBOs. The problem is how to read the values inside the VBOs? I want to do pattern matching on the values. What functions can i use? Please help...

I cant find a solution on this because I do not want to draw the VBOs. I just want to read the values inside and do comparison. How to solve it?

mobeen
01-08-2011, 02:57 AM
You may use glMapBufferRange or glMapBuffer func. Check the mapping subsection on the wiki http://www.opengl.org/wiki/Buffer_Object
http://www.opengl.org/wiki/Vertex_Buffer_Object

SagoO
01-09-2011, 01:11 AM
I am compiling the source code using linux. What happens if it comes out these errors?


Impl2.c:(.text+0x5a0): undefined reference to `glGenBuffers'
Impl2.c:(.text+0x5b4): undefined reference to `glBindBuffer'
Impl2.c:(.text+0x5d8): undefined reference to `glBufferData'
collect2: ld returned 1 exit status

SagoO
01-09-2011, 01:30 AM
I found that my openGL version is 1.4 only. Too bad... :(
Those functions only supported for version 1.5 and above right?
Any other functions that I can use to do the same thing as those functions but with the openGL 1.4 supported?

V-man
01-09-2011, 07:11 AM
You should not get any undefined reference from your linker.
You should get function pointers at runtime or better yet use GLEW and it will get the function pointers for you (glew.sourceforge.net).

Yes, VBO appear first in GL 1.5

SagoO
01-09-2011, 07:25 AM
You should not get any undefined reference from your linker.
You should get function pointers at runtime or better yet use GLEW and it will get the function pointers for you (glew.sourceforge.net).


Hem...Not really understand...Is there any way to send data to GPU memory using functions supported by openGL 1.4?

SagoO
01-09-2011, 07:39 AM
Glew is an extension library?

Can i say like tis?
Suppose VBO only supported in openGL 1.5.
If I install glew and include it in my source code, VBO can be used also?

ugluk
01-09-2011, 08:03 AM
I have GL 1.3 on one of my old machines, but I can use VBO's there nonetheless.

The key is if the

GL_ARB_vertex_buffer_object

extension is supported. GL's on Windows are version 1.1, but come with a lot of extensions. Check what extensions your GL comes with. Since you're using linux, type

glxinfo

into your shell and paste the output here. If you don't have glxinfo installed, install the 'mesademos' package, or some such.

SagoO
01-09-2011, 08:47 AM
I have GL 1.3 on one of my old machines, but I can use VBO's there nonetheless.

The key is if the

GL_ARB_vertex_buffer_object

extension is supported. GL's on Windows are version 1.1, but come with a lot of extensions. Check what extensions your GL comes with. Since you're using linux, type

glxinfo

into your shell and paste the output here. If you don't have glxinfo installed, install the 'mesademos' package, or some such.

Really?I have openGL 1.4...Then, what is the problem?


name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
GLX version: 1.2
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_make_current_read,
GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_EXT_texture_from_pixmap
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945GM GEM 20091221 2009Q4 x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 7.7.1
OpenGL extensions:
GL_EXT_compiled_vertex_array, GL_EXT_texture_env_add, GL_ARB_copy_buffer,
GL_ARB_depth_texture, GL_ARB_draw_buffers,
GL_ARB_draw_elements_base_vertex, GL_ARB_fragment_program,
GL_ARB_half_float_pixel, GL_ARB_map_buffer_range, GL_ARB_multisample,
GL_ARB_multitexture, GL_ARB_pixel_buffer_object, GL_ARB_point_parameters,
GL_ARB_point_sprite, GL_ARB_provoking_vertex, GL_ARB_shader_objects,
GL_ARB_shading_language_100, GL_ARB_shading_language_120, GL_ARB_shadow,
GL_ARB_sync, GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
GL_ARB_transpose_matrix, GL_ARB_vertex_array_object,
GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate,
GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
GL_EXT_cull_vertex, GL_EXT_copy_texture, GL_EXT_draw_range_elements,
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_object, GL_EXT_fog_coord,
GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays,
GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels,
GL_EXT_pixel_buffer_object, GL_EXT_point_parameters,
GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,
GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,
GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array,
GL_3DFX_texture_compression_FXT1, GL_APPLE_client_storage,
GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object,
GL_ATI_blend_equation_separate, GL_ATI_texture_env_combine3,
GL_ATI_separate_stencil, GL_IBM_multimode_draw_arrays,
GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
GL_INGR_blend_func_separate, GL_MESA_pack_invert, GL_MESA_ycbcr_texture,
GL_MESA_window_pos, GL_NV_blend_square, GL_NV_light_max_exponent,
GL_NV_packed_depth_stencil, GL_NV_texture_env_combine4,
GL_NV_texture_rectangle, GL_NV_texgen_reflection, GL_NV_vertex_program,
GL_NV_vertex_program1_1, GL_OES_read_format, GL_SGIS_generate_mipmap,
GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

72 GLX Visuals
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x21 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x22 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0xcb 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xcc 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xcd 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xce 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xcf 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xd0 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xd1 24 tc 0 24 0 r . . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xd2 24 tc 0 24 0 r . . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xd3 24 tc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xd4 24 tc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xd5 24 tc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xd6 24 tc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xd7 24 tc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xd8 24 tc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xd9 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xda 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xdb 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xdc 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xdd 24 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xde 24 tc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xdf 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xe0 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xe1 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xe2 24 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xe3 24 tc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xe4 24 tc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xe5 24 tc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xe6 24 tc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xe7 24 tc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xe8 24 tc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xe9 24 tc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0xea 24 tc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0xeb 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0xec 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0xed 24 dc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xee 24 dc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xef 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xf0 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xf1 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xf2 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xf3 24 dc 0 24 0 r . . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xf4 24 dc 0 24 0 r . . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xf5 24 dc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xf6 24 dc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xf7 24 dc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xf8 24 dc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xf9 24 dc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xfa 24 dc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xfb 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xfc 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xfd 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xfe 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xff 24 dc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x100 24 dc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x101 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x102 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x103 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x104 24 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x105 24 dc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x106 24 dc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x107 24 dc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x108 24 dc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x109 24 dc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x10a 24 dc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x10b 24 dc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x10c 24 dc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x10d 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x10e 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x10f 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x6a 32 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None

96 GLXFBConfigs:
visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x6b 0 tc 0 16 0 r . . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0x6c 0 tc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0x6d 0 tc 0 16 0 r y . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0x6e 0 tc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0x6f 0 tc 0 16 0 r y . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0x70 0 tc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0x71 0 tc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x72 0 tc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x73 0 tc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x74 0 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x75 0 tc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x76 0 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x77 0 tc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x78 0 tc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x79 0 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x7a 0 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x7b 0 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x7c 0 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x7d 0 tc 0 24 0 r . . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0x7e 0 tc 0 24 0 r . . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0x7f 0 tc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0x80 0 tc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0x81 0 tc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0x82 0 tc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0x83 0 tc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x84 0 tc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x85 0 tc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x86 0 tc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x87 0 tc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x88 0 tc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x89 0 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x8a 0 tc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x8b 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x8c 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x8d 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0x8e 0 tc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0x8f 0 tc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x90 0 tc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x91 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x92 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x93 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0x94 0 tc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0x95 0 tc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x96 0 tc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x97 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x98 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x99 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0x9a 0 tc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0x9b 0 dc 0 16 0 r . . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0x9c 0 dc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0x9d 0 dc 0 16 0 r y . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0x9e 0 dc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0x9f 0 dc 0 16 0 r y . 5 6 5 0 0 0 0 0 0 0 0 0 0 None
0xa0 0 dc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 0 0 0 Slow
0xa1 0 dc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0xa2 0 dc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0xa3 0 dc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0xa4 0 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0xa5 0 dc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0xa6 0 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0xa7 0 dc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xa8 0 dc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xa9 0 dc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xaa 0 dc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xab 0 dc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0xac 0 dc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0xad 0 dc 0 24 0 r . . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xae 0 dc 0 24 0 r . . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xaf 0 dc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xb0 0 dc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xb1 0 dc 0 24 0 r y . 8 8 8 0 0 24 0 0 0 0 0 0 0 None
0xb2 0 dc 0 24 0 r y . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow
0xb3 0 dc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xb4 0 dc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xb5 0 dc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xb6 0 dc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xb7 0 dc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0xb8 0 dc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0xb9 0 dc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xba 0 dc 0 32 0 r . . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xbb 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xbc 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xbd 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 0 0 0 0 0 0 None
0xbe 0 dc 0 32 0 r y . 8 8 8 8 0 0 0 16 16 16 16 0 0 Slow
0xbf 0 dc 0 32 0 r . . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xc0 0 dc 0 32 0 r . . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xc1 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xc2 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xc3 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 0 0 0 0 0 0 None
0xc4 0 dc 0 32 0 r y . 8 8 8 8 0 24 0 16 16 16 16 0 0 Slow
0xc5 0 dc 0 32 0 r . . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0xc6 0 dc 0 32 0 r . . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0xc7 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0xc8 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow
0xc9 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None
0xca 0 dc 0 32 0 r y . 8 8 8 8 0 24 8 16 16 16 16 0 0 Slow


How to read this info?

ugluk
01-09-2011, 09:10 AM
Well, you have various infos here. But the most important ones are the extensions. I see:

GL_ARB_vertex_buffer_object

So the problem you have is how to get to it and use it and this was already answered to you. You can use GLEW, GLEE, ... or you can access the extension by obtaining pointers to the functions you want (bad idea, it is easier to just use glew). Check its website for further info.

If you decide not to use GLEW, ... you'll invariably end up implementing part of it inside your code. Better just use it.

V-man
01-09-2011, 12:14 PM
If you don't want to use GLEW, then you need to get function pointers yourself
http://www.opengl.org/wiki/Getting_started#OpenGL_2.0.2B_and_extensions

You would use glXGetProcAddress or XglGetProcAddress or whatever the [censored] it was called.

SagoO
01-09-2011, 06:23 PM
So the problem you have is how to get to it and use it and this was already answered to you. You can use GLEW, GLEE, ... or you can access the extension by obtaining pointers to the functions you want (bad idea, it is easier to just use glew). Check its website for further info.


Since I have the extension, why i cannot use it directly? Sorry about that I am a newbie to openGL. Normally, all the functions included in the library can be called easily by including the library in the source code only. I dun really understand how to obtain pointer to the functions.

ugluk
01-09-2011, 06:25 PM
Sometimes you can, if your GL implementation allows it. Yours appears not to. It's just the way it is. You need to go with the flow and use glew or some similar library. Using glew is not hard, just link its .o file or library with your program and include its header file.

SagoO
01-10-2011, 12:54 AM
Sometimes you can, if your GL implementation allows it. Yours appears not to. It's just the way it is. You need to go with the flow and use glew or some similar library. Using glew is not hard, just link its .o file or library with your program and include its header file.

OK...Thank for the advices. I try to learn how to use glew..
Thank you... :)

SagoO
01-10-2011, 07:06 AM
I try to install glew but having this problem...



root@goo5257-laptop:~/Desktop/glew-1.5.7# make install
cc -shared -Wl,-soname=libGLEW.so.1.5 -o lib/libGLEW.so.1.5.7 src/glew.pic_o -L/usr/X11R6/lib -lXmu -lXi -lGLU -lGL -lXext -lX11
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make: *** [lib/libGLEW.so.1.5.7] Error 1


Did I do anything wrong?

ZbuffeR
01-10-2011, 08:23 AM
yum install glew-devel (or your distrib equivalent, try glew-dev on debian based) may help you get the dev libs needed.

SagoO
01-10-2011, 11:31 AM
yum install glew-devel (or your distrib equivalent, try glew-dev on debian based) may help you get the dev libs needed.


I had installed the following package already.


libglewmx1.5-dev
libglewmx1.5
python-pyglew
glew-utils
libglew1.5-dev
libglew1.5


But still facing the same problems. Anyone know what happens?

carsten neumann
01-10-2011, 01:31 PM
If you already installed the glew packages, why are you trying to compile it yourself?
Anyway, you are missing a library (or more likely the dev package for it). I'm sure there is a way to query the package manager for your distro to tell you what package contains /usr/lib/libXmu.so, for yum based distros it is something like this:



yum whatprovides "/usr/lib/libXmu.so"


If you have a 64bit system, use /usr/lib64/libXmu.so instead. I'm afraid I can't remember the command for debian based distros, sorry :(

SagoO
01-10-2011, 09:13 PM
If you already installed the glew packages, why are you trying to compile it yourself?
Anyway, you are missing a library (or more likely the dev package for it). I'm sure there is a way to query the package manager for your distro to tell you what package contains /usr/lib/libXmu.so, for yum based distros it is something like this:



yum whatprovides "/usr/lib/libXmu.so"


If you have a 64bit system, use /usr/lib64/libXmu.so instead. I'm afraid I can't remember the command for debian based distros, sorry :(

I am using ubuntu 10.04. Because I am not sure whether I have install glew completely or not. How to check it?

SagoO
01-10-2011, 09:28 PM
I think not yet install glew completely. I try to compile the following code but having errors.


glutInit(&argc, argv);
glutCreateWindow("GLEW Test");
GLenum err = glewInit();
if (GLEW_OK != err)
{
/* Problem: glewInit failed, something is seriously wrong. */
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
}
fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));



/tmp/cc4Joygi.o: In function `main':
Impl2.c:(.text+0x59f): undefined reference to `glutInit'
Impl2.c:(.text+0x5ab): undefined reference to `glutCreateWindow'
Impl2.c:(.text+0x5b0): undefined reference to `glewInit'
Impl2.c:(.text+0x5c7): undefined reference to `glewGetErrorString'
Impl2.c:(.text+0x5ee): undefined reference to `glewGetString'
collect2: ld returned 1 exit status

I already include the glew.h in the source code. What else should I do to use glew?

ZbuffeR
01-11-2011, 02:52 AM
This basic C compilation stuff, when you depend on other libs.
#include header allows to fix compilation errors.
-l<mylib> allows to fix linker errors "undefined reference"

try adding -lGLEW to you compile line

SagoO
01-11-2011, 03:15 AM
Thank you so much...The problem solve already... :D

carsten neumann
01-11-2011, 11:12 AM
Including headers is only half of what you need to do to use a library. The headers only contain declarations of functions/types, but not their definitions. Those get compiled into a shared (libGlew.so) or static (libGlew.a) library.
You need to link with the libraries you are using to solve the linker errors you are getting (use the -l option to gcc):



# compile source to object code (.c -> .o)
gcc -c -o main.o main.c
gcc -c -o helper.o helper.c

# link object code and libs to executable (.o, libs -> executable)
gcc -o main -lglew -lGLUT main.o helper.o

SagoO
01-11-2011, 10:41 PM
Including headers is only half of what you need to do to use a library. The headers only contain declarations of functions/types, but not their definitions. Those get compiled into a shared (libGlew.so) or static (libGlew.a) library.
You need to link with the libraries you are using to solve the linker errors you are getting (use the -l option to gcc):



# compile source to object code (.c -> .o)
gcc -c -o main.o main.c
gcc -c -o helper.o helper.c

# link object code and libs to executable (.o, libs -> executable)
gcc -o main -lglew -lGLUT main.o helper.o


Ok...Thank a lot :)