Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 02 Mar 2006
Online Last Active Today, 03:20 PM

Topics I've Started

Preprocessor query

14 September 2014 - 03:50 AM

Anyone got any idea what I am doing wrong here? This is GCC.

#define test(a, b) int a ## b

void f()
    test(name, __LINE__);
This is creating a variable called "name__LINE__" rather than "name124" or whatever.

I'm trying ultimately to do something like:

#define lock_flag(a) flag_lock_object _temp##__COUNTER__(a)
But I can't seem to get the basics of expanding a macro within a macro working? All web research I've done suggests I'm doing it correctly so driving me a little nuts.


Ampersands in code tags

11 August 2014 - 05:36 AM

Sorry if this is a dumb question but I'm trying to upload an article and can't figure out how to use & characters inside code blocks? They are getting translated to & in the preview.

I tried using & in the article text which gets translated to &amp smile.png What sort of voodoo do I need to do to my ampersands in the source?

Thanks in advance.

Journals in mobile

06 April 2014 - 10:18 AM

Attached File  image.jpg   61.08KB   8 downloads

Any idea why journals are unusable on mobile (iOS here)? The other areas of the site load like this then spring into a proper width but the journals stay like this.


Matrix palettes in vertex shader

07 May 2013 - 01:42 PM

I'm writing a 3D modeller at the moment so am trying to find a way to support as many joints as possible in a model since I can't just restrict to a domain-specific sensible number like you could in a game.


This is DirectX 9.0 by the way, should probably stress that.


The only way I've ever known how to get this data into a shader is an array of matrices as a global in the shader that is written to prior to the render. However, seems (obviously) there is a fairly strict limit on how much you can allocate for global data in a shader and I also don't know if this will vary from hardware to hardware so hard to know what I can rely upon here. On my laptop I can't get more than about 40 matrices in an array before it bombs out.


Just wondering what other approaches people are aware of to get this matrix data into the shader. I know I can reduce things by just inputting a quaternion and a translation vector, but that is still going to take half as many (registers?) as a matrix so will still have a hard limit.


I'm toying with the idea of using a floating point texture to store a list of pairs of quaternion and translation vectors, using 8 texels per joint, but just wanted to see if there were more obvious solutions I'm missing? I'd rather avoid software processing of the model for animation since I can't predict the model size/complexity so need it as performant as possible.


Thanks in advance.

Journal votes not working properly

28 December 2012 - 01:35 AM

Very minor detail but just wanted to report, if someone votes up my journal, it appears as a blank item in the list when I click my rating and the funky green box that appears to inform me of an up-rate is also blank.

It's not a problem, just wanted to let you guys know. Apart from this, the whole system is working a treat and the My Content is light years ahead of what we used to have on the old site, so thanks to everyone.