Jump to content

  • Log In with Google      Sign In   
  • Create Account


mhagain

Member Since 06 Jun 2010
Offline Last Active Today, 04:11 PM
****-

Posts I've Made

In Topic: Hard Copy or Soft Copy?

Yesterday, 06:33 PM

I like both.

 

There's one massive problem with hard-copy-only: paper burns.  I work in an office where one group of people have paper-only files going back donkey's yearsIf there is a fire they are screwed.  All those records are gone.  If they had an electronic version of them, and and assuming it was reasonably designed, it would be searchable, it would be backed-up, it could be brought back on a DR site.  As things stand they get none of that.

 

Despite that a paper copy is sometimes convenient (it's at least easier for me to read: the first thing I do when I get an important email that I need to pay attention to is print it).  But the electronic copy is important.


In Topic: Number of Lights

Yesterday, 05:16 PM

It also depends on how many of those lights you want to have casting shadows.


In Topic: glDrawElements without indices?

Yesterday, 04:28 AM

Texture streaming is just one counter example what you were saying. 

 

Maybe you could have said that originally?

 

In any event, you don't implement texture streaming by continually creating and destroying resources at runtime, and you don't implement it by swapping out entire resources from GPU memory to CPU memory at runtime either.  You implement it by creating a fixed number of resources (that will fit in your target platform's available memory) and you update those resources as required (in OpenGL it would be via glTexSubimage calls).  The resources to update are based on requirements of the scene, rather than of video RAM, since the video RAM allocation can be one-time-only and fixed.  Yes, it's a technique to reduce video RAM requirements, but it's not the same technique that the OP is asking about and not the same technique that myself and others are saying "don't do it" to.

 

In the context of the OP texture streaming is a strawman.  The OP is not asking about texture streaming, the OP is asking about creating and destroying resources on the fly and at runtime.


In Topic: Drawing in one draw call vertex buffer with different programs

Yesterday, 03:17 AM

Currently what I do is creating two different VAOs with vertex attribute pointers pointing to related parts of the vertex array.

 

Just to address this part, you don't need this kind of set up at all.  You can do it with a single VAO and a single set of attrib pointers, but still with two draw calls, so it takes away some of the overhead.

 

So, say you're using glDrawArrays: look at the documentation for that and you'll see that it has a first parameter.  Let's assume that you have 200 vertices, and you want the first 100 drawn with ShaderProgramA, the second 100 with ShaderProgramB.  Your code is:

 

glBindVertexArray (LetsUseASingleVAOHere);

glUseProgram (ShaderProgramA);

glDrawArrays (GL_TRIANGLES, 0, 100);

glUseProgram (ShaderProgramB);

glDrawArrays (GL_TRIANGLES, 100, 100);

 

Similarly with glDrawElements you can see that it has a pointer parameter, (GLvoid *indices), as well as a count parameter, so again rather than using two sets of attrib pointers, you just use a single set and then adjust the parameters of your draw call to specify which range of the buffers to draw.


In Topic: glDrawElements without indices?

09 July 2014 - 05:44 PM

So texture streaming never happened?

 

 

 

Did I say that?  I don't remember saying that.  Maybe you'd explain to me how you managed to take what I wrote and read it as that?


PARTNERS