Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 28 Dec 2008
Offline Last Active Jun 29 2014 02:48 AM

Posts I've Made

In Topic: multiple windows/instances and gl::GL_MAX_DRAW_BUFFERS

06 February 2013 - 11:18 AM

i do call wglMakeCurrent, but the thing is: i don't call it in each thread, since i only run 1 thread. I do run both window computations and draw methods one after the other. (both windows don't need a lot of computations so this works for me i'd like to keep it simple)


imagine my loop is like:

instance1 = new inst... // an instance containing it's scene logic, window, and opengl context
instance2 = new inst...

    instance1->update()->draw(); // calls makecurrent does it's stuff and renders


could the problem be that i run multiple contexts on the same thread?




problem solved


a background worker thread had some old not cleaned up messy code that switched the context in some cases at uncontrolled times...

In Topic: problems with position and depth range in fbo texture

23 July 2012 - 11:31 AM

thanks that helped a lot, i've set mine to 0.35 / 1000 at the moment, and in case i need to see farther i might render in a different clipping context.

one question remains, which is why my postions texture looks so weird. is that normal? because it doesn't look anything like the gdebugger output.

In Topic: problems with position and depth range in fbo texture

23 July 2012 - 06:09 AM

i tried repositioning my camera and setting the projection near/far from 0.1/100000 to 10/10000, and now i see the depth texture, and the positions.

still they do not look like they do in gdebugger, but seeing those values, i think it is just a matter of displaying the values sent to the shader differently.

here is my engine output
Posted Image

and this is what gdebugger says:
Posted Image

how can i change my shader or render calls to visualize the textures in a better color range?

because needing to have the far/near plane at 10/10000 is not accepable if i have a first person camera running on that land/heightmap. i'd at least like them to be 0.3/3000

In Topic: multiple shaders per model

22 March 2012 - 05:25 PM

ah very interesting. i had also thought about seperating meshes from models once but i took the convenient (and slow) route and set the buffer pointers on each mesh draw call. but with your way i can bind a buffer for a model of a kind once and then render it on different positions with different parameters.

this brings me to another question:

when you have your meshes sorted in a list, if we say for example 3 meshes share the same buffers and are drawn one after the other, but for some reason one of those wants to use a different shader. what would you prioritise?

- would you rather group meshes with the same buffer first, and then with those meshes sort those with the same shaders and change shaders more often
- or group shaders, and then within shaders group meshes which share buffers?

thanks is advance, your answer was very very helpful

In Topic: out of memory!

14 February 2011 - 05:21 AM

no_pixel is around 29,5XX, it represents a counter of pixels within a specific area of an img,

do you mean 29-thousend?, in this case you try allocating roughly 800MB of memory.

becase you create a byte[30000][30000] in this case. Is this really what you want?