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

Pages: [1]
1
Window / qt5 widgetHandle -> SFML2.0
« on: September 26, 2016, 12:51:09 pm »
Hi I am trying to setup a QTSFMLCanvas as seen in eg: http://becomingindiedev.blogspot.se/2013/10/qt-5-and-sfml-20-integration.html

Qt5-widget has a winId() method that is supposed to return the native handler for the widget. On my platform (linux Arch 64bit) it is a long long unsigned int and RenderWindow seems to want a long unsigned int.

hence,
RenderWindow::create(reinterpret_cast<sf::WindowHandle>(winId()));

fails with: invalid cast from type 'WId {aka long long unsigned int}' to type 'sf::WindowHandle {aka long unsigned int}'

Is there a workaround or a way to convert the handle? I have been giving google hard time with this one and have found nothing.

static_cast just hangs the application.

Any ideas?


2
Graphics / rotate around different origins
« on: December 25, 2013, 10:37:24 pm »
Hi,
I have a sf::Drawable that has a sprite that draws a sf::Sprite at 0,0 and it has a specified orgin set. eg. center of the sprite.

From time to time I'd like to rotate the sprite around another origin. Is there a way to do this withouth having to transform the object back and forth. As soon as I change the origin of the sprite it moves since the 0,0 will now have the new position.

3
System / no KeyEvents in wxWidget
« on: February 12, 2013, 10:24:01 pm »
Hi,
is it known that no KeyEvents are triggered when using SFML with wxWidget?
I am polling the event in a mainloop like this:

   sf::Event event;
   while (window.pollEvent(event))
   {
      if (event.type == sf::Event::KeyPressed) {
         LOG << "Yeah!\n";
      }
   }
 

however the polling the Keyboard directly is still possible.
Is there a workaround to get the KeyEvent working?

4
Graphics / Sprite composition and transformation
« on: January 08, 2013, 08:07:18 pm »
Is this possible...

Let's say I have a class that extends sf::Sprite and implements void draw(sf::RenderTarget& target, sf::RenderStates states).
And in draw(..) I render a couple of sprites that move and what not.

is it possible to do a setPosition of the class and have the rendered content translate accordingly?

What is the correct way of doing this?

5
Graphics / Drawing vertexarrays always start from 0,0
« on: January 05, 2013, 02:49:35 am »
Hi,
I don't know if I am missing something but when I try to draw lines using a sf::VertexArray it always starts drawing from (0,0).
So let's say I choose to draw a box with theese coords:

(10,10)
(110,10)
(110,110)
(10,110)

I have attached an image of the result.
Running SFML2.0 on a LinuxBox.

Is this the desired result or a bug? And is there a workaround?



[attachment deleted by admin]

Pages: [1]