Weird Graphic Bug

Archives Forums/Linux Discussion/Weird Graphic Bug

maverick69(Posted 2011) [#1]
I just started to play around with Ubuntu/Linux (10.10) on my (very) old Netbook.

And I've got a very weird graphic bug. Here is some code:

Graphics 640,480,0,60

Local mm:TImage = LoadImage("gfx/mainmenu.png")

While(Not KeyDown(KEY_ESCAPE))
	Cls
	DrawImage mm,0,0
	Flip
Wend


The original picture looks like this

http://twitpic.com/3wqdbe

The BlitzMax-Screen looks like this:

http://twitpic.com/3wqd1f

Do you have any ideas what's the reason for this?

It seems to happen to all pictures that are bigger than a specific size.

Last edited 2011


maverick69(Posted 2011) [#2]
If I split the image into smaller ones with LoadAnimImage the screen looks fine:

Graphics 640,480,0,60

Local s:TImage = LoadAnimImage("gfx/mainmenu.png",320,240,0,4)

While(Not KeyDown(KEY_ESCAPE))
	Cls
	DrawImage s,0,0,0
	DrawImage s,320,0,1
	DrawImage s,0,240,2
	DrawImage s,320,240,3
	Flip
Wend


But this can't be the solution. I'm very confused what happens here. My graphic chipset is:

01:00.0 VGA compatible controller: VIA Technologies, Inc. CX700/VX700 [S3 UniChrome Pro] (rev 03)



shinkiro1(Posted 2011) [#3]
I can't see the picture.

But I guess it has to do with your graphics-card maximum texture size.
Try to set the pic to a power of 2 (ex.256x256,512x512,etc.) image and find the value that works. I'm not sure but generally BMax should take care of this.


maverick69(Posted 2011) [#4]
I also thought BlitzMax will take care of this, but I think it has to do with max texture size as you mentioned and the problem that I don't find drivers for my chipset.

Thank you!


shinkiro1(Posted 2011) [#5]
Have you experienced the same problems on another machine with Linux (if you have another machine with linux ^^)?
Off course, you can use a virtual machine instead too (virtualbox).

If not, you can be sure it's the texture size.


maverick69(Posted 2011) [#6]
Yes, I've tried it with Parallels under Mac OS X. The graphics looked fine here, but the problem was that I have no 3d acceleration in Parallels and my apps are running with very low framerates.

Does virtualbox support 3D Acceleration?

Last edited 2011


shinkiro1(Posted 2011) [#7]
Yes it does. Under menu Machine -> Edit -> Tab Display there is an option for 3D acceleration you just have to check (disabled by default).


maverick69(Posted 2011) [#8]
Thanks. Will try that!