Jump to content

  • Log In with Google      Sign In   
  • Create Account


kuroioranda

Member Since 16 Apr 2007
Offline Last Active Nov 06 2013 07:59 PM
*****

Topics I've Started

2D acceleration on modern cards

25 October 2011 - 05:45 PM

I'm wondering if anybody knows whether or not modern consumer GPUs on PC (ATI, Nvidia, Intel) still have dedicated hardware for 2D rendering operations, or if the drivers repurpose the 3D hardware for 2D operations now? It seems like it would be easy enough to emulate most 2D blitting operations with screen aligned 3D primitives.

Mirroring a quaternion against the yz-plane

13 April 2011 - 07:42 PM

I've switched my animation system over from using Euler angles to quaternions for representing bone rotations. It all works pretty well, except for the animation mirroring. I'm not sure how to mirror a quaternion about a plane, which is what I was doing with the old system (by simply flipping the sign on all x rotations).

Could anybody point out how this is can be done when using quaternions?

Why does this not compile?

18 March 2011 - 01:09 PM

?Does anybody know why the following code doesn't compile? I'm getting the following error (and only this error) when I try to compile it. If I change foo to be an object allocated on the stack, it compiles fine. The compiler is VC++2008.

Error:
1>c:\documents and settings\~\test.cpp(34) : error C2228: left of '.printText' must have class/struct/union

I don't understand why I am getting this error, as foo is clearly typed as TextPrinter.

#include "stdafx.h"

class TextHolder
{
public:
	TextHolder(const char* text) : m_Text(text) {}
	const char* GetText() const { return m_Text; }
private:
	const char* m_Text;
};

class SpecialTextHolder : public TextHolder
{
public:
	SpecialTextHolder() : TextHolder("Heyo!") {}
};

class TextPrinter
{
public:
	TextPrinter(const TextHolder& print) : m_TextHolder(print) {}
	void printText() { printf(m_TextHolder.GetText()); }

private:
	const TextHolder m_TextHolder;
};

int _tmain(int argc, _TCHAR* argv[])
{
	TextPrinter foo(SpecialTextHolder());
	foo.printText();                 					// this is the line with the error

	Sleep(2000);
	return 0;
}

Thank you very much for any help you can provide!

Loading the Windows system font in freetype2

01 October 2010 - 08:11 AM

Hi all. I'm currently adding a Lua console to my game, but I don't want to have to bundle a font file with the executable just for the console, so I'd like to load a built in Windows font instead. I've googled around, but come up blank on how to do this with Freetype2.

So my question is basically: How do I load a built-in Windows font into Freetype2 (using only libraries accessible from non-managed c++)? Ideally I'd like to load the system font used for command/dos windows.

Convert change in orientation from local space to world space.

18 September 2010 - 07:59 AM

[Edit]Nevermind, I just converted my hierarchy over to use the Blender space for bones, and everything works great.[/Edit]

[Edited by - kuroioranda on September 19, 2010 2:48:21 AM]

PARTNERS