Jump to content
  • Advertisement
Sign in to follow this  
RSC_x

OpenGL configrations of OPENGL on LINUX_

This topic is 3942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. from what i see linux doesn't wahe directly opengl support. so i read somewhere sdl does this work. some questions about linux. i installed sdl by hoping to use it for opengl but g++ doesn't see it. is there some command line options to getting info about configrations. i tryed to open some binaries but they shows empty forms. Or is there any other choice for using opengl on linux.

Share this post


Link to post
Share on other sites
Advertisement
OpenGL is absolutely possible on Linux

[google] = "OpenGL Linux"

It depends what you mean by "supported". Windows doesn't directly support OpenGL either, it's the graphics card drivers and hardware that support OpenGL, not the operating system.

As for "doesn't see it" it's probably because you didn't set up your include and lib paths properly. For that either do a "man g++" or look online for how to set up g++ and makefiles and whatnot.

-me

Share this post


Link to post
Share on other sites
Linux is just the kernel, you need supporting progs for everything else. For example X for the windowing system. X also provides OpenGL support. Many vendor drivers tie into X to provide great hardware accelerated OpenGL support for example the NVidia drivers (gives full access to what you would have on Windows).

Share this post


Link to post
Share on other sites
thanks .
so some notes on web says mesa using software rendering if this is correct how can i able to use direct/indirect hardware access on opengl like windows's opengl library.

isn't there any man who can cower how to use device op codes.?
or isn nwidia like wendowrs making it like a secret?
because like you guys says this is hardware.
but why big part of linux developers are forced to use software rendering
instead of direct accees of vga's options .?
or am i missed dont know something about this..?

Share this post


Link to post
Share on other sites
Hardware OpenGL works fine in Linux in any modern version of Linux with any modern video card. No software rendering necessary or vendor specific code necessary. Do you have the right drivers for your card? Try typing glxinfo into the command line and post the result. It should tell you if you have direct (hardware) rendering capability. Next thing you want to try is to cruise over to nehe.gamedev.net and download one of their opengl lessons for linux.

This one is for Linux + SDL:
http://nehe.gamedev.net/data/lessons/linuxsdl/lesson05.tar.gz

This one is for Linux + GLX:
http://nehe.gamedev.net/data/lessons/linuxglx/lesson05.tar.gz

