DrawPoly & SetOrigin

BlitzMax Forums/BlitzMax Programming/DrawPoly & SetOrigin

Will(Posted 2007) [#1]
When I use drawpoly with setorigin offscreen an ofscreen point (or points) of the poly often moves to the wrong place.

Has anyone else experienced this? I don't know how to fix it - but it's causing my project serious distress.

It occurs without using setorigin and using opengl to try and move the view as well.


Will(Posted 2007) [#2]
This little program illustrates the problem. It's so simple, I'm fairly sure it's not my fault - I'm filing it in the bugs forum.

I recognize this is not a convex poly - but since they seem to be allowed with some origin settings - they should be consistently allowed or disallowed either way.


Global xy:Float[] = [0.0, 0.0, 100.0, 0.0, 40.0, 40.0, 0.0, 100.0]

Global x#, y#

Graphics 800, 600, 0

While Not(KeyHit(key_escape))
	
	If KeyDown(key_w) Then y:-2
	If KeyDown(key_s) Then y:+2
	If KeyDown(key_a) Then x:-2
	If KeyDown(key_d) Then x:+2
	
	SetOrigin(-x, -y)
	DrawPoly(xy)
	
	Flip; Cls
	
Wend



Will(Posted 2007) [#3]
Bug reported there:

http://blitzmax.com/Community/posts.php?topic=74601


Jesse(Posted 2007) [#4]
that little program works fine for me. It might be your graphics card or drivers. what operating system are you using? have you tried it on another computer?

I : WinXP SP2 1GB RAM GeForce fx5200 128MB


Will(Posted 2007) [#5]
Try it under OpenGL perhaps? Were you using D3d?

I experience the problem on a MacBook.

Be sure to move the top left corner of the screen into the poly.


Jesse(Posted 2007) [#6]
with:
SetGraphicsDriver GLMax2DDriver()

works no problem.


Will(Posted 2007) [#7]
Interesting, anyone else tried it, post result and computer?


xlsior(Posted 2007) [#8]
Not seeing any problem here...

XP, ATI X1650XT


Leon Drake(Posted 2007) [#9]
i never had problems with offscreen problems like that. must be a video card issue.