Information

E60032 2 cat code

E60032 2 cat code



We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

E60032 2 cat code:0x5a : 0x00000000 | 0x00000001

In this case, it doesn't change anything.

A:

You are not calling glFramebufferTexture2D at all, even though that is the function you say you called, the return value you show is a GL_FRAMEBUFFER, which is the same return value that glReadPixels and similar functions return.

Your function is missing the call to glFramebufferTexture2D:

GLuint FBO[1],

glGenFramebuffers(1, FBO),

//glGenFramebuffers(1, &,FBO),

glGenFramebuffers(1, &,FBO),

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, FBO[0]),

glBindFramebuffer(GL_READ_FRAMEBUFFER, 0),

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0),

//glBindFramebuffer(GL_READ_FRAMEBUFFER, FBO[0]),

glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0),

//glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0),

And here you are calling glFramebufferTexture2D:

glGenTextures(1, &,tex),

glBindTexture(GL_TEXTURE_2D, tex),

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL),

glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0),

A:

This problem (framebuffer object corruption) was fixed in OpenGL 4.3 and higher by:

https://github.com/KhronosGroup/OpenGL-Registry/issues/1287

I had a similar problem myself with OpenGL 3.2 and a GeForce 5200 which I could resolve with the solution posted.

A:

The problem seems to be that a framebuffer object was removed from the list of framebuffer objects to be bound when you tried to bind another framebuffer.

You'll need to reset the binding index, then bind agn.

The documentation for glBindFramebuffer() says

GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER, and GL_FRAMEBUFFER should always be used with the last argument specifying a context to bind the framebuffer to. If the specified context is NULL, GL_DRAW_FRAMEBUFFER is assumed, and GL_READ_FRAMEBUFFER is assumed if GL_DRAW_FRAMEBUFFER is not specified.

You are creating a framebuffer object, then you bind it with:

// Bind framebuffer 0

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, framebufferId),

then you try to bind framebuffer 2:

// Bind framebuffer 2

glBindFramebuffer(GL_READ_FRAMEBUFFER, framebufferId),

You'll need to update framebufferId to reflect the change, then bind it agn.

If you bind a framebuffer multiple times, the last binding is effectively "sticky", and is used until a binding that is at least GL_INVALID_FRAMEBUFFER_OPERATION occurs.

The framebuffer index is just the offset into the framebuffer object array.

If you want to bind the same framebuffer multiple times, just increment the index.


Watch the video: CAT ET Caterpillar Electronic Technician (August 2022).

Video, Sitemap-Video, Sitemap-Videos