Content-Type: multipart/alternative; boundary="------------050701080205070602050605" --------------050701080205070602050605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 23/06/2010 0:59, Peter Mousley wrote: > On 23/06/2010 0:34, Fabien Chéreau wrote: >> >> On Tue, Jun 22, 2010 at 16:28, Peter Mousley > > wrote: >> >> On 22/06/2010 20:16, Fabien Chéreau wrote: >> >> Before deciding whether to merge or not in trunk, I would >> really like to see an alternative Qt based solution, not >> involving win32 API. I just played a bit with the >> QImage/QPixmap idea, and it works more or less, although it's >> a bit slow. See the attached 10 lines patch. >> >> Fabien >> >> >> Attached is an alternative that is much closer to working. The >> two main issues are: >> >> Good! That should even be faster, by bypassing the QPainter stuff. >> >> 1/ star labels only show correctly when a cluster/nebula is >> selected (need the pulsing selection box) >> - planet labels, grid labels, etc., are fine >> - star labels are actually there, but they're black boxes >> >> >> try to glEnable(GL_BLEND) > I had expected it was already set (which, upon checking, it is), so > hadn't bothered with it. Added it anyway - makes no difference. I've > also noticed that the star labels disappear when constellation art is > on, but the planet labels are still okay. What's different between > planet and star labels? (I'm guessing there must be some GL state > different? But what?) > >> 2/ text is not rotated (grid labels for example) >> - is this a limitation of bitmap images? >> >> >> glDrawPixel doesn't use the matrix. Try to draw the texture using a >> real gl call. >> > As an infamous politician here once said, "Please explain!" > > >> Thanks a lot! If you make taht working you'll be a hero for ATI users ;) >> >> > I've been delaying purchase of a new laptop because the one I want > only comes with ATI. Hadn't really thought that Stellarium may not > work, but I need a replacement soon - need to get this bug fixed! > > I'll look at it again in the morning. > > Peter Problem 1 solved! I added code to output if 42 GL capabilities were enabled or not, for both a star and a planet (just for some amusement, see attached). Two were different; GL_BLEND and GL_TEXTURE_2D were both enabled for stars but not for planets. Disabling GL_BLEND did not help, but disabling GL_TEXTURE fixed it. Star labels now work properly with both OpenGL1 and OpenGL2 :-D As a bonus, the frame rate is up: (20 FPS using QPainter::drawImage; 30 FPS with GL_TEXTURE_2D enabled; and almost 40 FPS now (with GL_BLEND disabled, which still looks pretty good, FPS is above 40). As a comparison, using QPainter::drawText direct to QGLWidget gives just under 60 FPS - when it's working. Now I just need rotated text. Fabien? Anyone else? --------------050701080205070602050605 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 23/06/2010 0:59, Peter Mousley wrote:
On 23/06/2010 0:34, Fabien Chéreau wrote:

On Tue, Jun 22, 2010 at 16:28, Peter Mousley <scrupeus@mousley.com.au> wrote:
On 22/06/2010 20:16, Fabien Chéreau wrote:
Before deciding whether to merge or not in trunk, I would really like to see an alternative Qt based solution, not involving win32 API. I just played a bit with the QImage/QPixmap idea, and it works more or less, although it's a bit slow. See the attached 10 lines patch.

Fabien


Attached is an alternative that is much closer to working.  The two main issues are:

Good! That should even be faster, by bypassing the QPainter stuff.
 
1/ star labels only show correctly when a cluster/nebula is selected (need the pulsing selection box)
 - planet labels, grid labels, etc., are fine
 - star labels are actually there, but they're black boxes


try to glEnable(GL_BLEND)
I had expected it was already set (which, upon checking, it is), so hadn't bothered with it.  Added it anyway - makes no difference.  I've also noticed that the star labels disappear when constellation art is on, but the planet labels are still okay.  What's different between planet and star labels? (I'm guessing there must be some GL state different? But what?)

 
2/ text is not rotated (grid labels for example)
 - is this a limitation of bitmap images?
 

glDrawPixel doesn't use the matrix. Try to draw the texture using a real gl call.
 
As an infamous politician here once said, "Please explain!"


Thanks a lot! If you make taht working you'll be a hero for ATI users ;)


I've been delaying purchase of a new laptop because the one I want only comes with ATI.  Hadn't really thought that Stellarium may not work, but I need a replacement soon - need to get this bug fixed!

I'll look at it again in the morning.

Peter

Problem 1 solved!  I added code to output if 42 GL capabilities were enabled or not, for both a star and a planet (just for some amusement, see attached).  Two were different; GL_BLEND and GL_TEXTURE_2D were both enabled for stars but not for planets.  Disabling GL_BLEND did not help, but disabling GL_TEXTURE fixed it.  Star labels now work properly with both OpenGL1 and OpenGL2  :-D
As a bonus, the frame rate is up: (20 FPS using QPainter::drawImage; 30 FPS with GL_TEXTURE_2D enabled; and almost 40 FPS now (with GL_BLEND disabled, which still looks pretty good, FPS is above 40).  As a comparison, using QPainter::drawText direct to QGLWidget gives just under 60 FPS - when it's working.

Now I just need rotated text.  Fabien?  Anyone else?


--------------050701080205070602050605--