[I'm not sure this is a problem with DRI itself, but DRI is definitely
involved and a guy in
comp.os.linux.x told me to ask this list - so I'm trying my luck here.]
I have tried to compile and run some simple OpenGL programs. But lots
of them don't display anything or only part of the scene if direct
rendering is enabled.
However, with LIBGL_ALWAYS_INDIRECT=y the scene looks like it should
do - but animation is extremely slow.
My system is a standard SuSE 8.2 installation with XFree86 4.3.0 and
the standard 2.4.20 kernel.
Graphics adapter: Matrox Millenium G550 (only first head configured)
I would have already tried to upgrade some packages if i had known
where the problem is.
A program demonstrating this is the following.
As this is extracted from example source code of the NeHe OpenGL tutorial
(nehe.gamedev.net) there shouldn't be any coding mistakes in.
--- test.c -------------------------------
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
void InitGL(int Width, int Height)
{
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClearDepth(1.0);
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH);
glViewport(0, 0, Width, Height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
}
void DrawGLScene()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
// Move Left 1.5 Units And Into The Screen 6.0
glTranslatef(-1.5f,0.0f,-6.0f);
// draw a triangle
glColor3f( 1.0f, 1.0f, 1.0f );
glBegin(GL_POLYGON);
glVertex3f( 0.0f, 1.0f, 0.0f);
glVertex3f( 1.0f,-1.0f, 0.0f);
glVertex3f(-1.0f,-1.0f, 0.0f);
glEnd();
// Move Right 3 Units
glTranslatef(3.0f,0.0f,0.0f);
// draw another triangle
glColor3f( 1.0f, 0.0f, 0.0f );
glBegin(GL_POLYGON);
glVertex3f( 0.0f, 1.0f, 0.0f);
glVertex3f( 1.0f,-1.0f, 0.0f);
glVertex3f(-1.0f,-1.0f, 0.0f);
glEnd();
glutSwapBuffers();
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(640, 480);
glutInitWindowPosition(0, 0);
glutCreateWindow("Window Title");
glutDisplayFunc(&DrawGLScene);
glutFullScreen();
glutIdleFunc(&DrawGLScene);
InitGL(640, 480);
glutMainLoop();
return 0;
}
-----------------------------------------
I compile with
$ gcc -o test test.c -lglut -lGLU -lGL
If I run it with
$ ./test
I see one white triangle on the left side of the screen.
If I run with
$ LIBGL_ALWAYS_INDIRECT=y ./test
I see a white triangle on the left side and a red triangle on the
right side.
There aren't any error messages neither in XFree86.0.log nor on the
xterm when running the program - even with MESA_DEBUG=y.
Same result if the OpenGL window is created with GLX or SDL.
'Real', i.e. more complex OpenGL programs like bzflag run without
problems.
Another example demonstrating the problem is the "cube" example
program that comes with the glut library: With direct rendering
enabled it does only display a black window.
--- Output of glxinfo -----------------
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_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: VA Linux Systems Inc.
OpenGL renderer string: Mesa DRI G400 20020221 AGP 1x x86/MMX/SSE
OpenGL version string: 1.2 Mesa 4.0.4
OpenGL extensions:
GL_ARB_multisample, GL_ARB_multitexture,
GL_ARB_texture_compression,
GL_ARB_texture_env_add, GL_ARB_transpose_matrix, GL_EXT_abgr,
GL_EXT_bgra, GL_EXT_clip_volume_hint,
GL_EXT_compiled_vertex_array,
GL_EXT_packed_pixels, GL_EXT_polygon_offset,
GL_EXT_rescale_normal,
GL_EXT_texture3D, GL_EXT_texture_env_add, GL_EXT_texture_object,
GL_EXT_vertex_array, GL_IBM_rasterpos_clip, GL_MESA_window_pos,
GL_NV_texgen_reflection, GL_SGIS_generate_mipmap
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 24 tc 1 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x24 24 tc 1 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x25 24 tc 1 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x26 24 tc 1 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x27 24 tc 1 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x28 24 tc 1 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x29 24 tc 1 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x2a 24 tc 1 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x2b 24 dc 1 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x2c 24 dc 1 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x2d 24 dc 1 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x2e 24 dc 1 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x2f 24 dc 1 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x30 24 dc 1 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x31 24 dc 1 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x32 24 dc 1 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
--------------------------------------------
Changing color depth or resolution doesn't change anything.
I'm really sorry I have to bother you with my problems but I'm
completely stuck and this thing appears to be really weird.
If you need any additional information ask me.
If this is the wrong place for this question, too, please point me to a
better one.
Thanks in advance for any hints
Jan
--
GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen!
Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken
tolle Preise. http://www.gmx.net/de/cgi/specialmail/
+++ GMX - die erste Adresse f�r Mail, Message, More! +++
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel