Jump to content
  • Advertisement

Byron

Member
  • Content Count

    177
  • Joined

  • Last visited

Community Reputation

119 Neutral

About Byron

  • Rank
    Member
  1. Found the problem - there is a bug in the latest version of the Bitmap font generator. I went back to an older version and the problem goes away.
  2. I am having a slight problem with my implementation of the Angelcode bitmap font code. I am seeing slight offsets in some of the glyphs. I have an example here: http://www.xiotexstudios.com/xiotex-day-2-on-christmas-windows-textures-and-fonts/ click on the image to get a bigger version. If you look at the window titled 'World map' the 'or' is slightly lower than the 'W' I am more used to coding in DirectX - is this a similar issue to the texel centre problem? The code is here (it's drawn using GL_QUADS): fCharX = m_pGlyphPages->m_Glyphs[iChar].m_fX; fCharY = m_pGlyphPages->m_Glyphs[iChar].m_fY; fWidth = m_pGlyphPages->m_Glyphs[iChar].m_fWidth; fHeight = m_pGlyphPages->m_Glyphs[iChar].m_fHeight; fOffsetX = m_pGlyphPages->m_Glyphs[iChar].m_fXOffset; fOffsetY = m_pGlyphPages->m_Glyphs[iChar].m_fYOffset; float fLeft = fCursorX + fOffsetX; float fTop = fY + fOffsetY; float fRight = fLeft + fWidth; float fBottom = fTop + fHeight; fCursorX += fKerning; // Create the UV's fU0 = ((fCharX) / m_pGlyphPages->m_fWidth); fU1 = ((fCharX + fWidth) / m_pGlyphPages->m_fWidth); fV1 = ((fCharY) / m_pGlyphPages->m_fHeight); fV0 = ((fCharY + fHeight) / m_pGlyphPages->m_fHeight); glTexCoord2f(fU0,fV1); glVertex3f(fLeft,fTop,0.0f); glTexCoord2f(fU1,fV1); glVertex3f(fRight,fTop,0.0f); glTexCoord2f(fU1,fV0); glVertex3f(fRight,fBottom,0.0f); glTexCoord2f(fU0,fV0); glVertex3f(fLeft,fBottom,0.0f); fCursorX += m_pGlyphPages->m_Glyphs[iChar].m_fAdvance; Any ideas?
  3. That's essentially what I was doing but I need it to be a bit more dynamic to give that hologram feel. So what I am doing now is fill the screen with lines and vary the opacity of the lines each frame to give it a shimmer.
  4. I want to create a full screen scanline effect. My scene is mainly made up of wireframe renders and I want to introduce a 'fuzzy' scanline effect over the top of the whole scene to give it a kind of holographic feel (think the holograms in Star Wars). I thought about just a quad with a scanline texture and saturated alpha but it didn't really look good. This has to work on OpenGLES so I can't use shaders. Any ideas?
  5. Byron

    Particle trails

    I thought about doing that but in my mind I have a vision of a longer trail which could be composes of the length of the particles travels but it would look angular.... I wanted something smoother.
  6. I need to produce some particle trails in OpenGL ES - do you have any suggestions on a good technique? I thought about just recording the positions of the particle as it moves and render smaller alpha'ed versions but that would introduce errors as they move faster.
  7. Byron

    red lines

    gah - solved it. I had a rogue texture set in the base code and it was overriding the colour.
  8. Byron

    red lines

    and I have no idea why this posted twice.
  9. Byron

    red lines

    I draw a mesh in black and then I draw lines over the top of it using DrawArrays. Fun thing is that no matter what I set the colour to the lines are always in red. Any idea what I am doing wrong? Code: glDisable(GL_BLEND); glColor3f(0.0f,0.0f,0.0f); glInterleavedArrays( GL_V3F, 0, m_pTris ); glDrawArrays( GL_TRIANGLES, 0, m_vTriMeshPrimitives.size() * 3 ); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glBlendFunc(GL_DST_ALPHA, GL_ONE); glColor3f(1.0f,1.0f,1.0f); glScalef(1.00001f,1.00001f,1.00001f); glInterleavedArrays( GL_V3F, 0, m_pLines ); glDrawArrays( GL_LINES, 0, m_dwNumLines * 2 );
  10. Byron

    red lines

    I draw a mesh in black and then I draw lines over the top of it using DrawArrays. Fun thing is that no matter what I set the colour to the lines are always in red. Any idea what I am doing wrong? Code: glDisable(GL_BLEND); glColor3f(0.0f,0.0f,0.0f); glInterleavedArrays( GL_V3F, 0, m_pTris ); glDrawArrays( GL_TRIANGLES, 0, m_vTriMeshPrimitives.size() * 3 ); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE); glBlendFunc(GL_DST_ALPHA, GL_ONE); glColor3f(1.0f,1.0f,1.0f); glScalef(1.00001f,1.00001f,1.00001f); glInterleavedArrays( GL_V3F, 0, m_pLines ); glDrawArrays( GL_LINES, 0, m_dwNumLines * 2 );
  11. In most of the commercial games I have worked on all the camera's were basically linear paths with easing and damping applied which smoothed them out. A couple of times we used splines generated by max and exported as a skeletal animation and simply read off the resulting bone matrices for the appropriate time index. Both methods work fine and are damn fast. A major problem with using actual splines was not in the speed of the code execution but in actually generating them in the first place and getting that data into the game.
  12. Byron

    Printing text at 2 FPS

    Use the Angelcode bitmap font generator - there used to be an article here that showed how to use it in OpenGL...
  13. Byron

    Free Havok PC version available now

    Quote:Original post by WillC Hi All, Just a quick heads-up in case you missed it. Intel released the free PC version of the Havok Physics engine yesterday. Grab it here... http://tryhavok.intel.com/ Thanks for pointing this out!
  14. Give away as in Microsoft gave those products away for free? Damn - I want to be on that too!
  15. Hey, if writing a script language floats your boat then I say go for it. I wrote a few myself before finally giving in and using Lua - but tbh it doesn't matter which language you use as long as it works for 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!