Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bmn

Pages: [1]
1
Graphics / sf::Shader uniform array
« on: June 19, 2012, 07:58:35 pm »
How do I send data to uniform array with sf::Shader ? I've tried using this:
float v3Colours[30];
for( int i = 0; i < 10; i++ ){
        v3Colours[ i * 3    ] = i*0.1;
        v3Colours[ i * 3 + 1] = 1.0-i*0.1;
        v3Colours[ i * 3 + 2] = 1.0-i*0.1;
}
glUniform3fv(glGetUniformLocation(id, "v3Colours"), 10, v3Colours);
but I don't know program id. Is it even possible ?

2
General / Help with lightmanager
« on: April 16, 2011, 04:56:56 am »
I've been trying to use the lightmanager from the French wiki and everything works fine unless my walls are perfectly horizontal or vertical.  I'm guessing it's a divide by zero or similar mathematical error but I cannot seem to find it.

I've uploaded my source and compiled project Here so everybody can see the problem. The only change to the source is that unnecessary lines have been commented out.



The problem is with the lower of the two walls.

3
C / Scaling offsets graphics
« on: August 05, 2010, 08:48:01 am »
I know this problem has been reported with SFML 1.6, but it has existed in the C bindings since before 1.6.

I'm using Visual Studio 2010 so I had to recompile the libs from scratch, and here are my results.

SFML 1.6 : not working (already reported)
SFML 1.6 + CSFML 1.6 : not working (obvious)

SFML 1.5 : working
SFML 1.5 + CSFML 1.5 : not working

I'm not sure why it doesn't work, and any suggestions would be appreciated. Tomorrow I might keep trying earlier versions until I find where the problem first originated.

4
SFML website / Typo
« on: May 28, 2010, 08:48:38 pm »
"si you use" -> "if you use"?

http://sfml-dev.org/wiki/en/faq

5
General / Asynchronous input
« on: October 16, 2009, 04:46:22 pm »
Hi,

I know the title sound weird, but allow me to expand it:
whoever red the code of quake3 surely noticed, that their directx based implementation of input system is system-buffered and, which is most important, provides with a captured event the information of "delta time" between the event has occurred (or has been recorded by DX) and the moment we red it from the buffer.

This "delta time" value is particularly valuable in FPS games, where an abstraction between input precision and frame rate is desired.

So far, I've been using SDL for cross-platform products, but now I received a job description that requires this delta-time value to be provided by an input system. By reading SFML "Event" class documentation, I've noticed, that SFML has no such feature built-in.

The team's idea was to start a different thread, waiting for input events, and capture them immediately, enrich with the "delta-time" value, and put in the mutex-protected buffer, so the main thread can read the buffer with the desired values.
In SDL, due to it's design, such approach would be unsuccessful, as the SDL_WaitEvent (which we wanted to loop in the input-thread) calls internal functions specific to main thread.

Has SFML the same restriction? Or can the desired result be achieved different way in SFML library?

Regards,
akuda

Pages: [1]
anything