gldrawpixels

opengl rotation using gldrawpixels

☆樱花仙子☆ 提交于 2019-12-22 09:12:27
问题 My team is currently limited to drawing images on an opengl 1.4 platform, which means that we can't use any nifty texture mapping to draw an image (yes, we're confined to using the intel integrated graphics platform, it's very annoying). So far, we're able to draw, scale, and flip an image, but the guy doing the graphics claims that rotation via glRotate can't be done while using glDrawPixels, that we'd have to go to textures and so forth, which don't work on the Intel platform. I've bet him

Writing texture data onto depth buffer

☆樱花仙子☆ 提交于 2019-12-18 03:41:56
问题 I'm trying to implement the technique described at : Compositing Images with Depth. The idea is to use an existing texture (loaded from an image) as a depth mask, to basically fake 3D. The problem I face is that glDrawPixels is not available in OpenglES. Is there a way to accomplish the same thing on the iPhone? 回答1: The depth buffer is more obscured than you think in OpenGL ES; not only is glDrawPixels absent but gl_FragDepth has been removed from GLSL. So you can't write a custom fragment

How to scale glDrawPixels?

半腔热情 提交于 2019-12-07 05:25:34
问题 I need to scale the result of glDrawPixels image. I'm drawing a 640x480 pixels image buffer with glDrawPixels in a Qt QGLWidget. I tryed to do the following in PaintGL: glScalef(windowWidth/640, windowHeight/480, 0); glDrawPixels(640,480,GL_RGB,GL_UNSIGNED_BYTE,frame); But it doesn't work. I am setting the OpenGL viewport and glOrtho with the size of the widget as: void WdtRGB::paintGL() { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Setup the OpenGL viewpoint glMatrixMode(GL

opengl rotation using gldrawpixels

▼魔方 西西 提交于 2019-12-05 12:14:44
My team is currently limited to drawing images on an opengl 1.4 platform, which means that we can't use any nifty texture mapping to draw an image (yes, we're confined to using the intel integrated graphics platform, it's very annoying). So far, we're able to draw, scale, and flip an image, but the guy doing the graphics claims that rotation via glRotate can't be done while using glDrawPixels, that we'd have to go to textures and so forth, which don't work on the Intel platform. I've bet him lunch that there is a rotation function, like glRotate, that will work for straight bitmaps. Does such

How to scale glDrawPixels?

青春壹個敷衍的年華 提交于 2019-12-05 10:28:09
I need to scale the result of glDrawPixels image. I'm drawing a 640x480 pixels image buffer with glDrawPixels in a Qt QGLWidget. I tryed to do the following in PaintGL: glScalef(windowWidth/640, windowHeight/480, 0); glDrawPixels(640,480,GL_RGB,GL_UNSIGNED_BYTE,frame); But it doesn't work. I am setting the OpenGL viewport and glOrtho with the size of the widget as: void WdtRGB::paintGL() { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Setup the OpenGL viewpoint glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, windowWidth, windowHeight, 0, -1.0, 1.0); glDepthMask(0); /

Writing texture data onto depth buffer

筅森魡賤 提交于 2019-11-29 02:26:41
I'm trying to implement the technique described at : Compositing Images with Depth . The idea is to use an existing texture (loaded from an image) as a depth mask, to basically fake 3D. The problem I face is that glDrawPixels is not available in OpenglES. Is there a way to accomplish the same thing on the iPhone? The depth buffer is more obscured than you think in OpenGL ES; not only is glDrawPixels absent but gl_FragDepth has been removed from GLSL. So you can't write a custom fragment shader to spool values to the depth buffer as you might push colours. The most obvious solution is to pack