3D graphic

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: 3D graphic
Apprentice
Member # 9352
Profile #0
Topic WFGIYG was created just for fun.
It is realy strange to see graphic like on mobile in PC game :eek:

Maybe this code help developers make 3D graphic in
their games:

BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
GLuint PixelFormat;
WNDCLASS wc;
DWORD dwExStyle;
DWORD dwStyle;
RECT WindowRect;
WindowRect.left = (long)0;
WindowRect.right = (long)width;
WindowRect.top = (long)0;
WindowRect.bottom = (long)height;

hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "Engine";

if(!RegisterClass(&wc))
{
MessageBox(NULL, "Failed to register the window class", "ERROR", MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(StateManeger->Window.fullscreenflag)
{
DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = width;
dmScreenSettings.dmPelsHeight = height;
dmScreenSettings.dmBitsPerPel = bits;
dmScreenSettings.dmFields = DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;

if(ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL){
if(MessageBox(NULL, "The requested fullscreen mode is not supported.\nUse windowed mode instead ?", "Engine", MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
{
StateManeger->Window.fullscreenflag = FALSE;
}else{
return 0;
}
}
}

if(StateManeger->Window.fullscreenflag)
{
dwExStyle = WS_EX_APPWINDOW;
dwStyle = WS_POPUP;
}else{
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
dwStyle = WS_OVERLAPPEDWINDOW;
}

AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);

if(!(hWnd = CreateWindowEx(dwExStyle,
"Engine",
title,
dwStyle |
WS_CLIPSIBLINGS |
WS_CLIPCHILDREN,
0, 0,
WindowRect.right-WindowRect.left,
WindowRect.bottom-WindowRect.top,
NULL,
NULL,
hInstance,
NULL)))
{
DestroyGLWindow();
MessageBox(NULL, "Window creation error", "ERROR", MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

static PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
bits,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};

ShowWindow(hWnd, SW_SHOW);
SetForegroundWindow(hWnd);
SetFocus(hWnd);
ReSizeGLScene(width, height);
glViewport(0,0,width,height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,1.0f,1024.0f);
glMatrixMode(GL_MODELVIEW);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
SwapBuffers(hDC);


--------------------
NOOBS!
Posts: 3 | Registered: Sunday, July 15 2007 07:00
Agent
Member # 1934
Profile Homepage #1
It's not going to happen. IBTL.

--------------------
You acquire an item: Radio Free Foil
Posts: 1169 | Registered: Monday, September 23 2002 07:00
...b10010b...
Member # 869
Profile Homepage #2
Look, I understand that you have a very special relationship with polygons, but Spiderweb Software does not exist to cater to your sexual preferences.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Infiltrator
Member # 3040
Profile #3
I'm pretty sure it's "orientation" these days.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
By Committee
Member # 4233
Profile #4
"Preferences" is about as value-neutral as "orientation."
Posts: 2242 | Registered: Saturday, April 10 2004 07:00
Apprentice
Member # 9353
Profile #5
Khmm... if you so stupid to understand the code, it's your own problem with your pidar orientation)) Go and buy pampers, if you so scared opengl with win api :D
Posts: 8 | Registered: Sunday, July 15 2007 07:00
Law Bringer
Member # 6489
Profile Homepage #6
quote:
Originally written by Illidane:

Khmm... if you so stupid to understand the code, it's your own problem with your pidar orientation)) Go and buy pampers, if you so scared opengl with win api :D
Jeff could theoretically use OpenGL, since it is cross-platform, but you should know that he always makes the Mac version first. Also, there is no need to make these games 3D.

--------------------
"You're drinking liquor because you're thirsty? How nasty is your freaking water?" —Lazarus
Spiderweb Chat Room
Avernum RPSummariesOoCRoster
Shadow Vale - My site, home of the Spiderweb Chat Database, BoA Scenario Database, & the A1 Quest List, among other things.
Posts: 1556 | Registered: Sunday, November 20 2005 08:00
Law Bringer
Member # 2984
Profile Homepage #7
quote:
Originally written by Illidane:

Khmm... if you so stupid to understand the code, it's your own problem with your pidar orientation)) Go and buy pampers, if you so scared opengl with win api :D
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
Failing to comment or even provide a summary of what the code is supposed to do, and then making fun of people for not understanding it, is a deep folly indeed. In hell, you will be trapped in an eternal for loop and forced to write "//increment i by 1" for ever more. :P

--------------------
EncyclopaediaArchivesMembersRSS [Topic / Forum] • BlogPolarisNaNoWriMo
Look on my works, ye mighty, and despair. | I have a love of woodwind instruments.
"That damn meddling eskimo." --WKS about Alorael
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Apprentice
Member # 9353
Profile #8
Put your hell in your ass, i am an atheist :D
you are lols))) Now i see how american stupid...
in movie, real video (interview with american) :
- who is a qeen of great britain now?
(answer)- eeee... what state is it?

[ Monday, July 16, 2007 02:56: Message edited by: Illidane ]
Posts: 8 | Registered: Sunday, July 15 2007 07:00
Law Bringer
Member # 6489
Profile Homepage #9
quote:
Originally written by Illidane:

Put your hell in your ass, i am an atheist :D
Which makes you entry into Hell all the more assured. :P

--------------------
"You're drinking liquor because you're thirsty? How nasty is your freaking water?" —Lazarus
Spiderweb Chat Room
Avernum RPSummariesOoCRoster
Shadow Vale - My site, home of the Spiderweb Chat Database, BoA Scenario Database, & the A1 Quest List, among other things.
Posts: 1556 | Registered: Sunday, November 20 2005 08:00
Apprentice
Member # 9352
Profile #10
#define Thuryl Biologist
#define Biologist CON
For NOOBs like you: this code describe that Thuryl means CON

[ Monday, July 16, 2007 08:02: Message edited by: XYZ3D ]

--------------------
NOOBS!
Posts: 3 | Registered: Sunday, July 15 2007 07:00
Apprentice
Member # 9353
Profile #11
quote:
Which makes you entry into Hell all the more assured. :P

Then I'll say to Satan, that i am not american and get comfort conditions on the quiet :D

[ Monday, July 16, 2007 03:21: Message edited by: Illidane ]
Posts: 8 | Registered: Sunday, July 15 2007 07:00
Law Bringer
Member # 2984
Profile Homepage #12
I'm an atheist myself. :P

God, Devil or no, there is however a programmer hell. I've glimpsed into it. So can you. ;)

--------------------
EncyclopaediaArchivesMembersRSS [Topic / Forum] • BlogPolarisNaNoWriMo
Look on my works, ye mighty, and despair. | I have a love of woodwind instruments.
"That damn meddling eskimo." --WKS about Alorael
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Lifecrafter
Member # 6193
Profile Homepage #13
You form your opinions on the populations of other countries by watching reality television shows? That's cute....

And in other news, was Aran just mocked for being a bible-thumping American? :D

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Law Bringer
Member # 2984
Profile Homepage #14
quote:
Originally written by Lazarus.:

And in other news, was Aran just mocked for being a bible-thumping American? :D
Yeehaw!

IMAGE(http://z.about.com/d/politicalhumor/1/0/o/4/bush_cheney_4morewars.jpg)

--------------------
EncyclopaediaArchivesMembersRSS [Topic / Forum] • BlogPolarisNaNoWriMo
Look on my works, ye mighty, and despair. | I have a love of woodwind instruments.
"That damn meddling eskimo." --WKS about Alorael
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Canned
Member # 8014
Profile #15
I think we are being invaded by a flamer and a 1337. :P

Also, why do you want to make these games worse? These games do better as they are.

Edit -In before the lock! Oh, and imagine if TM were here...

[ Monday, July 16, 2007 05:45: Message edited by: Infernal Flamming Muffin ]

--------------------
I can transform into almost anything, though not sanity.

Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again

WtRM v. 2.0.1 betatesting needs Mac users...Thraini is getting impatient.
Posts: 1799 | Registered: Sunday, February 4 2007 08:00
Law Bringer
Member # 6489
Profile Homepage #16
quote:
Originally written by Illidane:

- who is a qeen of great britain now?
(answer)- eeee... what state is it?

That is hardly an accurate representation of all Americans. Also, I do no believe anyone has the title of "qeen of great britain." :P

However, the Queen of the United Kingdom of Great Britain and Northern Ireland is Elizabeth II of the House of Windsor. Technically, she's just Elizabeth I in Scotland, but that's not really a big deal.

--------------------
"You're drinking liquor because you're thirsty? How nasty is your freaking water?" —Lazarus
Spiderweb Chat Room
Avernum RPSummariesOoCRoster
Shadow Vale - My site, home of the Spiderweb Chat Database, BoA Scenario Database, & the A1 Quest List, among other things.
Posts: 1556 | Registered: Sunday, November 20 2005 08:00
Apprentice
Member # 9353
Profile #17
Graatzz!!!)))
But why you are using many terrible words?? :D let's speek ukrainian, it's more harder language :P !
Posts: 8 | Registered: Sunday, July 15 2007 07:00
Warrior
Member # 5310
Profile #18
Plain english is clearly difficult enough, why make it harder?
Posts: 57 | Registered: Monday, December 20 2004 08:00
Canned
Member # 8014
Profile #19
I don't know.
1337s are hard to understand.

