Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

450 Neutral

About TangentZ

  • Rank

Personal Information

  • Interests
  1. TangentZ

    Weiler-Atherton in 3D

    Maybe even some pseudo-code of the algorithm will help explain what the demo is doing exactly.   The most useful part I got out of this article is the name of the algorithm, the Weiler-Atherton Algorithm, but not much more than that.   The Wikipedia page doesn't have much information there either (http://en.wikipedia.org/wiki/Weiler%E2%80%93Atherton_clipping_algorithm)
  2. TangentZ


    If you want to be portable and don't want to mess around with endian detection, you can just use the ntoh* and htonl* family of functions.   htons, htonl, htonf, htond - (H)ost TO (N)etwork short, long, float, double ntohs, ntohl, ntohf, ntohd - (N)etwork TO (H)ost short, long, float, double   Network is always big-endian.  The host is whatever you code is running on, can be little or big.
  3. TangentZ

    Learning modern OpenGL

    Like you, I learned the old OpenGL 1.4 style API, and left it for a few years.  Coming back to graphics programming now, I've found that OpenGL has changed quite a lot!   There is always the newest edition of the OpenGL Programming Guide (8th Edition!).   As for myself, I've found the OpenGL Intorduction (http://www.open.gl) tutorials quite useful for "catch up".   For shaders, you'd want to learn the GLSL, say the OpenGL Shading Language Cookbook.   Hope this helps!
  4. Have you tried DevIL? It's very easy to load PNG into OpenGL texture. DevIL even has a syntax similar to OpenGL.
  5. TangentZ

    C++ database extension

    Have you looked at Database Template Library? It doesn't quite do what you want (extend the C++ syntax), but it sure makes C++ database programming much easier.
  6. This is a somewhat tricky thing to do in XSLT. Try this: <xsl:template match="table"> <xsl:apply-templates select="text() | *"/> </xsl:template> <xsl:template match="text() | * | @*"> <xsl:copy> <xsl:apply-templates select="text() | * | @*"/> </xsl:copy> </xsl:template> It should preserve everything under "table", tags and all. Hope this helps.
  7. TangentZ

    Visual C++ Without SP2

    Yes, you can install VS 2005 and MSDN for VS 2005 on XP without SP2. Try it at your own risks.
  8. TangentZ

    [.net] Help with C# generics

    You may want to check out the section on generic type constraint of the C# Programming Guide.
  9. TangentZ

    XML Problem

    Are you sure that in your "Games.xml", the chapter node has a "name"? The exception is saying that you don't.
  10. WinXP protects the files in the system/sytem32 directories by keeping a cache of them in a hidden system directory. That's why they keep coming back. It is not a good idea to copy the files to there anyhow (DLL Hell!). An alternative is to place the Mesa DLLs in same directory as your EXE.
  11. TangentZ

    Java: multiple action listeners

    Quote:Original post by ju2wheels Its the last action listener added that gets called first and then the next one in line in reverse order from that in which they were added. It is not a good idea to depend on this behavior. What if they decide to use a hash table to store the listeners in the next version? It will not be LIFO anymore. Quote: Is there a way to reverse this order without actually changing the order in which i add them? Think about why you need to have the listeners notified in a specifc order. Normally, you shouldn't care.
  12. Since FileStatic.cpp #includes FileStatic2.cpp, they are really one and the same "translation unit" to the compiler. So the variable "fs" is accessible to func(). Try taking out the #include "FileStatic2.cpp", compile the two CPPs separately, and then link them to create the executable. You'll get a linker error.
  13. Quote:Original post by Geronimo2000 I am trying to invoke Control.SetBoundsCore in a C# program with reflection via the MethodInfo class. The function is behind called, but it's virtual-ness is propogating the call back down to my derived Form class, and that's no good at all. What do you mean no good at all? That's the way it (Object-Oriented Programming) is supposed to work... Quote: To explain a bit, I am trying to get around the Form.SetBoundsCore function by overriding SetBoundsCore in my derived Form class, and then essentially calling Control.SetBoundsCore with reflection. What is going on here? I'm lost. Quote: The last piece of the puzzle with my current approach is making the MethodInfo.Invoke call somehow ignore the virtual-ness of Control.SetBoundsCore (sort of like how it happens every time you call base.XXX from an arbitrary override function). Why are you fighting the very foundation of OOP (polymorphism)? [looksaround] Quote: Any one solved this type of problem already? What is the real problem you are trying to solve?
  14. TangentZ

    (C#) File Input/Output, I need help.

    You can use the Split() method of the String class. using (StreamReader reader = File.OpenRead("MyFile.txt")) { string line; char[] delimiter = new char[] { ' ' }; while ((line = reader.ReadLine()) != null) { string[] tokens = line.Split(delimiter); firstName = tokens[0]; lastName = tokens[1]; // etc } }
  15. TangentZ

    Checking the return value of new

    Another thing to consider is that if you get a NULL or the exception is thrown, your application is in big trouble anyhow... What is to guarantee the Log(...) will succeed? [smile]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!