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

Pages: 1 ... 14 15 [16]
226
General discussions / Re: SFML 3 - What is your vision?
« on: June 24, 2014, 01:07:22 am »
All I want is a Line class >.<
Yup, the line is a rectangle shape with height = 1, but everytime I need to draw line, I have to calculate length and angle =)

(It was too hard to draw lightnings with rectangles  ;D)


227
General / Re: Static Link Errors
« on: June 24, 2014, 12:39:20 am »
Excuse me, if I wrong.
Does it normal, that static linkage goes without errors only with "-s-d" libs?

When I'm trying to statically link with "-s" the tons of errors comes to build log:

-- Configuring done
-- Generating done
-- Build files have been written to: D:/untitled2
Linking CXX executable untitled.exe
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x12b): undefined reference to `glDeleteTextures@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x192): undefined reference to `__GLEW_ARB_texture_non_power_of_two'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1c5): undefined reference to `__GLEW_ARB_texture_non_power_of_two'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1fd): undefined reference to `glGetIntegerv@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x44c): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x499): undefined reference to `glTexImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x4c4): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x4ef): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x515): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x53b): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x60f): undefined reference to `glGenTextures@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x74c): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x777): undefined reference to `glGetTexImage@20'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x8e3): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x911): undefined reference to `glGetTexImage@20'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x9f4): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xa3a): undefined reference to `glTexSubImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xb3f): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xb86): undefined reference to `glTexSubImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xcac): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xcf2): undefined reference to `glTexSubImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xea9): undefined reference to `glFlush@0'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xeeb): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xf40): undefined reference to `glTexSubImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0xf53): undefined reference to `glFlush@0'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x12bc): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1300): undefined reference to `glTexSubImage2D@36'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x140d): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x145e): undefined reference to `glCopyTexSubImage2D@32'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x156d): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x15bc): undefined reference to `glCopyTexSubImage2D@32'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x16be): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x16e4): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x170a): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x178e): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x17b9): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x17e4): undefined reference to `glTexParameteri@12'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x184a): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1859): undefined reference to `glMatrixMode@4'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1861): undefined reference to `glLoadIdentity@0'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x186d): undefined reference to `glMatrixMode@4'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x188c): undefined reference to `glBindTexture@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x193f): undefined reference to `glMatrixMode@4'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x194d): undefined reference to `glLoadMatrixf@4'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x195c): undefined reference to `glMatrixMode@4'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x19ba): undefined reference to `glGetIntegerv@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1b72): undefined reference to `glDeleteTextures@8'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj):Texture.cpp:(.text+0x1cb4): undefined reference to `__GLEW_ARB_texture_non_power_of_two'
D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: D:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/../lib\libsfml-graphics-s.a(Texture.cpp.obj): bad reloc address 0x17 in section `.text.unlikely'
collect2.exe: error: ld returned 1 exit status
CMakeFiles\untitled.dir\build.make:88: recipe for target 'untitled.exe' failed
CMakeFiles\Makefile2:62: recipe for target 'CMakeFiles/untitled.dir/all' failed
Makefile:74: recipe for target 'all' failed
mingw32-make[2]: *** [untitled.exe] Error 1
mingw32-make[1]: *** [CMakeFiles/untitled.dir/all] Error 2
mingw32-make: *** [all] Error 2
 

CMake file:
project(untitled)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
SET( CMAKE_CXX_FLAGS  "-DSFML_STATIC" )
SET( CMAKE_EXE_LINKER_FLAGS  "-static-libgcc -static-libstdc++ -static" )

target_link_libraries(untitled sfml-graphics-s sfml-window-s sfml-system-s)
 

Source:
#include <SFML/Graphics.hpp>

int main()
{
    sf::Texture b;
    return 0;
}
 

228
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 11:03:21 am »
Sorry, just found an answer... setTextureRect. Anyway thank you very much!!!

229
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 10:58:58 am »
Sorry, but how to use it?

I'm doing this:

BackgroundTexture.loadFromFile("data/img/gui/mainmenu/bg.jpg");
BackgroundTexture.setRepeated(true);
Background.setSize(sf::Vector2f(1024,768));
Background.setTexture(&BackgroundTexture);

but the image is still scaling instead of repeating

230
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 09:51:43 am »
Thanks a lot, Laurent! I'll do it right now.
And your project is awesome!  ;)

231
Graphics / Scale sprites with repeating instead of stretching
« on: July 19, 2013, 09:30:16 am »
Hi. I'm new in SFML, but have experience in OpenGL.
Well... Is there a way to fill background with some sprite in SFML v1.6?

For example sprite size is 512x512, screen size is 1024x768.

If I resize it to screen size, the texture coordinates will still be the (0, 0) - (1, 1) and the sprite streches.
How can I resize sprite with changing texture coordinates to (0, 0) - (2, 1.5) to fill all the background without "for" statements etc.?

I've read about sf::RenderTexture and method setRepeated(bool), but it is in SFML v2.0

Pages: 1 ... 14 15 [16]
anything