Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

128 Neutral

About Phong

  • Rank
  1. Phong

    Interpolation on GPU

    Thanks a lot for this valuable piece of information. Also wanted to ask, what if perspective is not along z axis? I mean 4x4 projection matrix allows to do perspective along y or x axis or a combination.
  2. Phong

    Lighting Problem

    Can you publish whole source, please. I suppose problem in here: vec3 dirCamera = cameraPosition - gl_Vertex.xyz; cameraPosition must be in world-space and gl_Vertex.xyz is in model-space. I can't say for sure without whole source, but may be (gl_ModelViewMatrix * gl_Vertex).xyz should be utilized here instead.
  3. This question has no practical reason, but I am very curious about it. How modern GPU interpolates values across polygon, using baricentric coordinates or just scanline bilinear interpolation. And how it performs perspective-correction.
  4. Phong


    HUGE thanks. All works now! Can I publish this version, please?
  5. Phong


    Thanks. I have compiled it, but my code still doesn't work. I suppose it's imposible to use pixel buffers with mingw :-(
  6. Phong

    Fast video output

    Thanks for reply. I can't use power of two, because I get video frame of some arbitrary resolution. I have 140FPS, but with glDrawPixels I have 300. So I just worried about the difference.
  7. Phong


    Can you give me a hint, how to compile libraries using gcc?
  8. Phong

    Fast video output

    Weird, I used glTexSubImage2D instead, but it doesn't increase performance. My code is: void initializeGL() { glClearColor(1.0, 1.0, 0.0, 0.0); glShadeModel(GL_FLAT); glGenTextures(1, &textureID1); glEnable(GL_TEXTURE_RECTANGLE_EXT); glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textureID1); glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, checkImageWidth, checkImageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } void draw_tex() { glBindTexture(GL_TEXTURE_RECTANGLE_EXT, textureID1); glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, checkImageWidth, checkImageHeight, GL_RGBA, GL_UNSIGNED_BYTE, checkImage[idx]); glBegin(GL_QUADS); glTexCoord2i(0, 0); glVertex2i(0, 0); glTexCoord2i(ww, 0); glVertex2i(ww, 0); glTexCoord2i(ww, hh); glVertex2i(ww, hh); glTexCoord2i(0, hh); glVertex2i(0, hh); glEnd(); idx++; if (idx == 128) idx = 0; glFlush(); } paintGL() { glClear(GL_COLOR_BUFFER_BIT); draw_tex(); }
  9. I need to output video data to GPU. I tried glDrawPixels and glTexImage2D. Using textures seems slower. Is there are some more methods to do this? Can I apply pixel shaders, if I use glDrawPixels()?
  10. Desperately looking for libglew32s.a file for Windows, MinGW. Please, help. REIMP doesn't work on glew32s.lib from GLEW binary package :-((
  11. Phong


    I need some simple free models for Dark Ages styled isometric game. Where can I possibly find them?
  12. Phong

    Lighting math question

    And (0.9, 1.5, 0.9) would become (0.6, 1.0, 0.6) or (0.9, 1.0, 0.9)? [Edited by - Phong on January 20, 2008 11:20:57 AM]
  13. How OpenGL clamps color, if it exceeds [0, 1] range? Is it normilizes color, concerning current vertex only, or it concerns color in all vertices?
  14. I found the subject here: http://msdn2.microsoft.com/en-us/library/ms537811.aspx, but it doesn't contain any shaders reference. Where I can find similar picture, which makes a hint, which stages of the procesing pipeline being replaced by vertex and fragment shaders.
  15. Phong

    Hard choice

    Quote:Your decision would very much depend on what audience your articles want to target. Actually the problem is that my articles topic are: 3D math with OpenGL examples :-)
  • 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!