Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Maus

Member Since 11 Apr 2012
Offline Last Active Dec 14 2014 06:24 AM

Posts I've Made

In Topic: Help on glMapBuffer*** Calls

28 October 2014 - 03:18 AM

Xycaleth already mentioned you are using the flags wrong, check out his links.

To increase readability you can also static-cast the returned pointer only once, and access him like a float-array.

 

For advanced information about buffer transfers I can recommend this GL 4.2 article:
http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-AsynchronousBufferTransfers.pdf


In Topic: Error when using blitFramebuffer

02 October 2014 - 10:27 AM

According to the OpenGL 4.5 spec on chapter 18.3 Copying Pixels:

 

... For all such commands, if the source and destination are identical or are different views of the same underlying texture image, and if the source and destination regions overlap in that framebuffer, renderbuffer, or texture image, pixel values resulting from the copy operation are undefined.

 

So copying between the same FBO should work, as long as the regions do not overlap (which should not be the case between attachment 0 and 1 (each with own texture)).

There is also the function glCopyImageSubData, but again without general-purpose conversions.


In Topic: Handling VAOs in GL 4.5 with DSA

09 September 2014 - 12:14 PM

From http://www.opengl.org/wiki/Vertex_Specification, which makes sense:

 

Separate attribute format (ARB_vertex_attrib_binding)
...
Notice that the stride is uncoupled from the vertex format itself here. Also, stride​ can no longer be 0. This is because OpenGL doesn't know the format of the data yet, so it can't automatically compute it.

In Topic: Handling VAOs in GL 4.5 with DSA

08 September 2014 - 02:23 AM

You are missing

glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex)

to bind an attribute (index) to a vertex buffer binding (index).
 
Also check all function definitions again so you don't mix them up (e.g. second parameter of glVertexArrayVertexBuffer is also the VBO binding index, not the attribute index).

void glVertexArrayAttribBinding  (GLuint vaobj, GLuint attribindex, GLuint bindingindex);

void glVertexArrayVertexBuffer   (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
void glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor);

void glEnableVertexArrayAttrib   (GLuint vaobj, GLuint attribindex);
void glDisableVertexArrayAttrib  (GLuint vaobj, GLuint attribindex);
void glVertexArrayAttribFormat   (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
void glVertexArrayAttribIFormat  (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
void glVertexArrayAttribLFormat  (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
...

Edit: The last sentence of Issue 31 makes no sense (also it's unresolved), how else should the attribute "know" which VBO it refers to.


In Topic: Error when using blitFramebuffer

06 September 2014 - 04:19 AM

How does this even work?

You have one single FBO, you bind it to both targets, then you attach the source texture to GL_COLOR_ATTACHMENT0 of that FBO and then you overwrite it with the destination texture (same FBO) - so you are basically blitting from the destination texture to the destination texture which has undefined behavior.

There is no separate READ and DRAW attachment inside the (single) FBO container.

PARTNERS