What is the purpose of glEdgeFlagv?

0x5f3759df
  • What is the purpose of glEdgeFlagv? 0x5f3759df

    I know that what both glEdgeFlagv and glEdgeFlag do is toggle boundary edge status, but my question is why does the v version exist when the documentation specifies that the only difference is that glEdgeFlagv takes (quoting from documentation):

    a pointer to an array that contains a single Boolean element, which replaces the current edge flag value.

    What's the point of having a special version that takes a pointer to an array of length one? I can't imagine its to let you toggle the pointed-to bool to change the value later because the documentation would have to mention that to avoid inadvertent frees. I don't know of any platform where a pointer is smaller than a bool. When would one use glEdgeFlagv instead of glEdgeFlag?

  • It is there for the sake of completeness and consistency with the other APIs. There are vector forms of glVertex, glColor, glTexCoord, etc. glEdgeFlag is part of that group of functions; therefore, there is a vector version of glEdgeFlag.

  • If you are looking for just the outline portion of the graphic, you could try using an emboss filter on it. The outline will be highlighted in white and remove the other non-white pixels below a certain tolerance.

    Here's a decent link talking about various image filters and matrices for accomplishing them: Image Processing for Dummies with C# and GDI+ Part 2 - Convolution Filters

Tags
c++ opengl geometry polygon
Related questions and answers
  • . The documentation says: Do not use this function to try and display the whole waveform of the sound, as this is more of a 'snapshot' of the current waveform at the time it is called.... length Number of bytes you want to lock in the sample buffer. ptr1 Address of a pointer that will point to the first part of the locked data. ptr2 Address of a pointer..., void * ptr2, unsigned int len1, unsigned int len2 ); ptr1 Pointer to the 1st locked portion of sample data, from Sound::lock. ptr2 Pointer to the 2nd locked portion

  • , vTexCoord); } The following is what is rendered when not using the FBO logic: What is rendered to the FBO http://k.minus.com/jiP7kTOSLLvHk.jpg ... Help? Any ideas on what I may be doing wrong... wrong in my frame buffer set up code, or elsewhere. But I can't see what. The FBO is set up through the following function: unsigned int fbo_id; unsigned int depth_buffer; int m_FBOWidth, m_FBOHeight...); glBindFramebuffer(GL_FRAMEBUFFER, 0); } Here is my drawing box code, which just takes a transformation matrix and calls the appropriate functions. The current values of P is a projection matrix

  • There isn't much more to the question. I'm not concerned about overhead, as I'm sure they are both fine for my purposes. Basically, I am familiar with Box2D concepts because of the Farseer Physics Engine, but I want to use Bullet when I make the jump to 3D stuff. Perhaps Bullet has some educational value for me even in the 2D realm? The generalized version of the question is: should I use a 3D physics engine for a 2D game if I plan to utilize a 3D physics engine in the future? Or is this a waste of time which would not provide educational value?

  • animation I would end up storing a lot of data that I don't really need, even if I'm indexing node and frame data when saving and then store the hierarchy with the indices to the actual data. I don't know if my speculations are ok, as I don't have much experience with 3d animations yet. I want to make a well decision as any option I choose would require a lot of work to get it to render and I... for my needs. Ah and I forgot to mention that nodes can have hierarchy, but this is not a problem if the frame data is reduced. The structure instances don't get duplicated unless any value changes. When

  • ); //start rendering scene one way or another glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glUniformMatrix4fv(mats.projHandle,1,GL_FALSE, glm::value_ptr(mats.projMatrix)); glUniformMatrix4fv(mats.mvHandle,1,GL_FALSE,glm::value_ptr(mats.modelViewMatrix)); //bind to vertex array object glBindVertexArray(vaoHandle); //render scene glDrawArrays(GL_TRIANGLES, 0, 240*3 ); //do post-processing... working of windows/linux/osx), I have a toggle to toggle between using the FBO(post-processing) and not. The shaders are working, but it seems the FBO didn't load the texture unit bound to it. The following

  • How does one create a Texture2D Array in DirectX11? The texture I am trying to create is not multisampled, and I want only one mip level. I can't find a working example of a Texture2D Array. I have a buffer of 2D images that I want to use as a Texture2DArray in a shader. The following code snippet works when sTexDesc.ArraySize=1 (as a Texture2D). With sTexDesc.ArraySize=2 the subsequent call.... With larger values of ArraySize CreateTexture2D returns E_INVALIDARG. ubImageStorage contains valid data. As a Texture2D I can add multiples of the slice offset to this buffer address when assigning pSysMem

  • in the main function * not Finally.. but i believe that te numb_coll problem has something to do with the time and framrate. When running full speed i quickly die upon entering a wall as numb_coll... set_location(int X, int Y) { location[0] = X; location[1] = Y;}; bool Alive() {return alive;}; void SetLife(bool f) {alive= f;}; //////////////////////////////// Move //////////// bool move(int X, int Y) { location[0] += X; location[1] += Y; return true;}; };// end of sprite

  • the exception due to unknown size of vertices).... after all this work I was expecting an improvement in performance but my frame rate is almost half what it was when rendering twice with immediate mode...I have a MD2 model loader, I am trying to substitute its immediate drawing function with a Vertex Buffer Object one.... I am getting a really annoying access violation reading error and I can't...->texCoordY); glVertex3f(pos[0], pos[1], pos[2]); } } glEnd(); What I'd like to do is to calculate all positions before hand, store them in a Vertex array and then draw

  • Possible Duplicate: Are there existing FOSS component-based frameworks? What open source game engines with component-based design of game objects do you know? And which best of them? I mean best not in Graphics or Physics, but best in context of Behaviour, Messaging, etc. This question is the result of inspiration by another question Thank you!!!

Data information