PDA

View Full Version : glDrawPixels ??



Andreaz
15-11-2002, 01:08 PM
Anyone knows how to print an bitmap with glDrawPixels, have the pixeldata in an pointer, saved as RGB and the size width*height*3.

Please give me an example

savage
17-11-2002, 01:02 AM
Hi Andreas,
Coiuld you please explain exactly what you are trying to achieve with glDrawPixels?

Andreaz
17-11-2002, 10:43 AM
What i had in mind was drawing a 2d bitmap to the rendering context, without having to bindtexture etc.


/Andreas

Darhazer
08-02-2003, 12:45 AM
glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, *array)

The last one is the pointer to array, previous - the data type in the array
The position is defined by the glRasterPos() function

epiece
08-03-2010, 05:14 AM
:'( its so hard for me to learn OpenGL headers ... Its not so easy as DelphiX :no:

User137
08-03-2010, 10:33 AM
glDrawPixels should be much much slower in drawing than normal texture.

Andreaz
08-03-2010, 04:49 PM
Wow, digging up 9 year old threads are we? However, you cant compare OpenGL to DelphiX its like comparing apples to oranges. OpenGL and D3D (wich DelphiX uses internally) is quite similar in practice.

OpenGL (atleast before version 3.1 with intermediate mode) is generally considered more beginner friendly through.

epiece
09-03-2010, 03:47 AM
OpenGL is not OOP Structured unlike DelpHiX :no: but this is exciting :yes: