Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

134 Neutral

About comedypedro

  • Rank
  1. comedypedro

    Milkshape 3d

    Write your own, its easy and that way you can use only the parts of the file that you want.
  2. Quote:Original post by Ysaneya Why are you using the alpha buffer to do a lens-flare effect ? Do you realize that the ALPHA internal format in your textures, has nothing to do with the alpha_dst blend mode ? Y. I explained that above, I added that line from memory after I cut and paste the code, I was stressed at the time and got it wrong, the destination factor should be GL_ONE
  3. Yeah I know the drivers doing what it thinks is best I was just joking! Although scarificing quality to get something done quickly could be a definition of laziness..... ;) Do you make an interesting point though I'll experiment with the quality settings in the driver and see what happens
  4. OK its been suggested on opengl.org that I replace glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ....... with glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA8, ..... This forces lazy-ass ATI cards to use 8 bit precision, I have a hunch that this will solve the problem, I'll post again when I check it. Quote:Original post by Fingers_ Hmm ... glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); Are you sure your framebuffer has an alpha component? What value do you clear it to? (And why not just use GL_ONE instead?) Youre probably right, I added those 2 lines from memory after I cut and paste the rest of the code. My brain is pickled from this and from college, sorry!
  5. Thanks very much for all your replys, I was worried that no one would have a clue about what I was on about. Im now looking on this as a learning experience and I guess things like this are why PC developers have such large testing and quality assurance teams!! It also highlights a big advantage of consoles, i.e. if it works on one playstation it'll work on them all!! Right so here are some photos of the problem : Pic 1 Pic 2 And what I think/hope is the relevent code : The texture code : glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, iWidth, iHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, pImageData); Probably not needed but here is the rendering code : float fAlpha = 1 - fLength / 1280; fAlpha -= 0.5; glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA); glDisable(GL_LIGHTING); glDisable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, HaloTex); glColor4f(1.0f, 0.6f, 0.6f, fAlpha); pApp->Draw2dOrthoQuad(vPos.x + vScreenCentre.x, vPos.y + vScreenCentre.y, 50, 50, DRAW_PARAM_CENTRE); glColor4f(0.5f, 1.0f, 0.5f, fAlpha); pApp->Draw2dOrthoQuad(vPos2.x + vScreenCentre.x, vPos2.y + vScreenCentre.y, 70, 70, DRAW_PARAM_CENTRE); glColor4f(0.5f, 0.5f, 1.0f, fAlpha - 0.1f); pApp->Draw2dOrthoQuad(vPos3.x + vScreenCentre.x, vPos3.y + vScreenCentre.y, 150, 150, DRAW_PARAM_CENTRE); glBindTexture(GL_TEXTURE_2D, SpotTex); glColor4f(0.5f, 0.5f, 1.0f, fAlpha); pApp->Draw2dOrthoQuad(vPos4.x + vScreenCentre.x, vPos4.y + vScreenCentre.y, 20, 20, DRAW_PARAM_CENTRE); glColor4f(0.5f, 1.0f, 0.5f, fAlpha - 0.1f); pApp->Draw2dOrthoQuad(vPos5.x + vScreenCentre.x, vPos5.y + vScreenCentre.y, 20, 20, DRAW_PARAM_CENTRE); glColor4f(1.0f, 0.5f, 0.5f, fAlpha); pApp->Draw2dOrthoQuad(vPos6.x + vScreenCentre.x, vPos6.y + vScreenCentre.y, 20, 20, DRAW_PARAM_CENTRE); glBindTexture(GL_TEXTURE_2D, SunTex); fAlpha -= 0.1f; glPushMatrix(); glTranslatef(vLightPos.x, vLightPos.y, 0); glColor4f(1.0f, 0.0f, 0.0f, fAlpha); glRotatef(fLength, 0.0f, 0.0f, 1.0f); pApp->Draw2dOrthoQuad(0, 0, 600 - fLength, 600 - fLength, DRAW_PARAM_CENTRE); glColor4f(0.0f, 1.0f, 0.0f, fAlpha); glRotatef(fLength * 0.5, 0.0f, 0.0f, 1.0f); pApp->Draw2dOrthoQuad(0, 0, 600 - fLength, 600 - fLength, DRAW_PARAM_CENTRE); glColor4f(0.0f, 0.0f, 1.0f, fAlpha); glRotatef(fLength * 0.2, 0.0f, 0.0f, 1.0f); pApp->Draw2dOrthoQuad(0, 0, 600 - fLength, 600 - fLength, DRAW_PARAM_CENTRE); glPopMatrix(); Any help or suggestions very welcome and thanks again
  6. comedypedro

    Menu/HUD sprites

    1. Multiple display lists generally arent a problem 2. Ive used the 'register' approach before but I found that it over complicated things but if you go for it then grouping the static items into 1 list seems an efficient way of doing it. 3 & 4 I use immediate mode these days for HUD / Menus - Its simple to write and maintain and dosent really hurt performance. If its not an in-game menu then theres no performance concerns anyway. I suppose the best thing is to experiment but dont be afraid of a few glBegin/End - the performance hit is insignificant especially on modern hardware.
  7. I think I know what youre talking about and I'll look into the driver settings but its the whole square I can see not just the border. I'm looking into posting a picture (can I upload a pic to GameDev or do I need to find somewhere else to host??) and then I'll post the code too. Cheers
  8. Thanks for your reply. I understand what you mean when you compare it to relying on MS VC to be exactly the same as the C++ standard, but the output from the two cards is very different indeed and I would have thought the opengl standardisations (if thats the right word) would be tighter. I mean if I was running an ancient TNT card or something and went up to a state of the art SLI setup I'd except some differences but the 5200 and the 9800 are same generation boards. Im going to play around with it a bit to get it working and Im also going to keep the current build to try out on other machines/cards. Thanks again for replying and any further comments are very welcome.
  9. Ive got myself a Radeon 9800 Pro to replace my old GeForce 5200, anyway in my main development project (a space combat/exploration game) I draw the sun and lense flares with 2d textured quads and blending enabled which worked fine on the old card but on the ATI I can see the part of the square that should be transparent, i.e. the circle which I want to see and a dim square around it. I'll post code if needed but my main concern is that I thought opengl was more or less standardised across different cards. I realise that they are different manufacturers and drivers etc but Im not using any fancy extensions or anything just basic blending and textured quads and theres a big difference in what each card produces. Please help, I've lost a little faith in open gl!!!
  10. comedypedro

    Funniest compile/link errors

    Quote:Original post by ttdeath My very first funnny error was back on the time of Spectrum Z80 computers. Those where the days.... Remember B - Integer out of range. Technically not a compiler error but an interpreter error but hey
  11. comedypedro

    is Directx better than openGL ?

    Yeah and DirectX has much better sound capabilities than ogl.......... ;-)
  12. comedypedro

    3DS Animation

    Let them try and sue us, right Kyall??!! However I must apologise to Kyall and anyone else reading this post that when I dug out the tutorial from the nether-regions of my HD I found that I dont actually have any source just an exe and the animated soldier model, HOWEVER all is not lost cos I found some other source that does deal with 3DS animation that Im happy to share. I have only had time to scan this source quickly but it seems pretty comprehensive, although I havent compiled or tested it yet. Someone else PM'ed me for this as well maybe if theyre reading this they can let us know if it was any use??
  13. comedypedro

    3DS Animation

    HAHA Stick it to the man!!!
  14. comedypedro

    3DS Animation

    Sure dude, PM me your email. I just realised youre the same guy I said Id give this to a few weeks ago!! Sorry for not getting back to you I was very busy with college.
  • 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!