Jump to content
  • Advertisement

rvx

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

122 Neutral

About rvx

  • Rank
    Member
  1. rvx

    About glCallList...

    Quote:Original post by spek Hi, A few questions about the glCallList command. I know it can boost the performance but... how exactly? VBO's put the vertex data on the videocard for faster access, but how does a display list help? Then I have a question about using it in combination with optional data. I have a mesh that is made of vertices, texcoords, normals and all other default stuff. So I could make a display list. But I also have a couple of array's that are not always used (tangents, weights, ...). glClientActiveTextureARB( x ); glTexCoordPointer( 3, GL_FLOAT, SizeOf(TVector3f), someArrayOfData ); ... glDrawArrays(GL_TRIANGLES, 0, vertexData.count ); I could do 3 things: a- Make multiple display lists; for each possible combination a list b- Just use all array's in a single list, even if they are not used for all situations c- If possible... First activate optional array's (if used), then call the list. I'm not sure if the list will use the array's that were activated externally though... b Is the lazy approach. But maybe the overhead won't be that much anyway. Greetings, Rick I think VBO is faster than display list, when it said display list was faster i think it was compared to immediate mode : glBegin().. glVertex3f()..glEnd(), moreover displaylist are deprecated since openGL 3.0, so its recommended to use buffer object.
  2. rvx

    PBO FBO TBO?

    Quote:Original post by V-man Quote:Original post by rvx Quote:Original post by V-man I think you don't need any of them. You can just render to the backbuffer. This says it can do GL rendering http://en.wikipedia.org/wiki/Cairo_(graphics) if I render to backbuffer i won't have flexibility for compositing floating/cascading window or widget, transparency, animation etc (like Compiz). and every pixel on the screen should be redraw each frame, unlike using quad texture for each surface of Cairo i can only draw which surface has changed. I don't know what you mean by compositing floating/cascading window but I have done a GUI system that draws windows and other controls and it renders to the backbuffer. I just need to do a code review some day. Perhaps you should use FBO if you don't intend to update some of those windows. This is called RTT = render to texture http://www.opengl.org/wiki/OpenGL_extensions#Framebuffer_related_extensions yes, indeed i was about going to use FBO for RTT, my question is whether i should use PBO or TBO to send texture data that was generated by Cairo to shader, so the shader could render those textures to a quad (which is a window) using FBO, then I send the FBO result to backbuffer and swap it to frontbuffer. using cairo to render to backbuffer is like redrawing the rendering result to make overlay on the screen, but it was done per-frame (or screen) size which make rendering slower because i need to redraw every GUI pixel on screen to backbuffer each frame. moreover i was going to "compose" each widget or GUI element (text, button, icon,..) as a quad and has its own texture generated by cairo only when the texture is changed.
  3. rvx

    PBO FBO TBO?

    Quote:Original post by V-man I think you don't need any of them. You can just render to the backbuffer. This says it can do GL rendering http://en.wikipedia.org/wiki/Cairo_(graphics) if I render to backbuffer i won't have flexibility for compositing floating/cascading window or widget, transparency, animation etc (like Compiz). and every pixel on the screen should be redraw each frame, unlike using quad texture for each surface of Cairo i can only draw which surface has changed.
  4. rvx

    PBO FBO TBO?

    if I want to build a GUI system, which is using Cairo to render it, which one is best using PBO or TBO since i don't need GL pixel manipulation, no mipmaping and no texture filtering just RGBA buffer. performance-wise?
  5. rvx

    PBO FBO TBO?

    Quote:Original post by HuntsMan Yes. TBO's can only be read by shaders, but PBOs can be used by other GL functions. we still could use MapBuffer function to read and write to TBO isn't it?
  6. rvx

    PBO FBO TBO?

    Quote:Original post by HuntsMan PBOs are used for async data upload. You can store pixel data in a buffer (which is mostly stored in video memory) and later use it for commands that read/write pixel data, such as glReadPixels, glTexImage1D/2D/3D, etc. so it is used for writing pixel data to a texture, and later on the texture could be used by shader. Quote:FBOs are used for offscreen rendering and multiple render targets. You can draw to a texture or an renderbuffer. You can later read that texture in a shader to do things like postprocessing. so it is mostly used for rendering to texture, ok i got it. Quote:TBOs just allow to read a buffer object as a texture in a shader. The backing store of the texture is the buffer object data, so it's pretty generic on what it can be done with it. in this case the difference between TBO and PBO is, TBO make it possible that any data could be treated as a texture on shader (such as vertex position, vertex normal, indices, vertex attribs anything that stored on a buffer object), and PBO is a more specific buffer that only hold pixel data. because its a specific buffer for pixel data, then one of its important feature is we could use opengl pixel manipulation function on it. am I right?
  7. can someone explain to me what is the difference between Pixel Buffer Object : http://www.opengl.org/registry/specs/ARB/pixel_buffer_object.txt Frame Buffer Object : http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt Texture Buffer Object : http://www.opengl.org/registry/specs/EXT/texture_buffer_object.txt where's the best situation (and case example) to use each buffer?
  8. rvx

    question on kd-tree

    Quote:Presumably you begin the process with an AABB that encompasses all the geometry of interest. Splitting an AABB along a cardinal hyperplane yields two AABBs; therefore, each time you split a node, you should end up with two AABBs. As such, you should know the full bounds (AABB) for any node or leaf in the tree. Does that make sense? ok, so i just need to store AABB information of node space on each node on kd-tree. thanks, that made sense. Quote:No, don't use the 8 corners of the AABB. Instead, treat the AABB as a solid, and determine which leaves of the tree the AABB overlaps (it may overlap more than one). should AABB only reside on exactly one leaf (using some decision) or i should put the pointer to more than one node if it intersect with more than one nodes? Quote:I don't know that this question has a single 'right answer', per se - it depends on a number of factors, such as the data structures being used, the ratio of static objects to dynamic objects, and the total number of objects in the simulation. how does another spatial partitioning do with it? lets say octree/quadtree?
  9. i just learned about kd-tree (and i've read a lot), i am trying to implement it on frustum culling for my games, but something make me confuse: 1.during the construction of kd-tree, each iteration is splitting the space using plane on some axis, then for next iteration (on its child) on next axis, and so on, how do i know the box (AABB) of the space (each tree node) if each node is only have information where its space is splitted on one axis? 2.most kd-tree implementation and example are for points in 3D space, how to implement on AABB of entities? should i treat those entities as 8 points per AABB? 3.how to handle moving object, do i really need to reconstruct the kd-tree each frame?, reconstruct the node where the object has leave each frame?, and do i need to update (and check) the tree when entity is moving, or every rendering step (each frame)? thanks
  10. hi, I need to rotate texture coordinate, using angle from camera yaw (orientation), which matrix should I use? WorldViewMatrix?, currently I coded the HLSL like this: float4x4 matViewProjection; float4x4 matCamRot; struct VS_INPUT { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; }; struct VS_OUTPUT { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; }; VS_OUTPUT vs_main(VS_INPUT input) { VS_OUTPUT output; output.Position = mul(matViewProjection,input.Position); float yaw = atan2(-matCamRot[1][0], matCamRot[0][0]); output.TexCoord.x = input.TexCoord.x*cos(yaw) - input.TexCoord.y*sin(yaw); output.TexCoord.y = input.TexCoord.x*sin(yaw) + input.TexCoord.y*cos(yaw); return output; } did I use correct equation to get Yaw value from matrix? on line : float yaw = atan2(-matCamRot[1][0], matCamRot[0][0]); how about the rotation equation? thank you.
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!