Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

174 Neutral

About LordOrion

  • Rank
  1. Quote:Original post by swiftcoder What is wrong with glOrtho(0, pixels_wide, 0, pixels_high, -1, 1)? If you want to figure out how to manually create that matrix, take a look at the man page for glOrtho. Nothing: I'm just a bit rusty... Well, maybe MUCH more than a bit. Thanks!
  2. Hi, anyone know how to setup the projection matrix (using orthogonal projection) in order to have that an increment of 1.0f in OpenGL coordinates on the scene will correspond to an increment of 1 pixel on the screen? Thanks!
  3. LordOrion

    What IDE are YOU using?

    Work: Visual Studio 2005 + Visual AssistX on Windows XP. Home: Visual Studio 6/2005 + Visual AssistX on Windows XP.
  4. I owe you a beer! Thank you very much!
  5. Hi to everyone. I'm working to optimize an OpenGL-based 3D seafloor viewer application I've wrote times ago. I need to do that due is it possible that the mesh I have to display could be made up of more than 3 millions of vertexes so it took a lot of time to render. I'm already using vertex buffer objects and I've implemented a frustum culling system to remove the parts that are not visible (the mesh is made up of 1 or more tiles depending on the size). However, when the camera is far away I need to render the whole mesh in high detail and this is a mess... when you are far away you cannot distinguish them... So I'm wandering if someone knows a smart way to reduce the level of detain (i.e. the number of vertexes to process) basing on the distance of the mesh from the camera... Is there any OpenGL extension suitable to be used (better if it is commonly supported ona all GPUs) or maybe someone knows where to find an article/book that explains how to do that (or at least give some guidelines) Thank you very much!
  6. Hi, I've solved the problem by myself. Thank you anyway. Feel free to contact me if you wish to know the solution.
  7. LordOrion

    Direct access screen data.

    Hi, can you please explain what do you exactly want to do? Do you mean you wish to directly access the front buffer?
  8. LordOrion

    Info about coordinate system

    I answer your question with another question: why are you manually "projecting" the point to get it's final 2D coordinates? If you wish to draw text on that position there is a simpler method.
  9. Hi, I've meet a strange problem while working on a Win32 MFC application that uses OpenGL ES (PowerVR PC emulation libs) to render a 2D textured polygon on the screen. Initially my application was not using multithread and rendering was done in response to the WM_PAINT message; in such condition all works fine. I've then added one thread to render without freezing the interface. Basically the new architecture is the following: At the first WM_PAINT message received, the app setup OpenGL ES interface (the EGL) in order to be able to render into a Bitmap control. Surface, Windows, Context and all other EGL stuffs created during the setup are stored into global variables. Once the EGL is ready, the rendering thread is started using CreateThread() API. Doing as above, I'm not able to render. Thus I've slightly modified my code: The app starts the rendering thread into the OnInitDialog() method and let the thread to initialize the EGL the first time. Again EGL stuffs are stored in global variables In such conditions I can see something rendered on the screen but gltexImage2D() fails to load my textures. Any clue about what is going wrong here? Cannot post the code now (I must clean it a lot) but I will do it if it is necessary. [Edited by - LordOrion on June 5, 2008 10:35:31 AM]
  10. LordOrion

    too much rotation/translation?

    glTranslate() and glRotate() functions are implemented by setting up a translation /rotation matrix which is then multiplied by the current model-view matrix. thanks to SIMD instructions and GPU's performing matrices computations in hardware I think that the individual cost of each glTranslate() / glRotate() is small and doing a lot of them should not impact on your application (except if you do millions of them)... I hope this can help
  11. LordOrion

    newb openGL 3d help

    Hi, Model-View and Projection matrices are used for different purposes: Model-View is used to control the spatial position and orientation of your objects into the 3D scene (Model) but it can also be "interpreted" as the position of the observer camera (View). Projection matrix is used to transform your 3D scene into a 2D image achieving the effect of 3D with the usage of perspective projection. If you what to correctly render a 3D scene you have to setup properly both them and the code snippet in your post doe exactly this... see my comments below // Set Modelview matrix as current working matrix: glMatrixMode( GL_MODELVIEW ); // Setup the observer camera position (Pos, Direction and Up): gluLookAt(x0, y0, z0, xref, yref, zref, vX, vY, vZ ); // Set Projection matrix as current working matrix: glMatrixMode( GL_PROJECTION ); // Setup view frustum volume: glFrustum( xwMin, ywMin, xwMax, ywMax, dNear, dFar ); // Restore Modelview matrix as current working one: glMatrixMode( GL_MODELVIEW ); // Missing? You can switch between ModelView matrix and Projection matrix using glMatrixMode() function but generally you should keep ModelView matrix as current working one ans switch to Projection only if you need to change perspective settings. Notice that glRotatex(), glTranslatex() and glScalex() functions works on the current active matrix. Understand and master these concepts is crucial if you wish to work with 3D so I suggest you to read a good book on general 3D graphics. This is a good one I can suggest you. I hope this can help.
  12. LordOrion

    Texture map representation

    I was thinking to the same suggestion of V-man: using cube maps. However, if you cannot use them the only thing I can say you is that you must split your model in parts 9one for each texture image you have to use) and render them separately using a different image as texture for each one. Unfortunately I have no suggestions to give you about how to do that. [sad]
  13. LordOrion

    Texture map representation

    Another question: Do you have to use one single texture for the whole model (chosen between the ones you have) or you have to use all the textures?
  14. LordOrion

    Texture map representation

    [wow] So, If I have correctly understand, you must load and render a model form an external file. This model could have any shape (cube, sphere, teapot, beethoven head, tie-fighter) and can be modeled using any primitive (triangles, quads etc). Once you have loaded it you take some screen-shots of the model rendered in different conditions. Then you should use such screen-shots as textures for the model. I'm right?
  15. LordOrion

    Texture map representation

    Hi, Err.. your explanation is not clear, can you please explain again in details what you must do?
  • 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!