0% found this document useful (0 votes)
19 views

Camera - Low Frame Rate in OpenGL - Stack Overflow

The document discusses a question posted on Stack Overflow about low frame rates in OpenGL. The question asked why a Blender obj file was running slowly in an OpenGL application and how to make it faster. Answers suggested optimizing the rendering pipeline by removing the fixed function pipeline and using shaders and vertex buffers instead.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Camera - Low Frame Rate in OpenGL - Stack Overflow

The document discusses a question posted on Stack Overflow about low frame rates in OpenGL. The question asked why a Blender obj file was running slowly in an OpenGL application and how to make it faster. Answers suggested optimizing the rendering pipeline by removing the fixed function pipeline and using shaders and vertex buffers instead.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

4/7/24, 4:17 PM camera - Low frame rate in OpenGL - Stack Overflow

Low frame rate in OpenGL [closed]


Asked 11 years, 3 months ago Modified 11 years, 3 months ago Viewed 1k times

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or
rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it
-4 can be reopened, visit the help center.

Closed 11 years ago.

I have a blender obj. file in an OpenGL application. I have also added a camera so that it will move in
around that object (it's a building, so it's pretty large). The frame rate on it is awful.

Why is it slow and/or how can I make it faster?

void camera (void) {


glRotatef(xrot,1.0,0.0,0.0);
glRotatef(yrot,0.0,1.0,0.0);
glTranslated(-xpos,-ypos,-zpos); }

This is just my simple camera class. Just in case it helps.

opengl camera frame-rate

Share Improve this question Follow edited Jan 9, 2013 at 20:11 asked Jan 9, 2013 at 19:42
Bart Richard Cripps
19.9k 7 70 79 193 1 11

2 This question is more than likely unanswerable (besides random guesses) without seeing your code. – Bart Jan 9,
2013 at 20:04

@Bart He is using the fixed function pipeline, you can see it with the few lines above. That has a big performance
impact. See my answer. – Felix K. Jan 9, 2013 at 20:11

2 @FelixK. Your answer perfectly aligns with my "besides some random guesses". Educated guesses, but random
ones. – Bart Jan 9, 2013 at 20:12

@Bart The question isn't really good but at least he has something he can start with and if this isn't helping ( i'm
sure it will ) he can ask here again. – Felix K. Jan 9, 2013 at 20:14

That isn't really a camera class, but a function. – Victor Zamanian Jan 9, 2013 at 21:24

1 Answer Sorted by: Highest score (default)

There are some reasons your code might be slow:

You aren't using VertexBuffer objects


1
You are using the fixed function pipeline and not shaders

You aren't optimizing your drawing code that only areas are rendered which are visible ( look a.e.
for bsp-trees )

https://stackoverflow.com/questions/14245135/low-frame-rate-in-opengl 1/2
4/7/24, 4:17 PM camera - Low frame rate in OpenGL - Stack Overflow

After all you've a lot of optimizations to do. I would start with optimizing my render pipeline and remove
the fixed function pipeline and start to use shaders and vertex-buffers.

Share Improve this answer Follow answered Jan 9, 2013 at 20:10


Felix K.
6,251 2 39 71

Thankyou for the answer. i wasnt looking for a direct code statement, more information on how frame rates can be
improved. i just phrased the question poorly. thank you for the help though. i have integrated vertex buffering and it
is going alot quicker. much appreciated! – Richard Cripps Jan 13, 2013 at 0:49

@user1956870 Happy that i could help. – Felix K. Jan 13, 2013 at 9:36

https://stackoverflow.com/questions/14245135/low-frame-rate-in-opengl 2/2

You might also like