Bug 67904 - ports/astro/stellarium 0.6.0 and nvidia driver
Summary: ports/astro/stellarium 0.6.0 and nvidia driver
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-13 14:30 UTC by astro
Modified: 2004-06-22 08:59 UTC (History)
0 users

See Also:


Attachments
file.diff (467 bytes, patch)
2004-06-13 14:30 UTC, astro
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description astro 2004-06-13 14:30:24 UTC
      Have to apply the following patch to get stellarium 0.6.0 port working with nvidia driver. Befor the patch i got the error: "sdl: Couldn't set 1024x768 video mode: Couldn't find matching GLX visual!".
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-06-16 21:58:54 UTC
Dear maintainer of FreeBSD port astro/stellarium, please check a patch
at

http://www.freebsd.org/cgi/query-pr.cgi?q=67904

Do you agree with that patch?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2004-06-16 21:58:57 UTC
State Changed
From-To: open->feedback

Asked maintainer for opinion. 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2004-06-16 21:58:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Handle.
Comment 4 Jean-Yves Lefort 2004-06-17 13:38:31 UTC
I've modified the patch so that it fallbacks to stencil size 0 only if
setting the video mode failed:

--- src/stel_sdl.cpp.orig	Thu Jun 17 14:11:01 2004
+++ src/stel_sdl.cpp	Thu Jun 17 14:16:40 2004
@@ -60,9 +60,18 @@
     Screen = SDL_SetVideoMode(core->get_screen_W(), core->get_screen_H(), core->get_bppMode(), Vflags);
 	if(!Screen)
 	{
-		printf("sdl: Couldn't set %dx%d video mode: %s!",
+		printf("sdl: Couldn't set %dx%d video mode (%s), retrying with stencil size 0\n",
 		core->get_screen_W(), core->get_screen_H(), SDL_GetError());
-		exit(-1);
+
+		SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE,0);
+		Screen = SDL_SetVideoMode(core->get_screen_W(), core->get_screen_H(), core->get_bppMode(), Vflags);
+
+		if(!Screen)
+		{
+			printf("sdl: Couldn't set %dx%d video mode: %s!\n",
+			core->get_screen_W(), core->get_screen_H(), SDL_GetError());
+			exit(-1);
+		}
 	}
 
 	// Disable key repeat

The patch can be committed after the nvidia user acknowledges that it
works for him.

Regards,
Jean-Yves Lefort

-- 
Jean-Yves Lefort

jylefort@brutele.be
http://lefort.be.eu.org/
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-06-22 08:59:48 UTC
State Changed
From-To: feedback->closed

Maintainer's patch committed.