PDA

View Full Version : some newbie question



satan
02-12-2002, 04:47 PM
hi evrybody!

i am starting to code opengl and therefore have some questions
since some of them are linux specific and i am only doing linux coding i hope it is ok to ask all questions here

1. how can i see if my agp works or not?
when i boot agpart init looks ok, but nvidia says that on ali(1541) chipsets agp is disabled by default - so i looked in os_registry.c, enabled what is mentioned there and got a framerate decrease - strange!!!

2. is it possible to get fullscreen rendering without using glut or something alike

3. what is the advantage of using a rendering thread instead of doing all (app behaviour and rendering in one process - i can't imagine it is performance)

4. when implementing my camera modell (still in work) is it faster to use glulookat or multmatrix (since i need to create the rotation matrix and the values used for glulookat there is no big difference for me using the one or the other, although i'd prefer glulookat, 'cause i think that glrotate and gltranslate are highly optimized on most implementatrions)

any help is highly welcome

p.s. http://www.opengl.org/discussion_boards/ubb/tongue.giflz, talk to me like a 3 year old child since i am just a coder

02-12-2002, 11:26 PM
1. cat proc/nv/card0
2. Sure, take a look at the GLX ports of NeHe's tutorials for example.
3. The only one I can think of for a single CPU machine is to make the program respond quicker if the rendering takes a long time. The rendering is really running in a parallell process handled by the driver but I guess that is not what you mean.
4. I think that they are the same and that this is not a place there time can be saved. You have the sources for GLU so you can check how gluLookAt is implemented.

satan
02-13-2002, 01:59 AM
thx alot that's all i needed
as to point 3 i meant that i create a thread, which i manage myself, where all my rendering code is executed
the opengl superbible says that this is quite good, but i could not really find why (esp. since it is on linux)
the question is, if it makes any sense for me to do the same, since it would be hard to do, as the compiler i am using is not yet thread save

Julien Cayzac
02-13-2002, 09:02 AM
Originally posted by satan:
thx alot that's all i needed
as to point 3 i meant that i create a thread, which i manage myself, where all my rendering code is executed
the opengl superbible says that this is quite good, but i could not really find why (esp. since it is on linux)
the question is, if it makes any sense for me to do the same, since it would be hard to do, as the compiler i am using is not yet thread save

Uploading the vertices to the video card is a blocking operation (except when using fences -see the NV_fence GL extension). Having two distinct threads means only the rendering one will eventually get blocked.

Mono-vs-Multi threaded applications have led to a huge troll^Wdiscussion in the advanced forum some months ago. The right answer is: do whatever you feel comfortable with. Both options can be equally efficient if well implemented.

Julien.

satan
02-13-2002, 02:04 PM
me: hi compiler, mono-or-multi threaded?

compiler: i am not thread save, but do as you plz

me: ok, compiler, mono-threaded

http://www.opengl.org/discussion_boards/ubb/smile.gif

thx

end of topic

02-14-2002, 05:59 AM
I did little research and found that Quake3 is not using multiple threads. OpenGL Performer also as default just starts an input thread besides the main thread on a single CPU linux system. It is different on other systems: http://techpubs.sgi.com:80/library/dynaw...kTextView/10083 (http://techpubs.sgi.com:80/library/dynaweb_bin/ebt-bin/0620/nph-infosrch.cgi/infosrchtpl/SGI_Developer/Perf_GetStarted/@InfoSearch__BookTextView/10083)

I do not think that uploading the vertices to the video card is a blocking operation but this depends on the size of the buffers that the OpenGL implementation is using. The vertices should be placed in some FIFO queue.

From the NVidia documentation about GL_NV_vertex_array_range:
"By allowing the application to allocate and access memory thats usually only accessible by the driver, a developer can minimize data copying and thus maximize performance." .

I guess you mean using fences like suggested in this thread http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/002339.html
Sure, that would be good and also multiple threads is good if you can find any use for them. I guess it depends on the application.