|
OpenLayer: LineStrip |
kdevil
Member #1,075
March 2001
|
Yes, I have another issue involving OpenLayer, this time involving LineStrip. I've attached a picture of the problem, and here's the code to make it happen:
Basically, at the height of the trail, I get a line going off the screen towards the bottom-right for no apparent reason.
----- |
Birdeeoh
Member #6,862
February 2006
|
Eeeps! What version are you using? Fladimir and I exposed alot of border-cases in the OpenLayer 2.0 LineStrip code that have since been fixed, but I'm sure there are more... However, on that note, I tested your code with the latest Subversion and I get a crash once the 2nd vertex has been added... I'll spend a little time trying to track it down but Fladimir knows the code alot better than I. [EDIT] [url http://developer.berlios.de/projects/openlayer/]OpenLayer[/url is an OpenGL accelerated 2D library for fast and easy graphics development under Allegro |
kdevil
Member #1,075
March 2001
|
I got it from svn recently. I'll update it and see if the problem is still there... Edit: Yeah, latest svn version and the problem is still there. ----- |
Birdeeoh
Member #6,862
February 2006
|
Okay, yah, there's still some cases where we don't catch when the linestrip goes back over itself which yours does. Basically, LineStrip takes two vertices and your line width, and creates a whole bunch of little rectangles. When you have repeat coordinates like your code produces, those little rectangles end up having a zero-dimension and this translates into weird opengl artifacts. Lemme see if I can fix that Gimme a little bit. [EDIT] [2nd EDIT] Dammit... I can't commit right now because Fladimir left some file additions out of his last commit so the repository is currently not compilable. I've attached the two files you'll need to change to make yours work until we can get ahold of Fladimir to commit the missing files. Vec2d.hpp goes in /include/Openlayer and linestrip.cpp goes in /src Good luck [3rd EDIT] God dammit, he did commit it, I just didn't update it somehow. sigh... making the commit now... could you please reply to my post so I could start a new post instead of editting this one over and over? [4th and final? edit] Okay. Checkout a copy of the HEAD - you should be at revision 35 [url http://developer.berlios.de/projects/openlayer/]OpenLayer[/url is an OpenGL accelerated 2D library for fast and easy graphics development under Allegro |
kdevil
Member #1,075
March 2001
|
OK, just got the latest version and the problem no longer shows up.:) ----- |
|