--------------------
I can transform into almost anything, though not sanity.

Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again

WtRM v. 2.0.1 betatesting needs Mac users...Thraini is getting impatient.
Posts: 1799 | Registered: Sunday, February 4 2007 08:00
? Man, ? Amazing
Member # 5755
Profile #20
Yay! Borat is here!

--------------------
WWtNSD?

Synergy - "I don't get it."
Posts: 4114 | Registered: Monday, April 25 2005 07:00
Electric Sheep One
Member # 3431
Profile #21
Eeee are not amused.

--------------------
We're not doing cool. We're doing pretty.
Posts: 3335 | Registered: Thursday, September 4 2003 07:00
Apprentice
Member # 9353
Profile #22
quote:
Originally written by Jumpin' Sarcasmon:

Yay! Borat is here!
:D see? it's classic stupid american))) Kazahstan is not Ukraine, it's very different countries, we are developed democratic nation. You all have IQ like your president (he is like monkey :D ) ??
Posts: 8 | Registered: Sunday, July 15 2007 07:00
Lifecrafter
Member # 6193
Profile Homepage #23
Do you know what the Ukraine is? It's a sitting duck. A road apple. The Ukraine is weak. It's feeble. I think it's time to put the hurt on the Ukraine.

[ Monday, July 16, 2007 08:45: Message edited by: Lazarus. ]

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Apprentice
Member # 9352
Profile #24
Heart of Earth located in Europe, Ass of Earth located in USA.
You may ask your president, he knows.

--------------------
NOOBS!
Posts: 3 | Registered: Sunday, July 15 2007 07:00

Pages