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

Pages: 1 [2]
16
Feature requests / Some ideas
« on: May 24, 2012, 10:37:58 am »
Hi, I'm working with SFML 2.0 for a while, and I want to throw up some ideas
1. Class Drawable have only draw method (for now), but you can see the inherited drawables have methods like getLocalBound etc. maybe they can be pure virtual in drawable ?
2. It's very hard to extend default sprite, text, etc. If you are working on something, first you want to do is to create your own object, container, and inherited drawables. This can be easily solved.
3. Sometimes it's very usefull to override function like setPosition, setScale, setRotation etc. Is there something that they can't be virtual ?

17
Window / Mouse Leave event
« on: May 22, 2012, 02:22:57 pm »
recently noticed that sometimes MouseLeft event is not generated when the mouse button is pressed
Windows 7, VS2010 debug/release
to reproduce :
1. set a breakpoint
2. press left mouse button and move the mouse out of the window (fast,  cant reproduse while moving mouse slowly)
In that case event is generated when you release the button.

code:
   sf::RenderWindow win(sf::VideoMode(1024, 768), "Show", sf::Style::Close);
   while (win.isOpen()) {
      sf::Event event;
      while (win.pollEvent(event)) {
         if (event.type == sf::Event::MouseLeft) {
            int setBreakpointHere = 0;
            setBreakpointHere ++;
         }
         if (event.type == sf::Event::Closed) {
            win.close();
         }
      }
      win.clear();
      win.display();
   }
 

posible workaround : http://www.gamedev.net/topic/191870-wm_mouseleave-problem/

18
General / Vertex Array animation
« on: April 08, 2012, 03:01:25 pm »
I was wondering, is there any good editor (for animating vertexes, color/UV) or Maya/Blender exporter that can handle this.
I tried to google plugins/scripts, but with no luck.  :(
Thx for any help

19
Hello, i'm trying to load resources in background :
Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

void LoadResources()
{
sf::Context context;
for (int i = 0; i < 100; i++)
{
sf::Texture * texture = new sf::Texture();
texture->loadFromFile("D:/2.png");
}
}

int main()
{
sf::RenderWindow m_window(sf::VideoMode(1024, 768, 32), "Test", sf::Style::Close);
sf::Text m_text("test");
sf::Clock clock;
while (m_window.isOpen())
{
m_text.setPosition(clock.getElapsedTime().asMilliseconds() / 100, 100  );
sf::Event event;
while(m_window.pollEvent(event))
{
if (event.type == sf::Event::Closed) {
m_window.close();
}
if (event.type == sf::Event::KeyPressed) {
// key down
if (event.key.code == sf::Keyboard::Space) {
sf::Thread thread(LoadResources);
thread.launch();
}
}
}
m_window.clear();
m_window.draw(m_text);
m_window.display();
}
return 0;
}

The problem is that the main thread stops rendering while the second thread is working.
Also tried to use mutex to sync (acording to example on wiki), no changes. Am i missing something ?
Win7 64

20
Graphics / Just wondering, Intel GPU
« on: March 27, 2012, 08:07:50 pm »
Despite the problems with Intel graphics cards, was wondering if writing project without  using render to texture, will the program work on integrated video cards ?
I created a render texture, render all the graphics there, and than simply display RT texture in other sprite in window, and noticed some texture flicker (inside render texture). Is there any way to fix this, or just try to avoid using them until this problem being solved ?
Greetings from Ukraine  ::)

Pages: 1 [2]