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 - Mars_999

Pages: 1 [2]
16
General / Period key on Num pad returns incorrect value?
« on: February 26, 2012, 10:19:10 pm »
I see a value of Zero when I hit the period key on the num pad? Is this correct... Which translates into A key

When I hit period on the keyboard I get a 50 which is period.

Thanks!

17
General / PrintScreen key?
« on: February 26, 2012, 09:23:45 pm »
I am sure this has been asked a million times but I can't find any info in the docs so here we go again...

Does SFML have a binding to the PrintScreen key? I know the OS has it, but I want to check SF::Keyboard::Key::PrintScreen for the key press....

Thanks

18
Window / How to disable user input e.g. keyboard, mouse
« on: January 01, 2012, 07:11:21 am »
I would  like to disable user input until after my splashscreens are done... Anyway to do this?

Thanks!

19
General / SFML 2.0 and Codeblocks
« on: December 30, 2011, 09:22:08 pm »
I am just checking out Codeblocks vs. MSVC++ 2010 and have no experience using GCC but I can't get SFML to work with it so far...

I am guessing that since Codeblocks uses GCC by default, that when it comes to libs I can't use sfml*.lib and I will need to use Codeblocks to compile a new set of libs that end with sfml*.a?

So if that is correct I am guessing the .lib files are tied to MSVC++ platform only?

Thanks!

20
System / Using threads to load resources for OpenGL
« on: October 15, 2011, 06:36:09 pm »
I am trying to get this code to work, but having no luck...

http://www.sfml-dev.org/wiki/en/sources/loadimagesinthread.cpp

but says it can't activate the window? IIRC....

I am not sure, but almost thinking it may be easier to have the thread load the data and when back in the main thread just upload the data to OpenGL then?

Reason for that thinking is I need one thread to load resources into OpenGL, and the main thread will still need to display things like GUI, splash screen ect... So is this even possible? As I recall you can only have one OpenGL RC active or available?

Thanks!

21
General discussions / FPS calculations with SFML2.0
« on: October 15, 2011, 06:17:29 am »
I know SFML 2.0 moved to unsigned int vs. float but maybe I just lost it, but I can't get my FPS to come out right... I get a 1 now vs. say 60fps

Code: [Select]

inline unsigned int GetFrameRate(void)
{
static unsigned int frameCounter = 0, fps = 0;
static float nextSecond = 0.0f, prevSecond = 0.0f;
frameCounter++;
nextSecond += window.GetFrameTime() * .001f;
std::cout << nextSecond << std::endl;

if(nextSecond - prevSecond > 1.0f)
{
prevSecond = nextSecond;
fps = frameCounter;
frameCounter = 0;
}
return fps;
}

22
Graphics / sf::Image and OpenGL textures
« on: October 14, 2011, 09:42:02 pm »
I am not sure about this, but from the looks of it, SFML1.6 I don't see anyway to have sf::Image just load a image file and not create a OpenGL texture? I just want to use sf::Image to load the data, and allow me to use the pixel pointer to upload the data to OpenGL so I can create the kind of texture format I would like to use. e.g. mipmapped, compressed ect...

As of now I allow it to go through the whole process and delete itself, but seems like a huge waste of time, and OpenGL has to load/unload a texture right away....

Thanks

23
Graphics / sf::imge and RGBA order?
« on: May 27, 2011, 06:50:57 pm »
I am uploading the pixel data to OpenGL using sf::Image. Does sf::Image always have a RGBA order? If so then I am assuming SOIL or somewhere swaps the BGRA to RGBA for you?

Thanks!

24
General discussions / How to flip image for OpenGL texture?
« on: April 03, 2011, 03:49:58 am »
Ok I have tried to use sf::Sprite and sf::Image to do this, but I am guessing I am going to have to do it myself?

sf::Image image;
sf::Sprite texture;

texture.FlipY(true);
texture.SetImage(image);

image = *texture.GetImage();

the texture isn't flipped....

Thanks!

BTW will this have a built in ability in 1.6 ever? or 2.0?

25
SFML wiki / Game Engine tutorial
« on: February 20, 2011, 07:23:35 pm »
Hello, anyone here have a link to a complete .zip file of the version 1.6 code base? I see there is a 2.0 version in the comment section.

Would be great if it was in a VC++ 2008 solution.

Thanks!

26
General discussions / GL_INVALID_OPERATION image.cpp file?
« on: September 25, 2010, 05:41:56 am »
I get an GL_INVALID_OPERATION error  in image.cpp(481) and (482) when I close my simple SFML app....

Can anyone else verify this or has this been reported?

Thanks

27
Feature requests / Mipmapping for OpenGL texture creation?
« on: September 18, 2010, 06:47:29 pm »
Hello,

Can we add in the ability to generate mipmapping.
Using

glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);

We can use the glGenerateMipmap() if everyone is on board for that vs. the above code...

I am thinking of something like this?

Code: [Select]

bool Image::CreateTexture()
{
 // Create the OpenGL texture
 if (!myTexture)
    {
       GLint PreviousTexture;
       GLCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &PreviousTexture));
 
        GLuint Texture = 0;
        GLCheck(glGenTextures(1, &Texture));
        GLCheck(glBindTexture(GL_TEXTURE_2D, Texture));
        GLCheck(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTextureWidth, myTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL));
        GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP));
        GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP));
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myIsSmooth ? GL_LINEAR : GL_NEAREST));
if(myIsMipmapped)
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myIsSmooth ? GL_LINEAR_MIPMAP_LINEAR : GL_NEAREST));
else
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myIsSmooth ? GL_LINEAR : GL_NEAREST));
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE));
        myTexture = static_cast<unsigned int>(Texture);
        GLCheck(glBindTexture(GL_TEXTURE_2D, PreviousTexture));
   }
}


Mipmapping would be on by default and you would need to add bool IsMipmapped() and SetMipmap(bool)

Please advise!

Thanks,
Dave

Pages: 1 [2]