Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About hburd

  • Rank
  1. Yeah, I guess that would have been the problem. So the error would have been coming from the Mat3x3 I included instead of the Vec2. I didn't think of that.
  2.   They're included in a couple of files, all of which include both.   Edit: with the exception of Mat3x3, which only includes Vec2.
  3. OS is linux, compiler is g++. But I just tried adding -I . to the compile command and now the problem's gone.   Now the real question is, why was #include "math/Mat3x3.h" working before I did this? But moreover, why do I even have to add -I . to the compile command? Isn't the current directory searched in by default when using quotations instead of angle brackets?
  4. I'm trying to include my vector class #include "math/Vec2.h" and Vec2.h is obviously in the math directory.   I have no idea how this is happening, but when I try to compile I get "math/Vec2.h: no such file or directory"   I have another file in the math directory called "Mat3x3.h" which I can include just fine: #include "math/Mat3x3.h" //no problem What could I possibly be doing wrong? Obviously I've double checked the filename for any typos.
  5. Actually, wouldn't it be better to keep the transforms separate from the materials? Because what about all of the other parts of the game that want to know about the transforms, wouldn't they then have to point to the mesh to access the transforms?   The problem seems to be that I'm not representing any sort of unified sort of game entity, it's all just separate arrays of data so it's hard to represent connections between the data.
  6. You mean allocating a new array of transforms for each material, not just references to another array with all the transforms?   Seems like a good idea. The only reason I wanted to keep all of the transforms in one array was for optimal cache usage when looping through and rendering all of them. Now that I think of it though, a single cache miss when switching materials is not bad at all.
  7. Hi there,   I'm trying to write a rendering function for a game. I have an array of object transforms (position, rotation, scale), which should be sorted by material as to not waste time binding the same material multiple times.   The problem is that I would rather not store a reference to a material in each transform. It's such a basic type that I don't want it to get cluttered with references to every part of the game that depends on it. The transform should only store the position, rotation and scale, and the relationship to the material should be stored elsewhere.   I could instead store references to the transforms inside each material, but then sorting the array of transforms would be a lot less straightforward.   Does anyone have any suggestions on how to store this data relationship? Is there a particular data structure which is good at representing this kind of relationship?
  • 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!