OpenGL hardware accelerated mode

Started by
8 comments, last by Twist wish 18 years, 11 months ago
Hello, I have a problem with opengl - I can't get it to run in hardware accelerated mode. I'm using GLUT, and after initialising it like this:

	glutInit( &argc, argv );
	glutInitWindowPosition( 0, 0 );
	glutInitWindowSize( 400, 400 );

	glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
	glutCreateWindow("Okienko");

	glutReshapeFunc( control::onReshape );
	glutKeyboardFunc( control::onKey );
	glutSpecialFunc( control::onSpecialKey );

	glShadeModel(GL_SMOOTH);

it starts in software mode. I've tried some other opengl based programs and they run in hardware mode, so it must be something with my code - am I missing something?
Advertisement
I don't know if I understand you, but the only two things that come in mind are
glutDisplayFunc(renderScene) and glutMainLoop() where renderScene is where you draw the scene:)

by the way, what do you mean by software mode?Some kind of error?
/* As always forgive (or better forget) my english *//* I promise I will learn! */
How do you know its in software mode? do this:

char * Renderer;

and after youve initialized openGL:

Renderer = glGetString(GL_RENDERER);

and then either in the debugger or some other way, check and see what is in Renderer, if its in software mode, it should say something like "Microsoft Corporation" if its in hardware, it should say the name of your vendor, like ATI or NVIDIA

hope that helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Now I'm confused... It says "geforce4 mx 440 with agp8x/agp/sse/3dnow!" so it looks like hardware mode, but still it runs unbelieveably slow (10-15fps). The scene contains less than 5000 triangles, no textures and one light, so it should'nt run THAT slow...
If you're doing something silly, like using glVertex, that might be the cause.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Ooooops ;) I knew that is not a fast way to do this, but I didn't expect glVertex to be so slow... Thanks for the help, time to get back to the tutorials ;)
I'm not sure but I would swear that some days ago I was trying a little program in a GPU similar to yours and I had about 60FPS with more than 5000 triangles(I think about 10000 or some more). Maybe you can try some profiling.
Anyway take a look to glDrawArrays, Vertex Buffer Objects and Display Lists.
/* As always forgive (or better forget) my english *//* I promise I will learn! */
Quote:Original post by Twist wish
I'm not sure but I would swear that some days ago I was trying a little program in a GPU similar to yours and I had about 60FPS with more than 5000 triangles(I think about 10000 or some more).


But what card? I worked with an GeForce4 MX 440 until recently. It's not a terribly powerful card.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Hey, a voodoo2 should be able to do 5K polys at 60 fps.
A GF4 MX440 should be able to outpreform that.

Allso glVertex should not be that slow, i use it and when i compare it to VBO i only get a small increase in fps.
if i run my heightmap renderer at 80000 polygons(all/most visible) i get 98 fps with VBO and 50 without.
(on a quadro 500 it runs at 41 without VBO)
at 180000 polygons it runs at 45 with and 23 without.
(Note that i have a GF6800ultra and a 3GHz processor, VBO optimized and all)
http://web.telia.com/~u91020633/download/software/landscape.rar

(edit: vsync is aparently bad for your framerate, got me a few more frames in the big test) :)


Check if there is something in your code that runs every frame that really shouldn't.

[Edited by - lc_overlord on May 23, 2005 10:38:03 AM]
Quote:Original post by Promit
Quote:Original post by Twist wish
I'm not sure but I would swear that some days ago I was trying a little program in a GPU similar to yours and I had about 60FPS with more than 5000 triangles(I think about 10000 or some more).


But what card? I worked with an GeForce4 MX 440 until recently. It's not a terribly powerful card.


With a GeForce4 MX 420 I think.It's not mine so I'm not sure.But I'm sure it was a GeForce4 MX.
/* As always forgive (or better forget) my english *//* I promise I will learn! */

This topic is closed to new replies.

Advertisement