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

Pages: [1]
1
Graphics / Using OpenGL with SFML 2.0
« on: September 18, 2012, 03:13:25 am »
So I want to get into 3D graphics, and after a few weeks of studying and writing a little 3D engine using a shit ton of matrix mathematics and SFML 2; I feel that I am finally ready to make the switch over to OpenGL. So my "mentor" if you will who has pretty much taught me how to program wrote some tutorial code for me in SFML 1.6.

(Here are the first two tutorials):
http://pastebin.com/u8zzhggQ
http://pastebin.com/Qwv7mz7i

After switching the SFML 1.6 code over to SFML 2, I compiled to check the results. Everything apparently compiled correctly but the windows don't draw anything like they're supposed to. They only fade from black to white, then white to black and so on and so forth. After asking my "mentor" he said he had no idea, and that it probably had something to do with SFML 2. So here I am, asking the true SFML experts what might possibly be wrong.
Thanks for at least taking the time to read this!
++ZAID++

2
Graphics / Re: SFML 2.0 Graphics linking error
« on: August 25, 2012, 11:29:44 pm »
Everything is explained in the tutorial. Check here for VS.

BTW, a lot of things have changed since 1.6. Before you had to define SFML_DYNAMIC to use dynamic libraries, now you do it for the static version.

And by doing that... this happens:
1>------ Build started: Project: SFML2Test, Configuration: Debug Win32 ------
1>  main.cpp
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) already defined in libcpmtd.lib(stdthrow.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in main.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in main.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in main.obj
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in libcpmtd.lib(xthrow.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __CrtDbgReportW already defined in LIBCMTD.lib(dbgrptw.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __lock_file already defined in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __unlock_file already defined in LIBCMTD.lib(_file.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _ungetc already defined in LIBCMTD.lib(ungetc.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _memcpy_s already defined in LIBCMTD.lib(memcpy_s.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _feof already defined in LIBCMTD.lib(feoferr.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _ldexp already defined in LIBCMTD.lib(_ldexp_.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _tolower already defined in LIBCMTD.lib(tolower.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>S:\Users\Logan\documents\visual studio 2010\Projects\SFML2Test\Debug\SFML2Test.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

3
Graphics / Re: SFML 2.0 Graphics linking error
« on: August 25, 2012, 11:08:31 pm »
The fact that the error messages indicate that the linker is still looking for __declspec(dllimport) functions means that you didn't define SFML_STATIC properly.

I'm not sure I understand? I never had this problem in SFML 1.6. How would I define SFML_STATIC?

4
Graphics / SFML 2.0 Graphics linking error
« on: August 23, 2012, 04:20:18 am »
#include <iostream>
#include <SFML/Graphics.hpp>

#ifdef _DEBUG
#pragma comment (lib, "sfml-system-s-d.lib")
#pragma comment (lib, "sfml-window-s-d.lib")
#pragma comment (lib, "sfml-graphics-s-d.lib")
#else
#pragma comment (lib, "sfml-system-s.lib")
#pragma comment (lib, "sfml-window-s.lib")
#pragma comment (lib, "sfml-graphics-s.lib")
#endif

int main()
{
   sf::RenderWindow App(sf::VideoMode(640, 480, 32), "SFML 2.0 Test");
   sf::Event Event;
   
   sf::Texture texture;
   texture.loadFromFile("media/person.PNG");

   sf::Sprite Sprite;
   Sprite.setTexture(texture);
   Sprite.setPosition(100, 100);

   while(App.isOpen())
   {
      while (App.pollEvent(Event))
         {
             // Close window : exit
             if (Event.type == sf::Event::Closed)
                 App.close();
         }

      App.clear();
      App.draw(Sprite);
      App.display();
   }

   return 0;
}


--------------------------------------------------------------------------------------------------------

So this is the chunk of code I am trying to compile. I have it all statically linked and I've defined so in VC++ 2010's properties or whatever. So all of that is correct. I have the latest version of 2.0 for VC++ 2010 installed on my computer. But yet, every time I still get this error.

--------------------------------------------------------------------------------------------------------

1>------ Rebuild All started: Project: SFML2Test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" (__imp_??1Sprite@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Transformable::setPosition(float,float)" (__imp_?setPosition@Transformable@sf@@QAEXMM@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::setTexture(class sf::Texture const &,bool)" (__imp_?setTexture@Sprite@sf@@QAEXABVTexture@2@_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" (__imp_??0Sprite@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" (__imp_?loadFromFile@Texture@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$Rect@H@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>S:\Users\Logan\documents\visual studio 2010\Projects\SFML2Test\Debug\SFML2Test.exe : fatal error LNK1120: 18 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


--------------------------------------------------------------------------------------------------------

Any ideas? Thank you very much for taking the time to read and possibly respond.

5
Graphics / Re: Buffers?
« on: July 12, 2012, 11:13:22 pm »
Quote
You have to #define SFML_STATIC.

...wat?  :-[

6
Graphics / Re: Buffers?
« on: July 12, 2012, 04:50:31 am »
Alright guys / gals. So I've updated to SFML 2.0. I have the libraries statically linked using pragma comments, the project properties set to use static linking rather than .dll's and everything installed how it's supposed to be. And I am coming across some errors.

Here is the code:
#include <SFML/Graphics.hpp>
#include <SFML/Graphics/RenderTexture.hpp>
#include <iostream>
#include <string>

#ifdef _DEBUG
#pragma comment (lib, "sfml-system-s-d.lib")
#pragma comment (lib, "sfml-window-s-d.lib")
#pragma comment (lib, "sfml-graphics-s-d.lib")
#else
#pragma comment (lib, "sfml-system-s.lib")
#pragma comment (lib, "sfml-window-s.lib")
#pragma comment (lib, "sfml-graphics-s.lib")
#endif

int main()
{
   sf::RenderWindow App(sf::VideoMode(600, 400, 32), "Cyrus");
   App.setVerticalSyncEnabled(true);
   App.setFramerateLimit(100);

   sf::RenderTexture shit;
   shit.setSmooth(false);
   sf::Event Event;
   
   sf::Texture Image;
   sf::Sprite Sprite;
   Image.loadFromFile("ruth_base.PNG");
   Image.setSmooth(false);
   Sprite.setTexture(Image);

   while(App.isOpen())
   {
      while(App.pollEvent(Event)){
         if (Event.type == sf::Event::Closed)
            App.close();
         if ((Event.type == sf::Event::KeyPressed) && (Event.key.code == sf::Keyboard::Escape))
            App.close();
      }

      shit.clear();
      App.clear();

      shit.draw(Sprite);
      shit.display();
      App.display();
   }
   return 0;
}


And here are the errors:
1>------ Build started: Project: Aperture-Labrotories, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderTexture::~RenderTexture(void)" (__imp_??1RenderTexture@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" (__imp_??1Sprite@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTexture::display(void)" (__imp_?display@RenderTexture@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::setTexture(class sf::Texture const &,bool)" (__imp_?setTexture@Sprite@sf@@QAEXABVTexture@2@_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Texture::setSmooth(bool)" (__imp_?setSmooth@Texture@sf@@QAEX_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::loadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" (__imp_?loadFromFile@Texture@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$Rect@H@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" (__imp_??0Sprite@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTexture::setSmooth(bool)" (__imp_?setSmooth@RenderTexture@sf@@QAEX_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderTexture::RenderTexture(void)" (__imp_??0RenderTexture@sf@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::setFramerateLimit(unsigned int)" (__imp_?setFramerateLimit@Window@sf@@QAEXI@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::setVerticalSyncEnabled(bool)" (__imp_?setVerticalSyncEnabled@Window@sf@@QAEX_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>S:\Users\Logan\documents\visual studio 2010\Projects\Aperture-Labrotories\Debug\Aperture-Labrotories.exe : fatal error LNK1120: 24 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I've asked a couple friends and no one seems to have an answer for me. Any thoughts?
Also if someone could give me the lowdown on how to draw RenderTextures to a RenderWindow, that would be amazing. Since obviously RenderTextures aren't drawables. :I

7
Graphics / Re: Buffers?
« on: July 11, 2012, 05:32:57 pm »
Tiles will NOT change once the floor has been set down, And I just installed SFML 2 and am toying around with it now. I'm not seeing any sort of sf::RenderTexture, or sf::VertexArray :/

EDIT: Found .hpp but it's not a class type or whatever? I don't know.

RTFM: sf::RenderTexture & sf::VextexArray

If you can't work with them in your project, then you're still using the old heards/libraries, change the settings in the project/make file.

I don't think that's so... I've dumped all the header and libraries into an SFML2 folder inside of the lib and include folders in VC. And I'm calling out all the headers specifically from SFML2/x.hpp, and same with the libraries.

#include <SFML2/Graphics.hpp>
#include <SFML2/Graphics/RenderTexture.hpp>
#include <iostream>
#include <string>

#ifdef _DEBUG
#pragma comment (lib, "SFML2/sfml-system-s-d.lib")
#pragma comment (lib, "SFML2/sfml-window-s-d.lib")
#pragma comment (lib, "SFML2/sfml-graphics-s-d.lib")
#else
#pragma comment (lib, "SFML2/sfml-system-s.lib")
#pragma comment (lib, "SFML2/sfml-window-s.lib")
#pragma comment (lib, "SFML2/sfml-graphics-s.lib")
#endif

int main()
{
   sf::RenderTexture shit;
   return 0;
}


There's nothing in project properties that has anything to do with SFML as far as I know.

8
Graphics / Re: Buffers?
« on: July 11, 2012, 05:16:31 pm »
For this I'd rather go with sf::VertexArray. sf::RenderTexture is limited by the maximum size of texture supported by the graphics card, and the result cannot be easily edited after it is created.
The texture size is a limit which should be worked around (not letting it grow to unreasonable sizes) but the question is rather, will the tiles have to change?
If not then drawing hundrets of vertices with their own textures (or sprite sheet) seems to me kind of extrem if you could just draw a few textures instead.
But then again GPUs are build to draw not only hundrets but thousands of vertices and you get a way more flexible system with a vertex array. :D

Is there no way I can Implement these features of 2.0 into 1.6?
Implementing those features would set you way further back, than just switch to SFML 2 and investing some good time into your future. ;)

Tiles will NOT change once the floor has been set down, And I just installed SFML 2 and am toying around with it now. I'm not seeing any sort of sf::RenderTexture, or sf::VertexArray :/

EDIT: Found .hpp but it's not a class type or whatever? I don't know.

9
Graphics / Re: Buffers?
« on: July 11, 2012, 04:50:28 pm »
No, unless you use OpenGL directly.

There's no tutorial yet, but you can read the online API doc and the forum (and then ask more questions of course). There's nothing complicated:
- sf::RenderTexture has the same API as sf::RenderWindow, the only difference is that it draws to a texture
- sf::VertexArray is just like an array of sprites, except that the definition of the quads and their texture coordinates is more low-level

Well I guess I really should update...

10
Graphics / Re: Buffers?
« on: July 11, 2012, 04:16:53 pm »
Is there anyway I can do any of these things inside of SFML 1.6?
Learning all the new concepts in SFML 2.0 without a really complete tutorial on the thing seems pretty daunting. Is there no way I can Implement these features of 2.0 into 1.6?

11
Graphics / Buffers?
« on: July 11, 2012, 03:28:54 pm »
So I've been working with the SFML Graphics package for close to 6 months now, and from what I've noticed there is no way to actually create and draw an actual buffer. The RenderWindow has a built in buffer that you can draw to, and then the RenderWindow prints the built-in buffer to the screen. I'm assuming I would have to delve into the OpenGL side of things for this, which I am completely clueless in.

The problem being...  I am trying to make a game with a randomly generated dungeon. As doing such... I need very large floors with a TON of tiles placed dynamically. Some need to be normal, others cracked, and others mossy all scattered about at random intervals. And this system works fine all up until I create a room with a sizable floor... The thing will drop from roughly 60FPS (using the framerate limit and verticalsnyc, the game runs at roughly 4000FPS without the flooring or the limitations) to about 10FPS. And maybe it's just a hunch... I'm thinking it has to do with the massive amounts of tiles needing to be rendered in a single frame. So I was thinking we can draw all these tiles to a buffer upon startup, and then keep rendering the buffer rather than each individual tile.

So like I said I am very clueless about OpenGL, so if someone could tell me how this whole buffer thing could be done / at least point me in the right direction... That would be very kind of you.
Thanks
++Zaid

Pages: [1]
anything