Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Dec 2000
Offline Last Active Yesterday, 09:04 AM

#5316028 3d representations

Posted by on Yesterday, 12:05 AM

  • Boundary representations
    • Triangular/polygonal meshes
    • NURBS and other spline/higher-order surfaces
    • Subdivision surfaces
  • Volumetric representations
    • Tetrahedral/polyhedral meshes
    • Voxels
    • Trivariate NURBS and other spline/higher-order volumes
    • Subdivision volumes
  • Other representations
    • Primitives (spheres, cylinders)
    • Implicit surfaces (signed distance functions, metaballs etc.)
    • Constructive solid geometry

#5312835 13 Y/O That Is Interested In Learning How To Make Video Games

Posted by on 27 September 2016 - 08:06 AM

Also, when you write tests, make sure the test actually fails on incorrect results! Fail first, then fix. That is the TDD way, and for damn good reasons.

#5303431 Approximate Average Brightness Of Rendered Image

Posted by on 01 August 2016 - 03:24 AM

Phuh... That's a complex thing. I don't know how to access mipmaps, I'm not such experienced. I just do some simple experiments.

Within a shader you can simply use textureLod (with a sufficiently high value for the lod) to access specific mipmap levels.

#5303416 Approximate Average Brightness Of Rendered Image

Posted by on 01 August 2016 - 01:05 AM

Yeah, you can do the dot product after mipping, or you can do it beforehand (into a single-channel texture) and then mip that.


If this is for HDR, the geometric mean is often more useful / representative. You can compute it by doing the dot first, then a log (into a single channel texture), then mipping down to 1x1, then an exp to undo the log.

But don't forget to add a black offset (you don't want to add any -infinity values into your average)

#5300175 When you realize how dumb a bug is...

Posted by on 11 July 2016 - 08:49 AM


I've had an SSD that was failing to be recognized for weeks, and before I shipped it back (Filled out the RMA and got a label), windows updates turned off my computer.


When I booted it up, the SSD was working fine. I just needed to power cycle the SSD to fix it, and i hadn't even turned off my computer in weeks.


Why would you leave your PC on for weeks continously anyway? ^^


Nightly backups and use as build slave/helper for distributed builds?

#5295674 Do you usually prefix your classes with the letter 'C' or something e...

Posted by on 08 June 2016 - 02:24 PM


Actually, m_ for members and g_ for globals helps quite a bit while reading a lot of unknown code.

The problem is that this kind of convention is brittle. It encodes information about scope into the variable name, but if you refactor to change scope the encoding is wrong and the variable must be renamed.  Forget or neglect to rename the variable and now you've got misleading information.


A far more robust convention is to require the use of this-> for members and to require full namespace naming for globals.  The compiler can then help you by catching incorrect usage.  In an ideal world C++ would have had these requirements from the outset.


this, a thousand times this (pun absolutely intended). I sometimes wish c++ had gone the same route as python or rust with an explicit self/this parameter. which could also enable things like templates based on the reference qualifiers of the object.

#5284016 Naming conventions, software documentation and version control

Posted by on 29 March 2016 - 03:25 AM

Simple. They find className.doSomeThing() more readable than class_name.do_some_thing().
That's it, and it's a perfectly valid reason.


IMO it is the opposite. But to each their own. Personally I think in many cases it was just "inherited" from the Java coding standard, because that was one of the most popular/well known of the codified standards.

#5282636 GIT vs Mercurial

Posted by on 22 March 2016 - 09:03 AM

Subversion is out.


Why? It works well for binary assets. Or at the very least a lot better than GIT (or any DVCS for that matter).

#5282583 Naming conventions, software documentation and version control

Posted by on 22 March 2016 - 03:26 AM

It might be informative to look at the naming conventions used in the standard library (defined through an ISO standards document)


This. A thousand times this.


Why is it that so many C++ programmers choose a Java style and (often) also throw out any and all uses of the standard library... 

#5282557 GIT vs Mercurial

Posted by on 22 March 2016 - 02:50 AM

Have any of those complaining about subversion's branch/merge handling actually tried it with a version less than about 5 years old? Since SVN started noting branch and merge information in properties it has become much, much better at handling them. Haven't had any serious problems in a long time.


- It doesn't create .svn folders everywhere.


Subversion hasn't done that for quite some time either.

#5279634 When you realize how dumb a bug is...

Posted by on 05 March 2016 - 04:39 AM

Oh right, for some reason I thought that was GLint =S (that said, I think OpenGL returns 0 on error when it'd return an identifier, if anybody wonders)

Not in this case, glGetUniformLocation returns -1 if the uniform is not available.


But you probably shouldn't assert on that, as it might just have been optimized away...

#5274936 Have You Ever....?

Posted by on 09 February 2016 - 01:50 AM


was copy-pasted in 5 different locations in the code

I spent a week creating such situation. Now I get to fix it.


If only everyone were so diligent as to clean up their own mess.

#5274854 Have You Ever....?

Posted by on 08 February 2016 - 09:15 AM

Have you ever joked about developing a keyboard that delivers an electric shock if ctrl-c or ctrl-v are pressed and later thought there really is a need for these after having to fix some idiotic bug that was copy-pasted in 5 different locations in the code?

#5274612 Have You Ever....?

Posted by on 06 February 2016 - 03:02 AM

Have you ever tried to refactor a big-picture part of your code's architecture, and bit off a larger chunk than you could chew at once, taking more than two weeks to get your code even compiling again, let alone running?

all the time... people just love their singletons and shared state... leading to any change being a big-picture change...

#5271725 When you realize how dumb a bug is...

Posted by on 18 January 2016 - 11:54 AM


(I'm not sure how obvious it is what exactly happens here. I've only programmed using OpenGL and c++ on my own. Feel free to ask). 


m_VboID isn't initialized, so glGenBuffers(1, &m_VboID); might not get called, but since you were compiling in Debug mode, the compiler initialized it for you, hiding that the bug existed?


additionally, glGenBuffers is only called if(m_VboID != 0), so only if m_VboID is already set to a non-zero value.