Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Sep 2010
Offline Last Active Feb 17 2014 11:23 PM

Posts I've Made

In Topic: Pixel buffer

20 December 2013 - 03:29 PM

So just keep all he graphics operations on the gpu, got it. Is there a good, cross-platform, well documented method that most people use? Are there tutorials or examples of this somewhere?

In Topic: Pixel buffer

19 December 2013 - 09:59 PM

Also, if anyone has any pointers about what operations can be performed the fastest, and any additional information about per-pixel operations would be nice.

I'm really just concerned about direct control over gamma, brightness, contrast, that sort of thing. Would also be nice to hear about any useful ideas for maybe having a histogram or something that could help correct over or underexposure for post processed images.

I'm sure there's a whole list of websites or pages somewhere that has info on this, but I would like to hear some recomendations, maybe a specific site that focuses on post processing operations.

In Topic: Strange lighting issues

10 December 2013 - 09:58 PM

I had started typing that before you had replied. Thanks again for the help. The reinterpret cast thing is new to me. I've been doing all of that manually, and it's been a real pain. Most of the C++  books I have are >10 years old, and they don't go into alot of detail about stuff like that. Mostly strings and array pointers. I'll do a little research into the methods of overloading operators and such. Thanks again for the help.


Got another question. i've got 3 lights, with ambient and diffuse values set around .8 -> .9 and the scene is very dark looking. There's light, but it's not really like the lighting I'm used to. I tried to bump the ambient values up to 10 and it didn't seem to have an effect. Any ideas?

In Topic: Strange lighting issues

10 December 2013 - 06:44 PM

Ahah you saved my life. I'm still a little confused about the matrix multiplying the light positions.


Right now, the UpdateAllLights() happens after the modelview matrix has been established.


Where would you reccomend that this be placed?

In Topic: Strange lighting issues

10 December 2013 - 06:38 PM

I changed the update light code to this:


    float amb[] = {5, 5, 5};
    glLightfv(light->ID, GL_POSITION, amb );


and excluded this:
    //glLightfv(light->ID, GL_POSITION, light->position.pFloat());


and it works. The problem is that I need to pull the info from the *light that the update function uses as input


is there something wrong with using:


UpdateLight( LIGHT *light)


and the pulling the info using:


light->position.pFloat();   // pFloat() returns a pointer to an array of { x, y, z} stored in the vector3


Could be that since it uses a pointer to the light struct, and then a pointer to the vector3 struct that somehow the actual data struct gets lost.

I'm still confused as to why the light only works near the origin with this implementation.


Any thoughts?