Witam,
mam problem z uruchomieniem prostego programu napisanego w C++ z użyciem gluta. Po uruchomieniu pojawia sie komunikat :
"Unable to create direct context rendering for window "Hello World" This may hurt performance."
Muszę dodać że nie mam karty ATI tylko Intel Graphics Media Accelerator 950 .
Dodatkowo po wpisaniu:
"glxinfo | grep direct"
Otrzymuje:
"direct rendering: No (LIBGL_ALWAYS_INDIRECT set)"
Licze na wsparcie
pozdrawiam
/tof
OpenGL :"Unable to create direct context rendering for window "
-
- Przebojowy Jelonek
- Posty: 1048
- Rejestracja: 08 maja 2007, 07:40
- Wersja Ubuntu: 12.10
- Środowisko graficzne: Xfce
- Architektura: x86
Odp: OpenGL :"Unable to create direct context rendering for window "
Pokaż źródełko (choćby nagłówki) i polecenia, którym kompilujesz swój program.
I believe not drinking is actually the best way to not get a hangover in the first place.
Coincidentally, it's also the best way to not enjoy your life.
Coincidentally, it's also the best way to not enjoy your life.
-
- Piegowaty Guziec
- Posty: 4
- Rejestracja: 22 cze 2008, 10:39
- Płeć: Mężczyzna
- Wersja Ubuntu: 8.04
- Środowisko graficzne: GNOME
Odp: OpenGL :"Unable to create direct context rendering for window "
Jest to przykłąd z jakiejs strony:
#include <GL/glut.h>
#define window_width 640
#define window_height 480
// Main loop
void main_loop_function()
{
// Z angle
static float angle;
// Clear color (screen)
// And depth (used internally to block obstructed objects)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Load identity matrix
glLoadIdentity();
// Multiply in translation matrix
glTranslatef(0,0, -10);
// Multiply in rotation matrix
glRotatef(angle, 0, 0, 1);
// Render colored quad
glBegin(GL_QUADS);
glColor3ub(255, 000, 000); glVertex2f(-1, 1);
glColor3ub(000, 255, 000); glVertex2f( 1, 1);
glColor3ub(000, 000, 255); glVertex2f( 1, -1);
glColor3ub(255, 255, 000); glVertex2f(-1, -1);
glEnd();
// Swap buffers (color buffers, makes previous render visible)
glutSwapBuffers();
// Increase angle to rotate
angle+=0.25;
}
// Initialze OpenGL perspective matrix
void GL_Setup(int width, int height)
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glEnable( GL_DEPTH_TEST );
gluPerspective( 45, (float)width/height, .1, 100 );
glMatrixMode( GL_MODELVIEW );
}
// Initialize GLUT and start main loop
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitWindowSize(window_width, window_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("GLUT Example!!!");
glutIdleFunc(main_loop_function);
GL_Setup(window_width, window_height);
glutMainLoop();
}
a polecenie kompliacji generuje eclipse oczywiscie po dołaczeniu biblioteki glut:)
#include <GL/glut.h>
#define window_width 640
#define window_height 480
// Main loop
void main_loop_function()
{
// Z angle
static float angle;
// Clear color (screen)
// And depth (used internally to block obstructed objects)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Load identity matrix
glLoadIdentity();
// Multiply in translation matrix
glTranslatef(0,0, -10);
// Multiply in rotation matrix
glRotatef(angle, 0, 0, 1);
// Render colored quad
glBegin(GL_QUADS);
glColor3ub(255, 000, 000); glVertex2f(-1, 1);
glColor3ub(000, 255, 000); glVertex2f( 1, 1);
glColor3ub(000, 000, 255); glVertex2f( 1, -1);
glColor3ub(255, 255, 000); glVertex2f(-1, -1);
glEnd();
// Swap buffers (color buffers, makes previous render visible)
glutSwapBuffers();
// Increase angle to rotate
angle+=0.25;
}
// Initialze OpenGL perspective matrix
void GL_Setup(int width, int height)
{
glViewport( 0, 0, width, height );
glMatrixMode( GL_PROJECTION );
glEnable( GL_DEPTH_TEST );
gluPerspective( 45, (float)width/height, .1, 100 );
glMatrixMode( GL_MODELVIEW );
}
// Initialize GLUT and start main loop
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitWindowSize(window_width, window_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("GLUT Example!!!");
glutIdleFunc(main_loop_function);
GL_Setup(window_width, window_height);
glutMainLoop();
}
a polecenie kompliacji generuje eclipse oczywiscie po dołaczeniu biblioteki glut:)
-
- Przebojowy Jelonek
- Posty: 1048
- Rejestracja: 08 maja 2007, 07:40
- Wersja Ubuntu: 12.10
- Środowisko graficzne: Xfce
- Architektura: x86
Odp: OpenGL :"Unable to create direct context rendering for window "
U mnie się kompiluje i uruchamia w Geany, z użyciem gcc i opcją linkowanie -lglut). Mam kartę nVidii.
Czyli to pewnie (jak sugerowałeś) kwestia sterowników. Jakieś inne aplikacje OpenGL działają? Gry? Compiz? Coś w ten deseń?
Czyli to pewnie (jak sugerowałeś) kwestia sterowników. Jakieś inne aplikacje OpenGL działają? Gry? Compiz? Coś w ten deseń?
I believe not drinking is actually the best way to not get a hangover in the first place.
Coincidentally, it's also the best way to not enjoy your life.
Coincidentally, it's also the best way to not enjoy your life.
-
- Piegowaty Guziec
- Posty: 4
- Rejestracja: 22 cze 2008, 10:39
- Płeć: Mężczyzna
- Wersja Ubuntu: 8.04
- Środowisko graficzne: GNOME
Odp: OpenGL :"Unable to create direct context rendering for window "
Compiz działa.
Skompliowałem g++ z -lglut i nadal to samo.
Skompliowałem g++ z -lglut i nadal to samo.
Kto jest online
Użytkownicy przeglądający to forum: Obecnie na forum nie ma żadnego zarejestrowanego użytkownika i 75 gości