OpenGL glDrawElementsInstanced

  Рет қаралды 11,807

Jamie King

Jamie King

10 жыл бұрын

Performs instanced rendering by using glDrawElementsInstanced and glVertexAttribDivisor. glDrawArrayInstanced works in a similar fashion using glVertexAttribDivisor to instance geometries and triangles.

Пікірлер: 17
@GermanTutorials
@GermanTutorials 2 жыл бұрын
Thanks, you really helped me alot with my current assigned for my computer graphics lecture. Been searching the web the whole day till i stumbled upon your brilliant video. Keep it up!
@kentarveolsen39
@kentarveolsen39 9 жыл бұрын
the Tooth item.. hehe made me laugh ;) .. thanx anywho for the effort :)
@C5FlyingSquad
@C5FlyingSquad 10 жыл бұрын
Thank you very much sir, I've really been trying to understand this whole instancing thing.
@bardackx2
@bardackx2 9 жыл бұрын
that was simple! thanks!
@srhalnon
@srhalnon 10 жыл бұрын
Thanks for this. I havent looked at your other videos but ive already subscribed Its nice to see some videos covering some slightly more advanced topics. How have i not found you yet!
@JamieKingCS
@JamieKingCS 10 жыл бұрын
Hehe, thanks!
@srhalnon
@srhalnon 10 жыл бұрын
Jamie King Im confused about one thing though, You seem to bind 2 different buffers to GL_ARRAY_BUFFER in your program, is your vertex shader pulling attributes from 2 different buffers or am i missing something?
@mattmunson5914
@mattmunson5914 10 жыл бұрын
Sean Halnon Jamie King I think it pulls from the enabled attribute arrays, not from the buffer currently bound to GL_ARRAY_BUFFER. So yes it pulls from two buffers, even though one of those is no longer bound to GL_ARRAY_BUFFER. Am I right on this?
@vectork3
@vectork3 3 жыл бұрын
@@mattmunson5914 yes!
@peki_ooooooo
@peki_ooooooo 2 жыл бұрын
Cool!!!
@drcvagos-iu
@drcvagos-iu 8 жыл бұрын
this is great
@ncvitak
@ncvitak 10 жыл бұрын
I have a question. I have OpenGL 4.1 however I am aiming to produce applications that use OpenGL 3.2 for compatibility purposes. glDrawElementsInstanced is available at OpenGL 3.1, however glVertexAttribDivisor is only available in OpenGL 3.3. Is there any way I can get the same effect without using glVertexAttribDivisor, but perhaps something to do with gl_InstanceID? Your tutorials are great by the way. They are the most informative on youtube so keep it up :)
@C5FlyingSquad
@C5FlyingSquad 10 жыл бұрын
You can try to encode the necessary matrices into a texture, and read the texture in the vertex shader instead of the fragment shader. You can then somehow use a system to convert texture coordinates to a single value and compare it with the gl_instanceID. This can then fetch the correct matrices from a texture.
@raj.blazers
@raj.blazers 8 жыл бұрын
+C5FlyingSquad Do u have any tutorials on the same? I have huge number of transformation matrix4 to be encoded into textures.
@C5FlyingSquad
@C5FlyingSquad 8 жыл бұрын
+Arul Raj Never seen a tutorial on this. But you can try to be creative here: just create a 2D array with all your matrices, with each pixel representing a matrix element (or you can be more efficient and use sub pixels). You can then create a buffer with that, and use some OpenGL functions to create a texture from that 2D buffer. I hope I answered your question, as it's been 2 years.
@DarkOutsideNow
@DarkOutsideNow 2 жыл бұрын
New reply to an old question, but its great question to provided an updated answer with. from the official source: www.khronos.org/opengl/wiki/Vertex_Specification#Separate_attribute_format
@AssassinGrudge
@AssassinGrudge 8 жыл бұрын
does this will help when creating voxel engine something like Minecraft ?
OpenGL Drawing Instanced Geometry
12:35
Jamie King
Рет қаралды 7 М.
OpenGL Instancing
12:04
Jamie King
Рет қаралды 12 М.
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 18 МЛН
OMG 😨 Era o tênis dela 🤬
00:19
Polar em português
Рет қаралды 10 МЛН
OpenGL glGetAttribLocation glBindAttribLocation Examples
8:53
Computer Graphics Tutorial - PBR (Physically Based Rendering)
13:40
Victor Gordan
Рет қаралды 30 М.
OpenGL Attribute vs Uniform
10:59
Jamie King
Рет қаралды 13 М.
I made a better Ray-Tracing engine
17:38
NamePointer
Рет қаралды 242 М.
OpenGL Camera Class
11:38
Jamie King
Рет қаралды 19 М.
OpenGL Sending Triangles in Parts Using glBufferSubData
18:30
Jamie King
Рет қаралды 12 М.
INSTANCED RENDERING in my Game Engine
24:57
The Cherno
Рет қаралды 72 М.
Vertex Buffer Objects and Vertex Array Objects
8:35
GetIntoGameDev
Рет қаралды 22 М.
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 18 МЛН