Jump to content
  • Advertisement

Archived

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

asafbd

Does glReadPixels/glDrawPixels work with VB 6.0

This topic is 5922 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

General: Hi, I have a problem with the pixel procedures in visual basic. I’m trying to read the pixels using: glReadPixels 0, 0, w1, h1, rpDepthComponent, pxlFloat, Zbuf(0) And then clear the depth and color buffer using the following: clrColorBufferBit Or clrDepthBufferBit And in order to draw only the Z-Buffer pixels I’m using: glDrawPixels w1, h1, pfLuminance, pxlFloat, Zbuf(0) Problem: The problem is that when I’m clearing the buffer and drawing the pixels it looks like The procedure isn’t working and the scene looks empty. More info: 1.This code works properly when invoking it in visual C++ and in VB it fail to work. 2. Do you know about a problem with glReadPixels/glDrawPixels in VB? 3. Did somebody use it in the past with visual Basic 6.0? Plain code: glPushMatrix ''save curent MODELVIEW matrix glReadPixels 0, 0, w1, h1, rpDepthComponent, pxlFloat, Zbuf(0) glClear clrDepthBufferBit Or clrDepthBufferBit glMatrixMode mmProjection glPushMatrix ''save current PROJECTION matrix glLoadIdentity glDrawPixels w1, h1, pfLuminance, pxlFloat, Zbuf(0) glFinish SwapBuffers PictOGL.hDC glPopMatrix ''Restore PROJECTION matrix glMatrixMode mmModelView glPopMatrix ''restore MODELVIEW matrix

Share this post


Link to post
Share on other sites
Advertisement

  • 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!