Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Jun 2010
Online Last Active Today, 04:17 AM

Posts I've Made

In Topic: OpenGl Es analysis

23 September 2016 - 01:14 PM

For isolating vertex shader performance I would suggest:

  • You need a large data set, in a vertex buffer in GPU memory, which can be submitted in a single draw call.
  • Use points rather than triangles to simplify (and therefore minimize the overhead of) primitive assembly, clipping, culling, etc.
  • Transform each point to outside of the view frustum so that it's discarded by the pipeline as soon as possible after the vertex shader, and no subsequent shader stages run.

That will give you a reasonably accurate number, but I'd suggest that the number you get is actually useless.  It has no bearing whatsoever on the kind of performance you'll get in a real-world program, and the mention of pipeline stages you optimize or skip above should hint why: because a real-world program won't be optimizing or skipping these stages, and will therefore have extra load on both the CPU and GPU that your test doesn't measure.

In Topic: [dx9] setting a shader constant?

21 September 2016 - 02:02 PM

It should be 16 in the last parameters of SetVertexShaderConstantF, not 4. A matrix is made of 16 floats. So your're just passing the only 4 elements, not the whole matrix.


No, 4 is correct:

Number of four float vectors in the array of constants.

but now I dont get the geometry on my screen anymore. it worked with the constant table

Do you need to transpose your matrix?

In Topic: Fast Way To Determine If All Pixels In Opengl Depth Buffer Were Drawn At Leas...

20 September 2016 - 08:08 AM

Mipmapping is not only a performance thing; it's also affects image quality, and in fact the primary reason why mipmapping was invented in the first place was for quality.





They are intended to increase rendering speed and reduce aliasing artifacts. .....  Mipmapping was invented by Lance Williams in 1983 and is described in his paper Pyramidal parametrics. From the abstract: "This paper advances a 'pyramidal parametric' prefiltering and sampling geometry which minimizes aliasing effects and assures continuity within and between target images." The "pyramid" can be imagined as the set of mipmaps stacked on top of each other.


I suggest that you do some research on aliasing to fully understand the problems that this solves.  Also be aware that to some people, aliasing may be confused with additional detail.


Mipmaps don't use almost double the memory - they use one-third extra.  But don't get fooled into thinking that memory usage is a primary arbiter of performance, because it's not.

In Topic: GoldSRC to Unreal engine

19 September 2016 - 09:05 AM

...be prepared to get a "Cease & Desist" from Valve though.  They really don't like people doing this kind of thing...

In Topic: Getting started with OpenGL development in linux

16 September 2016 - 05:18 AM

2-Why would you use GLEW under linux? I thought GLEW only job to implement functions that links to the driver under windows. The reason for this is because windows only support OpenGL 1.0. So GLEW gives access to OpenGL 1.0+ functions. So Linux doesn't need that since Linux support every version of OpenGL natively. Doesn't it?


A misunderstanding on your part.


Windows supports OpenGL versions from 1.0 to 4.5, without issues.


However, the headers and librarys supplied with the Windows SDK only support up to OpenGL 1.1, with a smattering of extensions.  That's an important distinction because it's perfectly possible for other SDKs or build systems that support all current GL versions to exist; nothing about Windows prevents that.


So you use the extension loading mechanism (another important distinction; this is not the same as using extensions) to access higher functionality.


The key thing to realise is that the same constraints can exist on Linux.  Depending on your build tools and/or SDK used, you may have headers and librarys for all current GL versions or you may also need to use something like GLEW.


It's not the OS, it's the tools.