• Content count

  • Joined

  • Last visited

Community Reputation

186 Neutral

About Chris528

  • Rank
  1. OpenGL Problem with md5 viewer

    Thanks, I did notice that there is glm::slerp, I just hadn't really tried it as there was a problem having to do with there being two versions of glm::slerp having the same arguments, one defined in quaternion.hpp and another in compatibility.hpp. I fixed it by making a small hack to compatibility.hpp. (added an additional namespace inside of glm). After getting that out of the way, the program compiled and everything worked. Thanks for your help, I appreciate it.
  2. OpenGL Problem with md5 viewer

    I figured out the issue, I tried out an earlier version of glm and it worked. It appears that glm::mix is implemented in a different manner than newer versions of glm.
  3. OpenGL Problem with md5 viewer

    Yeah, it has to do with the interpolation of the joint orientations. One thing i tried is glm::mix( joint0.m_Orient, joint0.m_Orient, fInterpolate ); That stopped the glitching but causes twitching as it isn't really being interpolated anymore.  It appears that there is something wrong with the way glm::mix is handling things. I even checked the value of  fInterpolate and that seems to be working correctly. Here's the current code. finalJoint.m_Orient = glm::mix( joint0.m_Orient, joint1.m_Orient, fInterpolate );
  4. Hey, I recently coded an md5 viewer using opengl + sdl2 in windows and have come across a really strange issue. My geometry kind of explodes on certain frames, so one of the first things i tried was disabling interpolation, which "fixed" my problem. I've been stuck on this for a couple of days now. I'm currently using a model and anim straight from doom 3 so I know they aren't corrupt.   Here's a vid of what's happening.
  5. lwjgl VBO´s

    Why not create a simple mesh class with its own vbo and render function?. That way you could create multiple instances of the class using different geometry and put them in a std::vector. When it comes to rendering, just create a loop that goes through the std::vector and calls the render functions. void init() {     ...     meshes.push_back(new mesh("triangleList1.txt"));     meshes.push_back(new mesh("triangleList2.txt"));     meshes.push_back(new mesh("triangleList3.txt"));     ... } void Render(...) {     ...     for (int i = 0; i < meshes.size(); i++)     {         meshes[i]->render();     }     ... }
  6. Problem with Key presses in SDL 2.0

    The problem is that i have my input extracted into a class and the code is shared with multiple projects. Which means i shouldn't add project specific stuff to it. I need to somehow extend my input class.
  7. Problem with Key presses in SDL 2.0

    Thanks, but that's how i had already coded it. otherwise it wouldn't have toggled at all. Here's my current code, I'm just not sure where to go from here
  8. Hi, I'm currently working on a model viewer and I've come across an have issue that's driving me crazy. I wanted to toggle backface culling with the number 3 key, so I went ahead and and implemented it. But my problem is that the keydown event is triggered for as long as I'm holding the key down, which means that pressing the 3 key for about a half second toggles backface culling about 20 times. Do i somehow reset the key after It is pressed so It is no longer active on the next frame even if its still being pressed? If so how would I accomplish that? The SDL 2 documentation seems pretty useless in this regard, and I haven't been able to find any useful info anywhere else.
  9. Hey everyone, I'm currently coding a menu system for my game and am using sdl 2.0 but i want to convert it to use opengl for all drawing instead, but have no idea if its acceptable to be using immediate mode for this as its deprecated. Is gl immediate mode the way I should go about this or do i somehow use a vbo for menu drawing? I don't have that much practical experience with gl and would appreciate some input. Thanks, Chris528
  10. OpenGL How do you triangulate faces?

    Hey, thanks for your help. I was thinking of doing the exact same thing before I asked here but couldn't figure it out, even after working on it for hours. After messing around with the code a bit this morning I used your suggestion, and finally got a working loop that calculates all the triangles.(even for 32 sided cylinders)
  11. OpenGL How do you triangulate faces?

    My immediate goal is to make a simple vmf viewer. In my first post I said I'd already parsed the vmf and calculated all the points from the planes. I'm just looking to split all the faces up into triangles.
  12. Alright, after quite a bit of work I've been able to calculate all the points for all brushes from a source engine .vmf. For each face I have a set of verts but I'm not sure how to load this into a vbo. If I'm not mistaken I should create a function that takes in the points of a face and outputs a list of triangles? Also I need this to work with cylinders, as my test map has a cylinder with 32 sides, which means both the top and bottom face each have 32 verts. How would I go about doing that? I've messed around with quite a few opengl 3.3+ tutorials, but never worked on something this involved before. Thanks, Chris528
  13. The only reason I mentioned this, is because you aren't meant to render VMF files directly. The usual approach is to run them through the BSP compiler, and render those.   As for implementing your own BSP compiler, I don't have a reference off hand, but older gamedev books would be more likely to cover the topic, and there are a bunch of open-source BSP compilers. My goal is to make a simple map editor which would require rendering the vmf. The code for the bsp compiler is already included in the sdk, but that's not what I'm trying to do.
  14. Thanks for responding, I know its not a trivial process, I was just looking for a general explanation or even a useful link. I know I could convert my model to obj, but thats not what I'm aiming for.
  15. I just finished up coding a vmf(valve map format) parser and have no idea how I should go about calculating the points from the planes so I can load them into a vbo. I know the points are calculated using some type of plane intersect equation but I have no idea how to do that or even where to start.