I went to FOSDEM yesterday. I never got around to it in previous years, something always got in the way. But I'm really happy I made it this year, even though it was only for a few hours.
So I attended Miguel De Icaza's talk on mono, which was very interesting. He's a very good speaker! He gave a good overview, and I was surprised that he mentioned boo several times. I've been lurking on the boo mailing list for quite a while now, and it's definately something I want to get into, time permitting. I simply had no idea it was already this popular. Ironpython was given a few minutes as well, and the performance stats are pretty impressive (I had seen them before though). The embedding of mono in games for scripting purposes was also pretty cool. During the workshop later that day, Miguel also briefly demonstrated an embedded boo interpreter in, I think, Banshee. Sweet stuff.
Another thing he mentioned was the IKVM project, which is also very impressive. I had looked at it before, and I was thinking this time that it would enable me to use the Eclipse Modelling Framework on mono.
It's making me unhappy as a C++ programmer though. :(
Hmmm. Strange, I just realized I haven't seen any eclipse related presentations on the schedule, but maybe I didn't look carefully enough.
Miguel also jokingly mentioned that "unlike java's generics, the dotnet generics actually work". I haven't read any criticism of Java's generics yet, nor have I used them, so I obviously can't know what he means. It's been a while since I messed with Java... (to be investigated)
More apps mentioned: Monodevelop (nothing new here, but I saw some people get really excited. I mean *really* excited, like, 'I hope they didn't spoil the seats' excited), and Reflector (neat!)
Oh, and he's embarrassed they haven't got any proper debugging support yet. "Real men don't need debuggers". (cough, cough)
I watched the KDE 4 presentation for half an hour, but after miguel's presentation, it was shockingly amateuristic. I'm sure they have some good things going there, but I'm just not a KDE person and they definately failed to convince me.
Unfortunately, attending the mono presentation meant I had to miss the SQLAlchemy and Elixir presentation, which is a major bummer as am also very interested in sqlalchemy. Crap. But there were a lot more presentations I wanted to see, so I'm hoping there's going to be some video material available for download on the fosdem website eventually. (or at least just the presentation documents).
And it's a damn shame I didn't take my (euh, my wife's) photo camera with me.
Thursday, February 22, 2007
it's quiet now, and as i think my thoughts alone,I heard it a long time ago on the intro of a Sander Kleinenberg dj set. Googling seems to point it to a dj called Derrick Carter. I'm pretty sure that the girl that sings it is not older than 15 or so.
i try to keep my head straight but i think i'm too far gone.
for in this silence, the truth rings even louder.
a constant grinding begging recognition of its power.
through its eyes i take the trip, destiny: the place
of pain and pleasure absolute, where sorrow has a face
a place if time where spirit, asked to stand and hold its ground
has lost all equilibrium and is slowly sinking down.
down into the darkness that the lack of will affords,
down into the shadows, past the junkies past the whores
down into the mire, suffocating all that lives,
but if i say "i care" i lie for i've no more left to give.
well i suppose a hand would help. oh yeah, there's no one here.
guess that's what i wanted (once again my greatest fear).
i just long to hear a bird song, just to let me know there's light.
for as we all know a songbird never sings its song at night.
but, it's quiet now.
"it's quiet now", derrick carter
That's a nice, sharp contrast.
Labels:
derrick carter,
it's quiet now,
sander kleinenberg
Monday, February 19, 2007
I'm so happy I found this three column blogger template! Way better than before. Now I'll get started on setting up trac and such, and link it.
Wednesday, February 14, 2007
My opengl polygon tessellator. Works great! Unfortunately, I still haven't figured out how to get code pasted properly. Grrrr. Blogger is not off to a good start for me.
Anyway, it nicely demonstrates how to do opengl polygon tessellation in C++ and retrieve the triangles later. The Point_2, Polygon_2 and Polygon_with_holes_2 are CGAL typedefs, the others are simple stl typedefs.
I was just playing around and comparing triangulations.
Update Feb 20, 2007: I added the webcpp css to the template, so it looks better.
Anyway, it nicely demonstrates how to do opengl polygon tessellation in C++ and retrieve the triangles later. The Point_2, Polygon_2 and Polygon_with_holes_2 are CGAL typedefs, the others are simple stl typedefs.
I was just playing around and comparing triangulations.
Update Feb 20, 2007: I added the webcpp css to the template, so it looks better.
class Tessellator
{
private:
typedef vector<Point_2*> Point_2_Vec;
typedef pair<GLenum, Point_2_Vec> Poly;
typedef vector<Poly> PolyVec;
GLUtesselator* m_tessellator;
PolyVec m_polygons;
Point_2_Vec m_all_vertices;
static void vertexCallback(Point_2* point, Tessellator* tess)
{
Poly& poly = tess->m_polygons.back();
Point_2_Vec& vertices = poly.second;
vertices.push_back(point);
}
static void beginCallback(GLenum type, Tessellator* tess)
{
tess->m_polygons.push_back(Poly(type, Point_2_Vec()));
}
static void combineCallback(GLdouble coords[3], Point_2*[4], GLfloat[4], Point_2** outData, Tessellator* tess)
{
Point_2_Vec& vertices = tess->m_all_vertices;
vertices.push_back(new Point_2(coords[0], coords[1]));
*outData = vertices.back();
}
static void errorCallback(GLenum code)
{
const GLubyte* error_msg = gluErrorString(code);
cout << "opengl error: " << error_msg;
}
void _glTessPoly(Polygon_2& poly)
{
gluTessBeginContour(m_tessellator);
for (Polygon_2::Vertex_const_iterator vertex_it = poly.vertices_begin(); vertex_it != poly.vertices_end(); vertex_it++)
{
Point_2* p = new Point_2(*vertex_it);
m_all_vertices.push_back(p);
GLdouble v[3] = { to_double(p->x()), to_double(p->y()), 0.0 };
gluTessVertex(m_tessellator, v, p);
}
gluTessEndContour(m_tessellator);
}
public:
Tessellator(const Polygon_with_holes_2& poly): m_tessellator(gluNewTess())
{
gluTessProperty(m_tessellator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE);
gluTessCallback(m_tessellator, GLU_TESS_VERTEX_DATA, (_GLUfuncptr)Tessellator::vertexCallback);
gluTessCallback(m_tessellator, GLU_TESS_BEGIN_DATA, (_GLUfuncptr)Tessellator::beginCallback);
gluTessCallback(m_tessellator, GLU_TESS_COMBINE_DATA, (_GLUfuncptr)Tessellator::combineCallback);
gluTessCallback(m_tessellator, GLU_TESS_ERROR, (_GLUfuncptr)Tessellator::errorCallback);
gluTessBeginPolygon(m_tessellator, this);
Polygon_2 outer = simplify_polygon(poly.outer_boundary());
_glTessPoly(outer);
for (Polygon_with_holes_2::Hole_const_iterator hole_it = poly.holes_begin(); hole_it != poly.holes_end(); hole_it++)
{
Polygon_2 hole = simplify_polygon(*hole_it);
_glTessPoly(hole);
}
gluTessEndPolygon(m_tessellator);
}
virtual ~Tessellator()
{
gluDeleteTess(m_tessellator);
for (Point_2_Vec::const_iterator it = m_all_vertices.begin(); it != m_all_vertices.end(); it++)
delete *it;
}
private:
void _collect_triangle_fan(const Point_2_Vec& points, list<Polygon_2>& triangles)
{
Point_2_Vec::const_iterator it = points.begin();
Point_2* center = *it++;
Point_2* previous = *it++;
for (; it != points.end(); it++)
{
Polygon_2 new_poly;
new_poly.push_back(*center);
new_poly.push_back(*previous);
new_poly.push_back(**it);
triangles.push_back(new_poly);
previous = *it;
}
}
void _collect_triangle_strip(const Point_2_Vec& points, list<Polygon_2>& triangles)
{
Point_2_Vec::const_iterator it = points.begin();
Point_2* first = *it++;
Point_2* second = *it++;
bool switcher = true;
for (; it != points.end(); it++)
{
Polygon_2 new_poly;
new_poly.push_back(*first);
new_poly.push_back(*second);
new_poly.push_back(**it);
triangles.push_back(new_poly);
if (switcher) // keep them counterclockwise
first = *it;
else
second = *it;
switcher = not switcher;
}
}
void _collect_triangles(const Point_2_Vec& points, list<Polygon_2>& triangles)
{
for (Point_2_Vec::const_iterator it = points.begin(); it != points.end();)
{
Polygon_2 new_poly;
new_poly.push_back(**it++);
new_poly.push_back(**it++);
new_poly.push_back(**it++);
triangles.push_back(new_poly);
}
}
public:
void collect(list<Polygon_2>& triangles)
{
for (PolyVec::const_iterator poly_it = m_polygons.begin(); poly_it != m_polygons.end(); poly_it++)
{
const Poly& poly = *poly_it;
switch (poly.first)
{
case GL_TRIANGLE_FAN:
_collect_triangle_fan(poly.second, triangles);
break;
case GL_TRIANGLE_STRIP:
_collect_triangle_strip(poly.second, triangles);
break;
case GL_TRIANGLES:
_collect_triangles(poly.second, triangles);
break;
case GL_LINE_LOOP:
throw runtime_error("Tessellator does not support GL_LINE_LOOP");
break;
default:
throw runtime_error("Tessellator cannot handle this geometry type");
}
}
}
};
Labels:
c++,
holes,
opengl,
polygon,
tessellation
Tuesday, February 13, 2007
I noticed blogger isn't very code-posting friendly. I want to create a post with some C++ code, and it really doesn't work very well.
Ideally, ofcourse, The code should also be colorized :) So maybe I should just run it through some tool that produces html from c++ code. I know it exists, but still, it complicates matters.
Ideally, ofcourse, The code should also be colorized :) So maybe I should just run it through some tool that produces html from c++ code. I know it exists, but still, it complicates matters.
Subscribe to:
Comments (Atom)
