Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

202 Neutral

About Gorax

  • Rank
    Advanced Member
  1. A 1500x1500 RGB image will only take up about 6.5MB of memory, even when it's uncompressed, and mipmaps wouldn't add enough to that to get anywhere near the 800MB you mention. Check to make sure you're not reloading the textures (or the terrain segments) every frame.
  2. The only thing I can think of is the fact that you're using glutSolidCube(). Do you know if it sets the third texture coordinate?
  3. Gorax

    Opengles on Android Question

    If you just want the page to flip over, stiff and unnaturally, you can just change two of the vertices at some specific rate so the quad flips from one side to the other. If you take this path, you'll need to ensure you flip the page based upon some rate of time, and not a number of frames, because the performance of Android devices varies. If you want it the page to have a slight curve in it, you'll need more vertices, and you'll probably be better off creating an animated model for it rather than trying to hard code it.
  4. Gorax

    Open GL Tutorials Website

    This really should be in the Your Announcements forum. Just out of curiosity though, do you plan on changing the Open GL tutorials to reflect somewhat more modern approaches to rendering things? Sure it's nice to start off easy, but I'm not entirely sure it's the best way to go about things these days...
  5. Gorax

    Fast memcpy for openGL VBO

    Quote:Original post by Juanxo perhaps with glBufferSubData or glBufferData? I'm going to have to agree with this approach. I've never been able to get the (un)map functions to work quite right (probably my fault more than anything), but the buffer functions work well. Textures get updated the exact same way, so I'm not entirely sure why they have the (un)map functions. Seems like overkill to me.
  6. Gorax

    OpenGL Math Libraries

    If you want to write your own, but don't want to go through the effort of learning how everything works, the Open GL Reference Pages actually show you how all of the matrix functions work.
  7. Depending on how the data is transmitted, you can use CreateFile() to open the device, and then read and write to it like a normal file. You'll need to ensure you read and write specific data lengths as specified in the device's capabilities, which can be found using the HidP_GetCaps() function (the input, output and feature report lengths), otherwise the read and write functions will fail. I've used those functions to play around with my Wiimotes which operate over Bluetooth, and it seems to work quite well.
  8. They seem to work fine in Google Chrome. I can't say the same for IE (I'm using XP too). I'm not entirely sure why the canvas element's being used at all, especially given the fact that you have been able to do stuff like this for years now using Java. Seems a little redundant to me...
  9. Gorax

    Rotation in OpenGL

    I doubt that loading the identity matrix is what you want. Since you're using the built-in matrices, you can just use glPushMatrix() and glPopMatrix() before applying translations and rotations to objects. If you plan on moving to newer versions of Open GL, you'll need to deal with the matrices yourself, but it's important to get the concepts worked out first, otherwise you'll find it's like jumping into the deep end.
  10. Gorax

    OpenGL Depth

    You can enable depth testing, and use a depth value (assuming you're working with the standard horizontal X axis, and vertical Y axis, Z would be the depth). Alternatively, you can set the depth writing to less than or equal, and sort all of the sprites before you render them. It requires a little more work, but if you plan on using Open GL for more complex rendering jobs, this type of knowledge will help further down the line.
  11. Gorax


    OpenCV gives you rectangles that tell you where the faces are. The videos show multiple points of detection (the eyes, nose and mouth), which are used to calculate the direction of the head. What does the Lucas Kanade method give you as a result? Without knowing that, I cannot tell you how you should be rendering the cylinder.
  12. Gorax

    Volume texture compression

    Google works great for stuff like this: Quote: Compressed texture images can be obtained from the GL in uncompressed form by calling GetTexImage and in compressed form by calling GetCompressedTexImageARB. Queried compressed images can be saved and later reused by calling CompressedTexImage[123]DARB. Pre-compressed texture images do not need to be processed by the GL and should significantly improve texture loading performance relative to uncompressed images. The only thing I can't guarantee is if the compression formats will be supported. I do know that other vendors usually allow for things like this, but I'm not sure if it should always be relied upon... You could always have a copy of both the compressed and uncompressed images, and load the compressed images if the given setup allows for it, and fall back to the uncompressed ones if it doesn't.
  13. Gorax


    If you've already got code that works, you only need to copy and paste it in the appropriate order, and in this case, it's almost exactly like I just said. Here's the basics of how it should work, but you will need to copy and paste the necessary code, or write your own to fill the necessary parts in: //you will need to set the video frame up yourself, //it's here as a reference only void* videoFrame; bool run = true; bool lucasKanadeEnabled = false; int faceDetectionRectangle[2][2]; while (run){ //--> INSERT CODE TO CAPTURE VIDEO FRAME HERE <-- //If you can detect the faces if (!lucasKanadeEnabled){ //FUNCTION USED TO DETECT FACES USING OPENCV HERE: if (detectFacesUsingOpenCV(videoFrame,faceDetectionRectangle)){ lucasKanadeEnabled = true; } } bool renderedCylinder = false; //If a face has been detected by OpenCV either now, or previously if (lucasKanadeEnabled){ //FUNCTION USED TO DETECT THE FACES AS NECESSARY USING THE //LUCAS KANADE METHOD - ALSO USED TO RENDER THE CYLINDER AS NEEDED if (detectFacesUsingLucasKanade(videoFrame,faceDetectionRectangle)){ renderedCylinder = true; }else{ lucasKanadeEnabled = false; } } if (!renderedCylinder){ renderImageWithoutCylinder(videoFrame); } }
  14. Most people use their own source management, keeping music playing all the time, and dropping sounds only when the number of sounds playing is greater than or equal to the current number of sources. You could do something similar, and add a priority to the sounds and cut some off as necessary.
  15. Gorax


    Assuming I understand that correctly, you have this: Program #1: - Detects faces using Open CV. - Face tracking is done on a single image. - Renders the cylinder over the face correctly. Program #2: - Detects faces using Lucas-Kanade's optical flow method, but only in a region selected by the user. - Face tracking is done on a video stream. - Doesn't have the cylinder rendered. If so, you need to do this: - Capture a video frame. - Use OpenCV to find the face. - Use the rectangle from the detected face as the rectangle used for your Lucas-Kanade method. - Render the cylinder as needed. - Keep using the Lucas-Kanade method until it fails to find the face. - Use OpenCV to find the face again. Is that what you are trying to do?
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!