Jump to content

  • Log In with Google      Sign In   
  • Create Account

sirpalee

Member Since 16 Apr 2007
Offline Last Active Yesterday, 02:44 PM

Posts I've Made

In Topic: Decent vector library for C?

22 August 2016 - 04:56 PM

I prefer eigen. It's header only, fast (heavily vectorized and lots of template magic to make all operations efficient), packed with features and works everywhere. There are some quirks to be learned, because it's more like a math library, rather than a gamedev / graphics one.


In Topic: Loading Rather Complex Objects Quickly

12 August 2016 - 04:17 AM

Encode your data to something like z85 when storing in your choice of file type, use blosc for fast compression / decompression. And so on.

In Topic: Can Render Triangle And A Quad, But More Complex Shape Results In Segfault

08 August 2016 - 10:11 PM

You answer is a bit misleading, so was mine. Just to clarify this, to avoid issues in the future, the second parameter is the number of components for that element. Ie, for positions it's three because you have 3 components, xyz.

In Topic: Can Render Triangle And A Quad, But More Complex Shape Results In Segfault

07 August 2016 - 08:32 PM

Oh right, the second parameter is the number of components.

Also, op, you have to double check your classes. For example the mesh class does not cleanup the vbos and ibos when deleted. If those are managed by a different class, then it's a bad idea to store them on the mesh.

In Topic: Can Render Triangle And A Quad, But More Complex Shape Results In Segfault

07 August 2016 - 05:45 PM

Hey!

 

There might be other issues, but this is definitely one. The glVertexAttribPointer needs the offset in bytes (ie, the starting position inside your buffer for that attrib). So in your case, that's 3 * sizeof(float), rather than 3.


PARTNERS