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.


Messages - kreed

Pages: [1]
1
Graphics / sf::Shader get shader Id?
« on: April 22, 2013, 12:29:41 am »
I would like to use sf::Shader, and it works well, but it doesn't seem to have a way for me to get the shader program ID. I need this because I want to send my matrix to my shader.

There is Shader.setParameter() , this will only take the sf Transform, which has less features than I would like.

I need to be able to get the shader program ID so I can manually send GLM types to my shader, so is there a way to acquire it?


2
General / Why no 64bit SFML2 on Windows?
« on: November 15, 2012, 11:37:56 pm »
I might be blind, but I don't see the 64bit version of SFML 2 available for download. I tried generating project files for 64bit Visual Studio 2008 but Cmake says that the project doesn't support that. Is there something I'm missing?

Thanks,
Kreed

3
System / Re: Find out when a thread is done or is running?
« on: September 08, 2012, 06:18:36 pm »
Yeah, I thought about doing something like that. This is really just a placeholder so I can get something working quickly. Later I'll terminate from inside the thread using my event system. I just wanted a quick fix to move forward :P.

4
System / Find out when a thread is done or is running?
« on: September 08, 2012, 06:04:24 pm »
So, I need to find out when a thread is done. Is this possible? I need to use it so that when a specific thread is closed, my other thread terminates. Also, is there a way to find out if a thread is currently running? Essentially, I have two threads. When any of my threads stop running, I want to terminate all my other threads.

5
Graphics / SFML 2.0 Shader class vs own shader class for 3D
« on: February 13, 2012, 11:26:47 pm »
That's fine, I was just confused. I'll write my own Shader class. SFML is still awesome regardless of that.

6
Graphics / SFML 2.0 Shader class vs own shader class for 3D
« on: February 12, 2012, 08:33:44 am »
The only real question I have, is how do Ido this with the SFML shaders? I don't see a function for this in the documentation.

GLuint loc = glGetAttribLocation( program, "vPosition" );
glEnableVertexAttribArray( loc );
glVertexAttribPointer( loc, 2, GL_FLOAT, GL_FALSE, 0, BUFFER_OFFSET(0) );

7
Graphics / SFML 2.0 Shader class vs own shader class for 3D
« on: February 11, 2012, 10:23:59 pm »
So, I have taken a quick look at the SFML shader class in 2.0 and have a question. Can you use the SFML Shaders for a 3D shader-based setup, or should I write my own shader class. I know 3D is not the focus of SFML at this time, so would it be better to write my own Shader class, or can SFML handle it?

Thanks,
Kreed

8
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 04, 2011, 12:29:39 am »
Also, I noticed that the shape object seems to be for 2D objects only, not 3d.

What would you recommend is the best way to set up SFML 2.0 to render 3D graphics using OpenGL 3.2+

9
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 10:51:29 pm »
it prints a 0.

10
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 03:55:32 pm »
Ah, I wish I had tried this before I have left! I will have to get back to you with what I get later today. Thanks for all the help so far.

11
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 03:03:01 pm »
Hmm, it isn't forced off, it said its based on the program settings, but I tried making it default to the settings, and there was no change.

12
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 02:46:47 pm »
ah, that is actually an amazingly GOOD thing to do so no complaints there. If it is forced to OFF how could I turn it on? I am using an NVIDIA GTX 465. I know it supports all the way up to 4.1 rendering contexts, but I want to support more platforms so I'm shooting for a middle ground. I also have my drivers installed with full OpenGL 3.2+ support.

13
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 02:26:22 pm »
No, I am currently on Windows 7 64-bit. I just realized that I also never actually loaded/compile/linked/used and shaders. Does SFML automatically assume default shader usage in the 3.0+ contexts?

Thanks for everything,
Kreed

14
Graphics / SFML 2.0 Creating OpenGL 3.2 Context
« on: June 03, 2011, 10:16:44 am »
I have been trying to create a simple OpenGL 3.2 context in SFML 2.0 and enable anti aliasing.

#1 Is there a way to find out WHAT OpenGL version is being used?

#2 Anti-Aliasing doesn't look like its working.

This is what I'm getting as output.


I'm trying this :
Code: [Select]

#include <SFML/Graphics.hpp>
 
 int main()
 {
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::ContextSettings::ContextSettings(8, 8, 4, 3, 2);

sf::Shape shape;

shape.AddPoint(10, 10, sf::Color::Red, sf::Color::White);
shape.AddPoint(300, 112, sf::Color::Green, sf::Color::White);
shape.AddPoint(10, 300, sf::Color::Blue, sf::Color::White);

shape.EnableFill(true);
shape.EnableOutline(true);
shape.SetOutlineThickness(10);

    while (window.IsOpened())
    {
         sf::Event event;
         while (window.PollEvent(event))
         {
             if (event.Type == sf::Event::Closed)
                 window.Close();
         }
window.Draw(shape);
         window.Display();
     }
 
     return EXIT_SUCCESS;
 }



Thanks for any/all help.

EXTRA SPECIAL thanks to you Laurent, I am new to SFML but love it already.

Pages: [1]