Jump to content
  • Advertisement
Sign in to follow this  
Tom Backton

OpenGL 10 Beginner's Questions...

This topic is 3241 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

Here are 10 basic questions...some are very simple and I could probably find the answers through Google, but I don't have time for this, so I'm asking here. Your help will be highly appreciated, as my project cannot proceed (it already proceeds very slowly) without the answers. 1. http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX) I don't understand something. Before glXGetProcAddress() is called, a dummy context is created, but it is not made current. I thought there has to be a valid current context. Is it a mistake or glXProcAddress() only needs an existing context even if it's not current? And what about WGL? wglgetProcAddress() can be called only after an RC is made current right? Another question: the OpenGL wiki says an RC cannot be recreated for a window, so after destroying the dummy RC I also need to recreate the window. But somewhere else I read a tutorial that doesn't delete the window. So I'm not sure...does the one-wglCreateContext()-per-window exist? 2. What are the definitions of Bool, True, False, XID and None in Xlib? 3. ATI suggests each element in a VBO starts on a 32 byte boundary. Does it mean the offset between the VBO's beginning and the element's beninning should be 32*n or that I can have an element start at offset 7 as long as it's 32 bytes long? (my program uses 16 bytes per element, so I'll probably interleave elements to avoid watsing 16B padding for every 16B vertex. The question is whether I should place more frequently used vertices as even-numbered elements so that they get the boost) 4. When passing data to and from the GPU (vertex arrays, draw pixels, texture image or anything else), at lease in 32-bit systems, the data should be 4Byte-aligned. On 64-bit systems, should the alignment be to 8 bytes instead? In all cases? Do GPUs work in 64-bit mode like CPUs? 5. What happens if I try to read a uint variable using glGetIntegerv()? Is it simply copied into a RAM uint variable? And what if I read an int64 variable? 6. There is a large set of images. An image is drawn as a texture object, using four (vertex, texcoord) pairs. They are written into a VBO. If they are not written as an array but at "random" offsets, which method is faster/recommended: A. Save the four indices in an IBO and draw with glDrawRangeElements B. Save the indices as a ushort array and draw with glDrawRangeElementsIn the first case I need to send the GPU an offset (64-bit integer) while in the second case I send 4 ushort variables (each 16-bit, in total 64 bits). The array length (4) is sent in both cases, so in total the same amount of data is sent. So I'd like to know which method you'd suggest/use... 7. http://www.opengl.org/wiki/Common_Mistakes#Misaligned_vertex_formats Is the VA 4-byte alignment remain 4-byte 64-bit OpenGL? And is the alignment needed in VBO too? 8. Why do I see the parallel axis theorem in all collison detection tutorials? I can't see why it's better/faster than checking for every side of polygon A whether is collides with any side of polygon B. It also works for concave polygons, while the PAT only works for convex ones. If everybody uses PAT I'm probably missing something... 9. Why is dithering enables by default? If I assume the user has a modern video card which support 32-bit colors, is it a good idea to turn off dithering? 10. I read somewhere about texture internal format GL_RGBA being faster than GL_RGB because of memory alignment issues. Is it true for new GPUs (OpenGL 2.1 and above)? Which option will have better performance, a GL_RGB texture or a GL_RGBA texture with all A values equal to 1.0 ?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Tom Backton
some are very simple and I could probably find the answers through Google, but I don't have time for this, so I'm asking here.

Wow.

Share this post


Link to post
Share on other sites
Yup, those are ten basic questions. Some are very simple, and I could probably type out the answers without research. But I don't have time for this, so I'm going to close this thread.

You're welcome to repost your questions, after you've done a bit of cursory research yourself (i.e., what have you tried?). Show us some respect for our persons and our time, and we'll show you the same.

Share this post


Link to post
Share on other sites

This topic is 3241 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.

Guest
This topic is now closed to further replies.
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!