Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Feb 2012
Offline Last Active Apr 30 2012 02:36 AM

#4932053 What Graphics Library works with Windows 7?

Posted by on 17 April 2012 - 01:46 AM

You know what DRMP, I've been coding for over 10 years and I still occasionally get these problems! A simple check list would be:

(1) Ensure your project include and library paths are pointing at the correct directories (containing the libraries you want to use)
(2) Ensure you add the .libs to your project library dependencies
(3) Ensure you #include the headers you want to use.
(4) If you have any hair left, pull it out.

#4930164 Rendering lots of pixels 1 by 1 ?

Posted by on 11 April 2012 - 01:44 AM

Instancing might help. At least it will cut down the number of draw calls. Have a google for it.

#4929898 Rendering lots of pixels 1 by 1 ?

Posted by on 10 April 2012 - 07:36 AM

Are you sure that setting a uniform for

every particle every single frame

won't cause a bottleneck?

I'm kind-of wondering why this parameter needs to be a uniform at all. Perhaps it could be an element in your or a vertex stream?

#4928524 Shader ';' : syntax error; parse error

Posted by on 05 April 2012 - 10:35 AM

vec3 lightPos = (matWorld * vec4(0.0,1000.0,1000.0,1.0).xyz

I'm sure you need another closed bracket there.

#4926918 opengl game engine [help]

Posted by on 31 March 2012 - 06:40 AM

Pro's use std::shared_ptr :-).

#4922558 Culling and Z buffering without using the ID3DXEffect interface

Posted by on 16 March 2012 - 06:06 AM

No Tispe. The programmable pipeline still has certain flags and switches to do various things. I suppose in the near future even that will disappear, but for now you still have the modes and enables/disables as usual.

#4921114 Fastest way to render line mesh over 3D triangular mesh?

Posted by on 11 March 2012 - 07:33 AM

Seems like you're emitting vertices in immediate mode, so I'm not surprised it's slow! The best thing I can do is point you towards a vertex buffer object tutorial, or Google, because there are quite a few out there.

#4920479 Texture unloading

Posted by on 08 March 2012 - 01:14 PM

looking at the SOIL source, i believe your looking for:


look at the header for more information, and i don't claim to be 100% correct, i've never used soil, but i don't see anything else that seems to indicate deleting behavior.

I think that's only if you've loaded the file with SOIL_load_image, because it returns an unsigned char buffer *, not an OpenGL asset ID.

#4920353 Texture unloading

Posted by on 08 March 2012 - 02:15 AM

When you say unload, you mean delete the texture?

glDeleteTextures(1, &tex_2d);

The above will delete the texture.

#4918586 SLMATH library and SSE optimisation problem.

Posted by on 02 March 2012 - 07:53 AM

Actually this is a general problem with putting aligned objects into containers, i.e. a very simple repro case:

#include <vector>

class Item


    struct {

	    float a, b, c, d;

    } Aligned;

int main()
    // Error - won't compile.

    std::vector<Item> myItems;

#4912567 Question regarding GUI structure

Posted by on 13 February 2012 - 06:51 AM

Hi altich,

You can store a font pointer in all of your objects. If it's null, the system can default to a given font (the root item's font). Otherwise it can use its own. In my UI (which was written for a camera, not a desktop game), each window/widget in the tree has a pointer to a decorator object. The decorator contains all kinds of information about things like border thickness, background colour, font colour, font size and so on. If the decorator object is null for any given node in the tree, the node defers to the default decorator, otherwise it uses its own. Making changes to the properties of the default decorator and then redrawing causes all items in the tree that don't have their own decoration to change too.

The truth of the matter is that if you want to give your widget the ability to have a different font, it follows that each widget must at least contain a pointer to a font, even if they're all pointing to the same, default font initially.

Hope this is useful.