See what's going on with flipcode!




 

Drawing Pixels With OpenGL
Question submitted by (16 November 1999)




Return to The Archives
 
  I have started working a a 3D engine,using software rendering.I was wondering if someone could help me with a sample code in OpenGL to draw a pixel with a given color on a Zbuffer.Also the T&L is handeld by me. I just want to use OpenGL to plot pixels on a Zbuffer in screen coordinates  
 

 
  If you just want to plot pixels, then there is no reason to use OpenGL. While OpenGL does that a point primitive, you wouldn't want to use it to draw the entire 3D scene. To get hardware acceleration you're going to want to use OpenGL to draw triangles (see www.opengl.org for examples). If for some reason you don't want OpenGL to do the transforms you can check out the rasonly examples at:

http://www.berkelium.com/OpenGL/examples/index.html



Response provided by Tom Hubina
 
 

This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists.


 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.