Jump to content
  • Advertisement

tonnot

Member
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

100 Neutral

About tonnot

  • Rank
    Member
  1. Thanks Besides drawin pentagons, etc. I'd want to write a fastest way to draw big vectorial worlds . They are composed by a undetermined big number of lines, and for each line I have a color, line type and the points for each line. I have the 3d matrix for all the float points of a world. To draw it, I can : - do a for loop trought all the polyline matrix and call drawelements - do a unique call to ... what ? Any help ? Thanks
  2. The code I have in mind works fine with QUADS. Opengl see at the index matrix looking 4 points and drawelements (GL_CUAD) goes jumping 4,4,4,4 .... To draw pentagons or a fixed number poligon using drawelements i have to write a for () : for (n=0; n<number_of _polygons;n++) glDrawElements(GL_LINE_LOOP,5, GL_UNSIGNED_SHORT, &indices +5*n ); [font="Arial"] (indices moves in fives automatically)[/font] I'm planing to draw an undeterminated number of polygons, opened or closed, every one with a know number of points. So,I'm afraid tha I have I to apply a clicle to a gldrawelements or there is a trick ? Thanks
  3. Hello: I dont know if this can be done easily. I have a 3dfloat matrix where I store 5 points for a pentagon . In example, I have 10 pentagon. I can create an index matriz to store : 1.- The index of every point 2.- or the index of the beggining point of every pentagon. Is there a way to say Opengl to draw the 10 pentagons only with 2 lines of code ? One to specify the index matrix and the other to draw_elements following the indexes. I dont know if it can be done using drawlements, but I dont know how to write the code ? Any help ? Thanks.
  4. I have two ways to draw my wordl, vertex arrays or vertex buffer objects. As I have readen, VBO are the best. But I'm ask myself .... today I can be completely sure that it is supporte by almost all graphic cards ? The fist version of opengl that suport it was 1.5 . OpenGL 2.0 was released on 2004. So, Have I to duplicate my code to support both ways ? (arrays and VBO's ) ?? I have more doubts. I have read : Legacy Note: Versions of OpenGL prior to 3.0 allowed the use of client-side data for vertex rendering, but GL 3.0 deprecated this. Core GL 3.1 and greater forbid client-side vertex data, so VBOs are the only means for rendering. What means ? Thanks
  5. [color="#000000"]I have a very big brain confusion: How affects the : glTranslatef [color="#000000"] glTranslated [color="#000000"] glRotatef depending of the glMatrixMode[color="#000000"] set glMatrixMode[color="#000000"](GL_MODELVIEW[color="#000000"]);[color="#000000"] [color="#000000"]// [color="#000000"]Select [color="#000000"]The [color="#000000"]Modelview [color="#000000"]Matrix glMatrixMode[color="#000000"](GL_PROJECTION[color="#000000"]);[color="#000000"] [color="#000000"]// [color="#000000"]Select [color="#000000"]The [color="#000000"]Modelview[color="#000000"] Matrix I'd want : 1.- Set the position of the camera focus and the ref . What I have to use ? [color="#000000"]gluPerspective[color="#000000"](), [color="#000000"] glFrustum , [color="#000000"] gluLookAt[color="#000000"]() ????? [color="#000000"]2.- Drawing objects 2.1- Using their absolute coordinates 2.2.- Move them before paint. [color="#008000"][color="#000000"] Now, I can view my objects if they are at 0,0,0 . Using the examples and tutorials founded on the web. But, I'm unable to draw nothing when I want to use a world whose limits are -1000,-1000,200 1000,1000,300 (x,y,z min x,y,z max ) and simple 2D square defined by -500,500,250 500,500, 250. By moment I' want to place the camara like an airplane (on XY plane ). Somebody can give me a little lesson ?. Thanks
  6. I'm a little confused with OPENGL version / especification and deprecated commands. Where or how can I know the version / especification of my system / graphic adapter ? What kynd of information about this are depend on the system and depend on the graphic adapter? One time I know my version /especification , where can I know the deprecated commands ? For example I think to have seen that glbegin and end are deprecated in some opengl version? and something like with display lists ? Any help ? Thanks
  7. I'm starting with opengl. Now I'm trying to set the initial perspective to view my little world. (1 Quad and 4 triangles) . My quad defined the 'limits' : left,bottom,right,top values are: -4,-4 4,4 Ok, i'm unable to understand how to set the perspective or the frustum to view -4.1 -4.1 4.1 4.1 (just a little more that the limits of my objects) Can anybody explain me how to do this ? I have seen a lot of graphical explanation but without success. Also, I dont understad the perspective. Fov, aspect, near, far. I suposse the initial pos is 0,0,0 isn't it? So Fov, in any way define the pos of the eye ? Thanks.
  8. My QT openGl have not GL_MAX_ELEMENTS_VERTICES declared. .... Where can I know const values as this ? ( I can't find no document related ) Thanks
  9. Thank you very much. An easy an clear explanation
  10. This is a begginer question. I have seen this 3 kinds of ways to handle data. My app are going to visualize large 3D terrain worlds, in example, 2.000.000 of triangles and a texture compound by (in example) 40 images of high resolution. (10 Mpìxels) But I'm going to have also little models, include alambric worlds with 1000 points or 50 lines with 100 points by line. So, which is the best aproach for do it. - Display lists ? - Vertex buffers ? - Vertex arrays ? Which of those elements are stored at the GPU memory ? How can I know the memory resources of the GPU ? ( size, capacity, etc ) I know that the answer can be 'depends of ...' but I wait you can answer me with some initial tips Thanks
  • 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!