SFML community forums

Help => Graphics => Topic started by: vectorg on January 16, 2012, 05:21:17 am

Title: sdl user but I'll switch
Post by: vectorg on January 16, 2012, 05:21:17 am
hello,

I'm here because I just updated my Intel HD2000/HD3000 graphics drivers, and SDL stencil buffer stopped working.  No shadows.

Are there any known issues with SFML and HD2000 graphics drivers on Windows 7, or a 64-bit OS?

One other question, can SFML be used to do software rendering?  I currently use SDL to do that on Windows and Linux.

Thanks.
Title: sdl user but I'll switch
Post by: Tex Killer on January 16, 2012, 05:53:21 am
What do you mean by software rendering?

Perhaps you want something like "SFGUI"... If so, check on the projects sub-forum.

Edit: How dumb of me, only realised what you meant after Laurent reply...
Title: sdl user but I'll switch
Post by: Laurent on January 16, 2012, 07:33:11 am
Stencil buffer has nothing to do with SDL, it's most likely a driver problem. Same for SFML, by the way.

SFML is based on OpenGL, so if you want to do software rendering you must find a software implementation of OpenGL.
Title: sdl user but I'll switch
Post by: vectorg on January 16, 2012, 11:09:44 pm
Yes, I solved the problem and it was a driver issue, not SDL.  Intel driver installation reset a parameter, and you must set it to "Software" in the 3D section of their HD3000 setup utility.

>>What do you mean by software rendering?

I draw all pixels in the video buffer myself, then swap the page, and draw again.  Like in the old days.  Lots of clipping, poly-filling, z-buffer maintenance, etc.  Very fun.

Laurent, does SFML provide a video buffer address to OpenGL so it can draw?  If so, then I could use that address to do my own drawing.  Do you think yes or no?  Is there an explicit page-flipping function in SFML that I would call?

Anyway, thanks for the help guys!
Title: sdl user but I'll switch
Post by: caracal on January 17, 2012, 12:54:19 am
You can use pretty much any 2d graphics library "Cairo, Pixman, QPainter, AGG, Fog Framework, Skia, ImageMagick" to do your drawing and then just
copy the the pixel buffer to a sfml Image.

Here is a ImageMagick (Magick++) Example

Code: [Select]

  sf::Image image;

  Image im("picture.png");;
  Blob blob;

  im.magick("RGBA");
  im.swirl( 100 );
  im.write(&blob);
 
  image.Create(im.columns(), im.rows(), reinterpret_cast<const sf::Uint8*>(blob.data()));
 
  // Load a sprite to display
  sf::Texture texture;
  if (!texture.LoadFromImage(image))
          return EXIT_FAILURE;



If your interested I have examples for all the above 2d graphics engine except AGG. Let me know and Ill prepair them for you :)
Title: sdl user but I'll switch
Post by: Laurent on January 17, 2012, 08:09:20 am
Quote
Laurent, does SFML provide a video buffer address to OpenGL so it can draw?

This was possible 20 years ago, but this is not how things work anymore today ;)
You must use your own pixel buffer in system memory, then upload it to the video card through a texture and display it with a fullscreen sprite.
Title: sdl user but I'll switch
Post by: vectorg on January 17, 2012, 09:27:20 pm
Ok, here's what I have learned about the stencil buffer HD3000 issue...

A Windows OpenGL app (using CreateWindowEx) works when the Intel HD3000 3D option is set to "Default Settings" or "Application Settings", or any setting.

An SDL app only works with HD3000 3D option set to "Enable Software Processing".

Also, with "Enable Software Processing", both apps run at about half speed.

Questions:

What parameter options should I try in SDL to get it to work at Intel "Default Settings"?

Will SFML require "Enable Software Processing" also?

Thanks.
Title: sdl user but I'll switch
Post by: Mario on January 18, 2012, 12:00:24 am
I'd say best way to test would be "trial & error". You could use any of the minimal examples or a short test program to test this.
Title: sdl user but I'll switch
Post by: dydya-stepa on January 18, 2012, 11:51:11 am
I have no idea how to send messages to other users.

I have a question to caracal:

you mention you have lots of samples with graphics libraries. I'm looking for an algorithm of a glow - maybe you know what options might be?

http://www.sfml-dev.org/forum/viewtopic.php?t=6629
Title: sdl user but I'll switch
Post by: Laurent on January 18, 2012, 12:01:00 pm
Quote
I have no idea how to send messages to other users.

(http://www.sfml-dev.org/forum/templates/subSilver/images/lang_english/icon_pm.gif)
Title: sdl user but I'll switch
Post by: dydya-stepa on January 18, 2012, 01:16:20 pm
you wanted to say something ? :-) or what
Title: sdl user but I'll switch
Post by: Laurent on January 18, 2012, 01:24:27 pm
I show you which button you must click to send a Private Message to a user.
Title: sdl user but I'll switch
Post by: dydya-stepa on January 18, 2012, 03:05:50 pm
ahh, thanks.
Title: sdl user but I'll switch
Post by: caracal on January 18, 2012, 06:40:14 pm
Quote from: "dydya-stepa"
I have no idea how to send messages to other users.

I have a question to caracal:

you mention you have lots of samples with graphics libraries. I'm looking for an algorithm of a glow - maybe you know what options might be?

http://www.sfml-dev.org/forum/viewtopic.php?t=6629


Ummm I am the wrong person to ask about shaders. I am the "Cairo, QPainter, Skia, ImageMadick(Magick++), ... guy.

Hell I could even show you how to integrate OpenSceneGraph.

Shaders are beyond my capability's :) sorry

If you have a question just ask, here on the forums. I am unlikely to answer any private messages.
Title: sdl user but I'll switch
Post by: dydya-stepa on January 18, 2012, 08:51:14 pm
i dont care about shaders. i'm interested in approach. i can implement myself whatever i'll have to. even pseudocode would be sufficient.

maybe you know if there's a glow in those libraries - should i take a closer look? maybe you know what options exist to create a glow
Title: sdl user but I'll switch
Post by: vectorg on January 19, 2012, 04:00:32 am
Quote from: "Mario"
I'd say best way to test would be "trial & error". You could use any of the minimal examples or a short test program to test this.

Thanks Mario.  I will try an SFML sample.  Can you recommend one to try?

I program mostly in Visual C++ 2010 now, but also Linux G++ or whatever.
Title: sdl user but I'll switch
Post by: slotdev on January 19, 2012, 05:44:53 pm
Just a bit on an aside, I dropped SDL over 12 months ago. We are a commerical user of SDL/SFML and I have to say, we will never look back.

SFML has so much more support, is much better written, more intuitive and most importantly, faster. SFML rocks ;-)

Ed