Jump to content
  • Advertisement
Sign in to follow this  
Ygreg

OpenGL hardware accelerated mode

This topic is 4901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
If you're doing something silly, like using glVertex, that might be the cause.

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!