SDL is easier to work with and its cross platform, so I recommend it for dev work. However, it requires that you have the SDL libraries installed. (SDL-dev package I believe in Ubuntu). The GLX version should run without SDL or anything other than the normal X windows system (which I'm sure you have).

Try running make in the directories that you extract them to. This should build the binary executable you need to run them. They should build without any issues if things are set up properly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Erkokite
Do you have the right drivers for your card? Try typing glxinfo into the command line and post the result. It should tell you if you have direct (hardware) rendering capability.

it looks like this supports some opengl extensions.
but i tryed executebles from codesamples.com for GLX and sdl GLX
one of them works but its realy slow like 4~fps/sec.[teapot sample]
driver says its mesa so is this mean my system uses software rendering
or isnt there any way to turn to harware based rendering system.?
thanks...
also is someone knows where can i find GLX libraries/headers


name of display: :0.0
display: :0 screen: 0
direct rendering: No
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
client glx vendor string: 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_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_EXT_texture_from_pixmap
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
OpenGL extensions:
GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multitexture,
GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow,
GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp,
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_window_pos, GL_EXT_abgr, GL_EXT_bgra,
GL_EXT_blend_color, GL_EXT_blend_func_separate, GL_EXT_blend_logic_op,
GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_fog_coord,
GL_EXT_framebuffer_object, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels,
GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_subtexture,
GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3, GL_EXT_texture_lod_bias, GL_EXT_texture_object,
GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once,
GL_ATIX_texture_env_combine3, GL_IBM_texture_mirrored_repeat,
GL_INGR_blend_func_separate, GL_MESA_pack_invert, GL_MESA_ycbcr_texture,
GL_NV_blend_square, GL_NV_point_sprite, GL_NV_texgen_reflection,
GL_NV_texture_rectangle, GL_SGIS_generate_mipmap,
GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow,
GL_SGIX_shadow_ambient, GL_SUN_multi_draw_arrays
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

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
----------------------------------------------------------------------
0x23 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x24 16 tc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 None
0x25 16 tc 0 24 0 r y . 5 6 5 8 0 16 8 16 16 16 16 0 0 None
0x26 16 tc 0 24 0 r . . 5 6 5 8 0 16 8 16 16 16 16 0 0 None
0x27 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x28 16 dc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 None
0x29 16 dc 0 24 0 r y . 5 6 5 8 0 16 8 16 16 16 16 0 0 None
0x2a 16 dc 0 24 0 r . . 5 6 5 8 0 16 8 16 16 16 16 0 0 None

Share this post


Link to post
Share on other sites
Quote:
Original post by RSC_x
Quote:
Original post by Erkokite
Do you have the right drivers for your card? Try typing glxinfo into the command line and post the result. It should tell you if you have direct (hardware) rendering capability.

it looks like this supports some opengl extensions.
but i tryed executebles from codesamples.com for GLX and sdl GLX
one of them works but its realy slow like 4~fps/sec.[teapot sample]
driver says its mesa so is this mean my system uses software rendering
or isnt there any way to turn to harware based rendering system.?

Mesa3D _is_ the OpenGL implementation on X11, so it doesn't mean that Mesa3D only does software rendering. All you need to do to enable hardware acceleration is use the appropriate driver for your card and tell X11 to use that driver, which by looking at the output of glxinfo, I think you're already doing.
So, I don't see why it should be slow.
I develop OpenGL programs on Linux and they work rather well.

You may have issues with certain drivers depending upon how you've built the kernel, but that is rare and usually don't cause OpenGL to work slowly.

Quote:
Original post by RSC_xalso is someone knows where can i find GLX libraries/headers
Depends upon what distribution you're using. You'll find gl and xorg headers in the repositories of most distributions.
For example, I use Gentoo Linux, so the headers are installed when I install xorg.
On Debian, you'll probably need to install the package called libmesa-dev and some package which contains the headers for xorg.

Share this post


Link to post
Share on other sites
RSC_x,
X Window system allows 3D acceleration through DRI (Direct Rendering Infrastructure), but your glxinfo reports the direct rendering is not enabled yet.

I don't know what video card you have, but you can enable DRI by editing xorg.conf. (I am guessing you are also using X.Org.) You need to load the DRI module and to set usage permission in the config file.

Section "Module"
Load "glx"
Load "dri"
...
EndSection

Section "DRI"
Mode 0666
EndSection


Restart X (init 3; then, init 5), then run glxinfo again. If "direct rendering" shows Yes, then the hardware acceleration is enabled on your system.

Share this post


Link to post
Share on other sites
Quote:
Original post by songho
RSC_x,
X Window system allows 3D acceleration through DRI (Direct Rendering Infrastructure), but your glxinfo reports the direct rendering is not enabled yet.

I don't know what video card you have, but you can enable DRI by editing xorg.conf. (I am guessing you are also using X.Org.) You need to load the DRI module and to set usage permission in the config file.
*** Source Snippet Removed ***
Restart X (init 3; then, init 5), then run glxinfo again. If "direct rendering" shows Yes, then the hardware acceleration is enabled on your system.


this is part of xorg.conf.ini and some other similar files.
so is this means my nvidia card does not hawe support for DRI.?
is this just nvidia/debain spesific.?
bacause above bug report means its not available for nvidia.?
or is there any linux wersion which supports DRI on nvidia.?
sorry for long questions.
and thanks for information.
//---------------
Section "Module"
# Comments: see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=346408
Load "dbe" # Double Buffering Extension, very important.
Load "dri" # This shouldn't be available choice if user has selected driver vga, vesa or nv.
Load "glx" # GLX Extension.
Load "freetype" # Freetype fonts.
Load "type1" # Type 1 fonts
//-----------------

Share this post


Link to post
Share on other sites
Quote:
Original post by RSC_x
this is part of xorg.conf.ini and some other similar files.
so is this means my nvidia card does not hawe support for DRI.?

Nvidia's proprietary drivers, which you need to get 3D support on Nvidia cards, don't use DRI - they have their own way of accessing the hardware.

The module section of my xorg.conf is:

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

If you haven't already, go to www.nvidia.com and download the latest version of the linux drivers and install them using the instructions in provided. Note: there is a good chance it will want to compile a kernel module so you'll need the kernel development headers (the kernel-devel package) installed on your system. The installation utility will tell you if you haven't got that package installed, do the compilation and take care of changing your config files as necessary.

For reference, the output from glxinfo on my system starts with:

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_NV_float_buffer, GLX_ARB_fbconfig_float,
GLX_EXT_fbconfig_packed_float, GLX_EXT_texture_from_pixmap,
GLX_EXT_framebuffer_sRGB
GLX version: 1.3
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_EXT_texture_from_pixmap, GLX_ARB_multisample, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB,
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 8600 GTS/PCI/SSE2
OpenGL version string: 2.1.1 NVIDIA 100.14.03
OpenGL extensions:
GL_ARB_color_buffer_float, GL_ARB_depth_texture, GL_ARB_draw_buffers,
GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
GL_ARB_fragment_shader, GL_ARB_half_float_pixel, GL_ARB_imaging,
GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query,
GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite,
GL_ARB_shadow, GL_ARB_shader_objects, GL_ARB_shading_language_100,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!