Advertisement

Realism and strange things

Started by June 10, 2003 02:24 PM
10 comments, last by nildo 21 years, 8 months ago
Hello! I was doing a single 3dEngine. With a floor and some walls, texturized. But the walls dont look realist like some i have been seing. And its slow to walk trought the world. Could you download my project (in delphi) from: http://sites.uol.com.br/guerapan/demo.zip and do some fixes? I am newbie in openGl. Thanx ! Then you send the changes here. Thank a lot
ummmmmmmmm, no
Advertisement
Why do I get the feeling someone is being lazy? Every programmer has to stick some time in debugging every now and then, you know...
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.
CROSSPOST!!! read the FAQ nildo

Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]


GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don''t post crap!

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

quote:
Original post by nildo
Hello!
I was doing a single 3dEngine. With a floor and some walls, texturized.
But the walls dont look realist like some i have been seing. And its slow to walk trought the world.
Could you download my project (in delphi) from:
http://sites.uol.com.br/guerapan/demo.zip

and do some fixes? I am newbie in openGl. Thanx !
Then you send the changes here. Thank a lot



I like this "slow to walk trought the world"
Why don''t you just set moving speed higher?
The speedy i am telling is cause i got 0.5 f/s
Advertisement
this doens''t prevent you from moving faster
(you can find me on IRC : #opengl on undernet)
Dude, you wrote the whole program in the slow font! You can get a 425% boost in framerate by writing it in <i>Aerial New</i>. I know you can get other fonts cheaper on ebay but don''t you''ll be sorry!

Another problem could be that it is competing with other resources on your system. Try deleting all other applications and see if that helps.
wow dude... im running a GF4 Ti4600 and i waste no time moving from one side to the other. whats your complaint??? jk.
Allright...
since nobody want''s to help, i think i''ll try, but don''t laugh at me, if i''m incorect, bcos i still suck at OGL...

step 1:

first of all - why do clear twice ?

in glDraw change this:


glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();

glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer
glLoadIdentity();// Reset The View


to this:


glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer
glLoadIdentity();// Reset The View


step 2:

this, from glDraw, can be put to glInit

glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glEnable(GL_COLOR_MATERIAL);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, @especular);
glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, 500.0);
glLightfv (GL_LIGHT0, GL_SPECULAR, @especular);
glLightfv (GL_LIGHT0, GL_POSITION, @position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);

ont forget these too:
const
especular: array[0..3] of glFloat = (1, 1, 1, 1);
position: array[0..3] of glFloat = (1, 3, 1, 0);

step 3:

cleanup your glInit, i''m to busy to everything for you ;]
if you want GL_LIGHT0 at camera position, then move back
glLightfv (GL_LIGHT0, GL_POSITION, @position); from glInit to glDraw ant do more changes to pass camera position coords to @position. if you don''t know, ask someone else.

step 4:

do your StretchX, StrechY thingies on startup, not every frame, i don''t think this is necesary (not guaranted).

and one more thing

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); looks better than glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);


well, i think that''s enough for now.

This topic is closed to new replies.

Advertisement