Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Jul 2012
Offline Last Active Yesterday, 05:08 AM

Posts I've Made

In Topic: Changing texture

13 October 2016 - 12:19 AM

In the simplest form, you could use a very simple fragment shader so render your texture into another texture (Google Render to Texture). But if you only need to do it once, it's probably not a lot faster than doing it on the CPU, but quite a bit more work, especially if you don't have render buffer support in your engine already.

In Topic: Running into some octree problem

13 October 2016 - 12:16 AM

Or ignore the problem. The empty nodes at the bottom probably don't take up a whole lot of space. Deal with it when you run into any problems with it (likely never).

In Topic: What is the general name for types like Quadtrees and Octrees etc

13 October 2016 - 12:13 AM

Or they are just called BSP in general?


BSP is a special kind, just like Octree and Quadtree are. Liguria already said what they're called in general. BSP (Binary Space Partioning Tree) is a special variety that uses two  child-nodes per subdivision, while Quadtrees splits each node into four (usually equally sized) subquadrants.

In Topic: When should I use int32_t rather than int

29 September 2016 - 02:22 AM

Also, be aware that all uint*_t and int*_t are optional in the standard and don't necessarily exist. Only those types exist, that your compiler and CPU support. int_fast*_t, uint_fast*_t, int_least*_t and uint_least*_t exist on all conforming compilers.


The reason is that not all CPUs have integer types of all sizes, though I only know of DSPs that are very special. AFAIK all mainstream consumer CPUs have all the fixed-width types.

In Topic: Style preferences in for loop structure

25 August 2016 - 11:52 PM

i --> 0


I've never seen anyone write it like this, and in fact, without my morning coffee, it took me a few seconds to realize this is actually valid code and I had to put in extra effort to understand that it iterates over the same range. It's a neat trick, but I'm not sure it's really worth confusing other people who may read the code.