Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Standart alpha blending

This topic is 5785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Help, I can''t turn on alpha blending. Effect of calling glColor4f(1, 1, 1, 0.3f) is the same glColor3f(1, 1, 1). Texture alpha channel doesn''t work. My initialization code: hDC = GetDC(hWnd); int pixelformat; PIXELFORMATDESCRIPTOR pfd = {0}; pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = nDepth; pfd.cDepthBits = 16; pfd.iLayerType = PFD_MAIN_PLANE; if (!(pixelformat = ChoosePixelFormat(hDC, &pfd))) return NERR_CREATEDEVICE; if(!SetPixelFormat(hDC, pixelformat, &pfd)) return NERR_CREATEDEVICE; hRC = wglCreateContext(hDC); if (!wglMakeCurrent(hDC, hRC)) return NERR_CREATEDEVICE; glEnable(GL_DEPTH_TEST); glFrontFace(GL_CCW); glCullFace(GL_BACK); glEnable(GL_CULL_FACE); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); When my system was WinMe / Riva128 - all worked properly But now - WinXP / GeForce2 - alpha test doesn''t work. What''s wrong???

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!