• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

134 Neutral

About devin_papineau

  • Rank
  1. dynamic linking on linux

    I had a suspicion that you should use g++ to link the plugin instead of ld, because it turns on some funky C++-specific linking stuff by default. So to make sure I copied your sources and tried linking your way (got the same error you did) and then with g++. Linking with g++ fixes it. devin@neo gamedev-help (0)% ld -shared -soname extra.so.1 -o extra.so.1.0 -lc extra.o devin@neo gamedev-help (0)% ./pluginTest Starting Program Getting handle to library Error getting library handle: ./extra.so.1.0: undefined symbol: __dso_handle devin@neo gamedev-help (0)% g++ -shared -soname extra.so.1 -o extra.so.1.0 extra.o g++: extra.so.1: No such file or directory g++: unrecognized option '-soname' devin@neo gamedev-help (1)% g++ -shared -o extra.so.1.0 extra.o devin@neo gamedev-help (0)% ./pluginTest Starting Program Getting handle to library Accessing library function Running library function This is the plugin Unloading Library
  2. OpenGL Getting FOGged :(

    I can't really help with the fog, but when you have lighting enabled, in order to colour your cube, you probably want to set the material colour. So instead of using glColor3f(0.0, 0.0, 1.0); You want to have something like static float blue[] = { 0.0, 0.0, 1.0, 1.0 }; // RGBA glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue);
  3. Trig Question

    Use atan2(). From my linux manual page: #include <math.h> double atan2(double y, double x); DESCRIPTION The atan2() function calculates the arc tangent of the two vari- ables x and y. It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.
  4. Your circle is being drawn on the XZ plane. OpenGL looks down the negative Z axis, so you're looking at the side of your circle. Try changing glVertex3f(cosf(angle)*radius,0.0, sinf(angle)*radius); to glVertex3f(cosf(angle)*radius, sinf(angle)*radius, 0.0); Of course you'll have to glTranslatef with a negative z or do something comparable to move your circle past your near clip plane.
  5. English Word Database

    Quote:Original post by Rattrap Well there is always the dictionary file in linux (can't think for the life of me what the name of it is). I believe the file you're thinking of is /usr/share/dict/words.
  6. Store the animation itself once, and give each sprite instance a pointer to it. Then a sprite can share the images and whatnot, yet hold their own state (such as the current frame for example).
  7. Obfuscated Ruby Code...

    The most obfuscated I could get with it is the following: index.puts("[blist"+(`ls #$wikidir/pages`.grep(/^#{letter}/).\ map{|s|s.chomp.gsub(/\.\d+$/,'')}.uniq+File.read("#$wikidir/gend").\ grep(/^#{letter}/).map{|s|s.gsub(/:.*/,'')}).sort.\ map{|el| "[item #{el}]"}.join+']') I have an 8 line comment to explain to myself what it does. Probably not nearly as obfuscated, as fyhuang said, as C or perl could get. edit: wrote code instead of source edit 2: it ate my backslashes edit 3: removed the source tag to try to get it to stop eating the backslash newlines edit 4: double the backslashes. If this doesn't work, at least I tried.
  8. OpenGL OpenGL GUI anyone? Updated on 11/17/05

    Just whatever you do, don't use the Open Profanity License :P.
  9. C++ threading

    Quote:Original post by j0seph I was always thinking that pthreads were cross platform, too. Too bad windows doesn't quite implement POSIX.
  10. I couldn't help myself: Hardware Wizard!

    That is good, good indeed. I'm wondering though, where's Napoleon ? There's clearly a mention of "skills". :P
  11. Here I think I found it: clicky.
  12. Reading simultaneous keys?

    Keyboards are evil. Maybe that's the problem?
  13. Sorry about that. I guess when I type I think mostly in terms of speaking than writing. Anywho: A rotation matrix on some level corresponds to some vectors in relation to the camera (well for the camera anyway). There's the forward vector, the up vector, and the right vector (pretty much the new z, y, and x directions). Given the camera's position and the point it's looking at, you can determine forward. Up could be any line perpendicular to forward, so we use a world up vector (that's your &vUp) to determine it. We choose the up vector that is coplanar with forward and world up. Then right is basically a cross product. Now with only two lines (which is essentially what happens if your forward and world up vectors are parallel), coplanar becomes meaningless. It could once again be any old line. That's why it's funky, if I understand correctly. If I remembered where I read all this, I'd linkify it. That would probably be more clear than my ramblings.
  14. You're forward vector is parallel to your world up vector, which is a problem. The purpose of the world up vector is to select a camera up vector of the correct orientation. Basically, the camera forward vector, up vector, and the world up vector all need to be coplanar. Once you make the forward vector essentially the same as the world up vector, you only really have 2 lines and coplanar becomes no restriction at all; ie. any 2 lines are coplanar if you only have 2 lines (just like there's a straight line between any two points). Hope I was clear :S.
  15. OpenGL 2D font library

    I guess then I would be wrong. I learned something today ;).
  • Advertisement