pouët.net

My brain vs opengl documentation right now

category: general [glöplog]
 
language like, "Otherwise, the largest possible red accumulation buffer of at least the minimum size is preferred." doesn't make sense to me right now.

I just want to make sure this is clear.

in glXChooseVisual's attribute param setting GLX_RED_SIZE to 1 is like requesting the maximum red size from the visual, yes?
added on the 2014-03-27 12:05:34 by sigflup sigflup
I think it's requesting the size of 1. In any case, I'd set it to zero. Accumulation buffers don't have hardware support on any modern hardware.
added on the 2014-03-27 12:13:50 by Preacher Preacher
oh, I copy-pasted from the wrong documentation. "Otherwise, the largest available red buffer of at least the minimum size is preferred" is what I meant
added on the 2014-03-27 12:26:45 by sigflup sigflup
after some typing I've found that glXChooseVisual chooses some random crappy visual. I have a 24bit display please, not a 16bit one
added on the 2014-03-27 12:42:38 by sigflup sigflup
My brain vs your post right now - fail...
added on the 2014-03-27 13:31:24 by raer raer
err

GLX documentation != OpenGL Documentation?

Although, it isn't great in itself...
added on the 2014-03-27 13:43:56 by Canopy Canopy
ah, don't worry, OpenGL documentation was never meant for humans.
added on the 2014-03-27 18:31:52 by TLM TLM
Following quote come from "6.1. CREATING AND BINDING BUFFER OBJECTS" in "The OpenGL
R Graphics System:
A Specification
(Version 4.4 (Core Profile) - October 18, 2013)"
Quote:
An INVALID_OPERATION error is generated if buffer is not zero or a name
returned from a previous call to GenBuffers, or if such a name has since been
deleted with DeleteBuffers.


My brain understand this quote as following 3 codes generate GL_INVALID_OPERATION.
#1:
Code:glBindBuffer(GL_ARRAY_BUFFER, 12345);

#2:
Code:GLuint name; glGenBuffers(1, &name); glBindBuffer(GL_ARRAY_BUFFER, name);

#3:
Code:GLuint name; glGenBuffers(1, &name); glDeleteBuffers(1, &name); glBindBuffer(GL_ARRAY_BUFFER, name);

But in my experience, #2 is vaild OpenGL code.
added on the 2014-03-28 01:07:59 by tomohiro tomohiro
tomohio: I believe that's only valid in legacy GL.
added on the 2014-03-28 01:54:22 by kusma kusma
tomohiro: in #2 you are assigning a name returned from a previous call to glGenBuffers, hence, from documentation: "An INVALID_OPERATION error is generated if buffer is not zero or a name
returned from a previous call to GenBuffers
,"

So #2 is correct and the documentation says it's correct :-)
added on the 2014-03-28 06:36:48 by Jcl Jcl
#1 and #3 are valid in OpenGL ES 2.0/3.0/3.1 but not in OpenGL. These use cases rely on "generate-upon-binding" mechanism which is considered deprecated and which you should not - in general - be using if you're coding for ES. As was said, they will generate an error if you try following them.
added on the 2014-03-28 08:53:55 by kbi kbi
i believe english 2.0 will add mandatory parentheses
added on the 2014-03-28 08:54:11 by 216 216
Jcl: Thank you!
Now I can understand OpenGL Specification correctly.
"An INVALID_OPERATION error is generated if buffer is not (zero or a name returned from a previous call to GenBuffers), or if such a name has since been deleted with eleteBuffers."

kbi: I only use OpenGL and I didn't know #1 and #3 are valid in OpenGL ES.

216: Indeed. Parentheses help understanding english.
added on the 2014-03-28 18:05:45 by tomohiro tomohiro
What!? OpenGL has documentation!? :)
added on the 2014-03-28 18:54:34 by Scali Scali
(My brain vs opengl) documentation :)
added on the 2014-03-29 00:36:45 by tomohiro tomohiro
I've just tested vbos in GL. let's say that in most of configuration using a gl buffer to sotre 3d objects infos do not speed up the rendering, specially on mobile platforms like android or iPhone !
added on the 2014-03-29 06:20:07 by Bartoshe Bartoshe
Bartoshe: go home, you're drunk.
added on the 2014-03-29 08:34:41 by kbi kbi
In fact: if I were you, I'd then go further and check if glBegin()/glVertex*()/glEnd() are faster than VAA & element-driven draw calls. Hell, maybe they're even faster than indirect calls, now that would make a good headline!

(sic)
added on the 2014-03-29 08:36:16 by kbi kbi

login