Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


MonkeyInBlack

Member Since 27 Jan 2004
Offline Last Active Aug 12 2013 12:54 PM

Topics I've Started

Character Portraits

12 August 2013 - 08:29 AM

I'm looking for a collection of character portraits for a game i'm working on. Something in the steam punk genre but I'm flexible. Generally just bad ass semi-realistic images of soldiers or assasins or mercenaries. Every once in a while I can find one but the problem is, I want hundreds... Are there any collections (paid or not) that you guys have come across that I may not have?

 

Thanks!


Determining color of pixel on surface

04 September 2006 - 09:29 PM

After having worked with OpenGL for a couple of yars, i started learning DirectX a couple of weeks ago. So far so good, i've got a couple of sample projects running displaying a simple texture loader and stuff like that, but now i've been trying to get picking right in a 2D space and i've hit a road block. I searched gamedev for the best way to do picking like this and found this solution (using a second rendering target to draw the scene on in solid colors, then determine the color of the pixel under the mouse), which i've been trying to implement. I can render the objects i need to a rendering surface fine, but i haven't been able to find how to determine the color of a pixel on that surface afterwards. I've found some examples of code which seems to be outdated for managed directx but after a couple of hours of searching i haven't been able to find a solution which i'll be able to use. Hopefully someone here can help me on my way again.

Centering bitmap fonts

16 June 2005 - 10:38 AM

I've been looking for a way to display bitmap fonts centered but it seems that i'm stuck. The problem i'm having with the fonts is that the different characters composing the font have variable widths. Therefor I can't find out the width of the entire string - and can't center it. I'm sure i must be missing some way to get the width of the different characters in the font. If anyone could help me out here that would make me really [smile]. PS : the code i'm using to build and display the font is pretty standard, but i thought i'd post it anyway.
// Building the font
base = glGenLists(256);
HFONT	font = CreateFont(height,
			0,
			0,
			0,
			FW_BOLD,
			FALSE,
			FALSE,
			FALSE,
			ANSI_CHARSET,
			OUT_TT_PRECIS,
			CLIP_DEFAULT_PRECIS,
			ANTIALIASED_QUALITY,
			FF_DONTCARE|DEFAULT_PITCH,
			fontfile);

SelectObject(hDC, font);

wglUseFontBitmaps(hDC, 32, 96, base);


// Displaying text
char		text[256];
va_list		ap;

va_start(ap, string);
    vsprintf(text, originalstring, ap);
va_end(ap);

glPushAttrib(GL_LIST_BIT);
glListBase(base-32);

glTranslated(x,y,0);
glRasterPos2f(0.0f,0.0f);
glCallLists(strlen(text),GL_UNSIGNED_BYTE,text);
glTranslated(-x,-y,0);

glPopAttrib();

Groupbox on window resizing becomes transparant

21 February 2005 - 10:03 PM

I ran into another small problem. I'm using straight win32 to create a window with (amongst others) a groupbox control. Now when i minimize or resize the window all the controls act normal, except for the groupbox control which becomes transparant - which isn't really what i'm looking for. screenshot : the code for creating the window & groupbox :
RECT windowRect;
windowRect.left = left;
windowRect.top = top;
windowRect.bottom = top + height;
windowRect.right = left + width;
	
WNDCLASSEX windowClass;
	
windowClass.cbSize = sizeof(WNDCLASSEX);
windowClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;	// Redraw the window on resizing
windowClass.lpfnWndProc = windowProc;
windowClass.cbClsExtra = 0;
windowClass.cbWndExtra = 0;
windowClass.hInstance = hInstance;
windowClass.hIcon = NULL;
windowClass.hIconSm = NULL;
windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
windowClass.hbrBackground = (HBRUSH) (COLOR_WINDOW);
windowClass.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);
windowClass.lpszClassName = "MainClass";

if (!RegisterClassEx(&windowClass)) return false;

DWORD dwStyle = WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU |
					WS_CLIPCHILDREN | WS_CLIPSIBLINGS |WS_MINIMIZEBOX | WS_MAXIMIZEBOX  | WS_THICKFRAME;

AdjustWindowRectEx(&windowRect, dwStyle, FALSE, WS_EX_APPWINDOW);

hWnd = CreateWindowEx( WS_EX_APPWINDOW,						
		   className,
		   "caption",
	           dwStyle,
                   windowRect.left, windowRect.top,		
	           windowRect.right-windowRect.left,	
		   windowRect.bottom-windowRect.top,
		   NULL,									   
                   NULL,
                   hInstance,
		   NULL);								

CreateWindow("BUTTON",0, WS_VISIBLE | WS_CHILD | BS_GROUPBOX, 
495, 90, 220, 135, hWnd, (HMENU) IDB_GROUP1, hInstance, NULL);





I hope someone can help me out here.

Win32 button font color

11 February 2005 - 09:55 AM

I give up. I spent the entire afternoon searching for an answer to this - what i believe to be a - simple problem. It is now 11pm and i still haven't found an answer or even a clue to an answer. The problem i'm looking for an answer for is this : i created a button control using straight win32 and now i want to change the color of the text on it. (EDIT : i mean of the caption on it) It seems like something which you should be able to change in 1 or 2 lines of code but so far i haven't found a solution yet. If anyone could help me you'd make me very happy. [smile]

PARTNERS