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

Pages: 1 2 3 [4] 5 6 ... 13
46
General / Bloom effect without rendertargets
« on: December 24, 2011, 01:50:49 am »
Hi, is there anyway to achieve a bloom effect without the use of renderTargets?
I am currently using an intel graphics card and having a rendertarget makes the progrm crash

47
SFML projects / Divided - My LD22 Entry
« on: December 22, 2011, 06:57:30 am »
trying to build it as runnning it doesnt work.
I get this on the final build:

Code: [Select]
richy@R-Laptop:~/Desktop/Divided$ g++ -o Divided main.cpp obj/bin/tinystr.o obj/bin/tinyxml.o obj/bin/tinyxmlerror.o obj/bin/tinyxmlparser.o obj/bin/util/AnimateSprite.o obj/bin/util/helper.o obj/bin/sfx_jump_ogg.o Door.cpp Player.cpp PlayerW.cpp SplashScreenWorld.cpp SettingsPanel.cpp MainMenuWorld.cpp LevelWorld.cpp EndingWorld.cpp CreditsWorld.cpp TextOverlay.cpp Spike.cpp Lever.cpp Block.cpp MovingBlock.cpp FallingBlock.cpp -lsfml-window -lsfml-graphics -lsfml-audio -lsfml-system
/usr/bin/ld: Warning: size of symbol `TiXmlString::TiXmlString()' changed from 14 in obj/bin/tinystr.o to 21 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlString::TiXmlString(char const*)' changed from 91 in obj/bin/tinyxml.o to 110 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlString::~TiXmlString()' changed from 19 in obj/bin/tinystr.o to 26 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlCursor::TiXmlCursor()' changed from 19 in obj/bin/tinyxml.o to 26 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::TiXmlBase()' changed from 41 in obj/bin/tinyxml.o to 53 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 40 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 40 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlBase::~TiXmlBase()' changed from 30 in obj/bin/tinyxml.o to 46 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::TiXmlAttribute()' changed from 88 in obj/bin/tinyxml.o to 109 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlComment::TiXmlComment()' changed from 36 in obj/bin/tinyxml.o to 42 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlText::TiXmlText(char const*)' changed from 89 in obj/bin/tinyxml.o to 114 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlDeclaration::TiXmlDeclaration()' changed from 78 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlUnknown::TiXmlUnknown()' changed from 36 in obj/bin/tinyxml.o to 42 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::~TiXmlAttribute()' changed from 79 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: Warning: size of symbol `TiXmlAttribute::~TiXmlAttribute()' changed from 30 in obj/bin/tinyxml.o to 90 in obj/bin/tinyxmlparser.o
/usr/bin/ld: i386:x86-64 architecture of input file `obj/bin/tinyxmlparser.o' is incompatible with i386 output
obj/bin/tinyxmlparser.o: In function `TiXmlBase::ReadName(char const*, TiXmlString*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x72b): undefined reference to `TiXmlString::assign(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlBase::ReadText(char const*, TiXmlString*, bool, char const*, bool, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0xd1b): undefined reference to `TiXmlString::append(char const*, unsigned long)'
tinyxmlparser.cpp:(.text+0xe4d): undefined reference to `TiXmlString::append(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlNode::Identify(char const*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x1410): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x1473): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x14d6): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x1554): undefined reference to `operator new(unsigned long)'
tinyxmlparser.cpp:(.text+0x15d3): undefined reference to `operator new(unsigned long)'
obj/bin/tinyxmlparser.o:tinyxmlparser.cpp:(.text+0x1617): more undefined references to `operator new(unsigned long)' follow
obj/bin/tinyxmlparser.o: In function `TiXmlComment::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)':
tinyxmlparser.cpp:(.text+0x20f1): undefined reference to `TiXmlString::append(char const*, unsigned long)'
obj/bin/tinyxmlparser.o: In function `TiXmlString::init(unsigned long, unsigned long)':
tinyxmlparser.cpp:(.text._ZN11TiXmlString4initEmm[TiXmlString::init(unsigned long, unsigned long)]+0x43): undefined reference to `operator new[](unsigned long)'
collect2: ld returned 1 exit status


Any chance we could get a makefile for linux, or even better codeblocks project :D

48
General discussions / New graphics API ready
« on: December 19, 2011, 04:26:01 pm »
Think I have managed to get it working now :D

BTW do you thnk the whole intel rendertarget bug will be fixed with the release of SFML2?

49
General discussions / New graphics API ready
« on: December 17, 2011, 03:27:52 pm »
compiled the debug shader example and:

Code: [Select]
(gdb) run
Starting program: /home/richy/Desktop/SFML2a/examples/shader/shader-d
[Thread debugging using libthread_db enabled]
/home/richy/Desktop/SFML2a/examples/shader/shader-d: symbol lookup error: /home/richy/Desktop/SFML2a/examples/shader/shader-d: undefined symbol: _ZN2sf6ShaderC1ERKS0_
[Inferior 1 (process 12155) exited with code 0177]

50
General discussions / New graphics API ready
« on: December 15, 2011, 02:09:56 pm »
Code: [Select]
richy@R-Laptop:~/Desktop/LaurentGomila-SFML-78e1e87/make/examples/shader$ gdb ./shader
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/richy/Desktop/LaurentGomila-SFML-78e1e87/make/examples/shader/shader...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/richy/Desktop/LaurentGomila-SFML-78e1e87/make/examples/shader/shader
[Thread debugging using libthread_db enabled]
[Inferior 1 (process 4080) exited with code 01]
(gdb)


tried building the debug version but got this:
CMake Error at CMakeLists.txt:133 (add_subdirectory):
  add_subdirectory given source "examples" which is not an existing
  directory.

51
General discussions / New graphics API ready
« on: December 14, 2011, 01:10:43 pm »
No error message on the shader example but the window just opens and closes now

52
General discussions / New graphics API ready
« on: December 14, 2011, 03:24:36 am »
just tried running the shader example but i get this:

Code: [Select]

./shader
Failed to compile fragment shader:
0:27(31): error: Could not implicitly convert operands to arithmetic operator
0:27(31): error: Operands to relational operators must be scalar and numeric
0:27(31): error: if-statement condition must be scalar boolean


53
Graphics / Texture fails in custom openGL
« on: December 12, 2011, 02:59:55 am »
Im trying to use sf::Textures with custom openGL but I get these errors:

An internal OpenGL call failed in Texture.cpp (418) : GL_INVALID_VALUE, a numeric argument is out of range

When loading the image, and:

An internal OpenGL call failed in Texture.cpp (352) : GL_INVALID_OPERATION, the specified operation is not allowed in the current state

When calling sf::Texture.Bind()

54
General discussions / New graphics API ready
« on: December 11, 2011, 07:06:08 pm »
Quote from: "Laurent"
Quote
Any chance this could be pushed into the current SFML2 dev build?
Or is it possible to just take the new shader.hpp/cpp and swap them with current SFML2 dev build?

Vertex shaders don't make sense with the old graphics API, so I won't push them alone in the master branch. And no, you can't use the new version without the new API.
But why don't you switch to the new API anyway? It's just a matter of weeks before it becomes official.

Quote
However I have a problem with my particle systems which use OpenGL and sf::Texture. Nothing is drawn anymore.

I think we'll need a complete/minimal code ;)
By the way, have you tried to use sf::VertexArray instead of OpenGL? Unless you do something very specific, you should now be able to implement particle systems with SFML only.


True, im using pure openGL the actuall API wouldnt bother me too much tbh i just wanted a wrapper around shaders that isnt my ugly code :P
I take it this https://github.com/SFML/SFML/tree/drawables is the new API

55
General discussions / New graphics API ready
« on: December 11, 2011, 06:11:54 pm »
Quote from: "Laurent"
I've pushed the support for vertex shaders, as well as an upgrade of the "shader" example.


Any chance this could be pushed into the current SFML2 dev build?
Or is it possible to just take the new shader.hpp/cpp and swap them with current SFML2 dev build?

56
System / Threads inside classes
« on: December 10, 2011, 06:04:15 pm »
Im trying to integrate a thread into the image loading class, but im getting errors
using this code

Code: [Select]


class TextureResourceManager
{void LoadFiles();
    sf::Thread imgThread;
};

TextureResourceManager::TextureResourceManager():
imgThread(&TextureResourceManager::LoadFiles)
{

}


gives me:
Quote

||=== Agame, Debug ===|
/usr/local/include/SFML/System/Thread.inl||In member function ‘void sf::priv::ThreadFunctor<T>::Run() [with T = void (TextureResourceManager::*)()]’:|
/home/richy/codeblocks/Agame/src/TextureResourceManager.cpp:73|1|instantiated from here|
/usr/local/include/SFML/System/Thread.inl|39|error: must use ‘.*’ or ‘->*’ to call pointer-to-member function in ‘((sf::priv::ThreadFunctor<void (TextureResourceManager::*)()>*)this)->sf::priv::ThreadFunctor<void (TextureResourceManager::*)()>::myFunctor (...)’, e.g. ‘(... ->* ((sf::priv::ThreadFunctor<void (TextureResourceManager::*)()>*)this)->sf::priv::ThreadFunctor<void (TextureResourceManager::*)()>::myFunctor) (...)’|
||=== Build finished: 1 errors, 0 warnings ===|


57
Graphics / SFML vs Polycode
« on: December 08, 2011, 07:08:18 pm »
Polycode gives you more built in stuff(like physics and such) and is more game oriented,
SFML gives you access to the hardware and has some helper classes but essentially leaves all the main coding stuff to you.

I will say tho that las time i spoke to the polyocde guy and mentioned some serious memory leaks he just shrug it off and said,"there fine the OS takes care of any memory leak"

58
General / Linux failed to build SFML
« on: December 08, 2011, 06:47:12 pm »
I have notced some more problems when it comes to SFML2 and linux,
usiing the following code:

Code: [Select]
#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{

    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");

    sf::Texture tex;
    tex.LoadFromFile("ship.png");

    sf::Sprite spr = sf::Sprite(tex);

    sf::Shader bloom;
    bloom.LoadFromFile("Bloom.fx");

    bloom.SetParameter("amount", 0.6f);
    bloom.SetParameter("blurSize", 0.5f / 800);

    sf::RenderTexture bloomImage;
    bloomImage.Create(800,600);

    sf::Sprite bloomSprite = sf::Sprite(bloomImage.GetTexture());

    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.PollEvent(Event))    if (Event.Type == sf::Event::Closed)    App.Close();

        App.Clear();
        bloomImage.Clear(sf::Color(0.f,0.f,0.f,0.f));


        bloomImage.Draw(spr, bloom);
        bloom.SetParameter("horizontal", 0);
        bloomImage.Display();

        App.Draw(bloomSprite, bloom);
        bloom.SetParameter("horizontal", 1);

        App.Display();
    }
    return 0;
}


and shader
Code: [Select]

#version 120

uniform float blurSize;
uniform float amount;
uniform sampler2D texture;
uniform float horizontal;

void main()
{
vec4 sum = vec4(0.0);

   float gaussian[17] = float[17] (0.148, 0.145, 0.136, 0.123, 0.107, 0.090, 0.072, 0.055, 0.041, 0.029, 0.020, 0.013, 0.008, 0.005, 0.003, 0.002, 0.001);
   int length = gaussian.length();

   for (int i = -length + 1; i < length; i++)
   {
vec2 coords = vec2(gl_TexCoord[0].x - i * blurSize, gl_TexCoord[0].y);
if (horizontal == 0)
coords = vec2(gl_TexCoord[0].x, gl_TexCoord[0].y - i * blurSize);

sum += texture2D(texture, coords) * gaussian[int(abs(i))] * 0.5;
   }

float avg = dot(sum.rgb, vec3(0.299, 0.587, 0.114));
sum = vec4(avg, avg, avg, 1);

   vec4 col = (sum * sum * amount) + texture2D(texture, gl_TexCoord[0].xy);

   gl_FragColor = col;
}


It exits with error code 1, when i use gdb to debug and set a break point at exit I got this:
Code: [Select]

Reading symbols from /home/richy/codeblocks/anoy/bin/Debug/anoy...done.
(gdb) b exit
Function "exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (exit) pending.
(gdb) b _exit
Function "_exit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 2 (_exit) pending.
(gdb) b exit()
Function "exit()" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 3 (exit()) pending.
(gdb) run
Starting program: /home/richy/codeblocks/anoy/bin/Debug/anoy
[Thread debugging using libthread_db enabled]

Breakpoint 1, __GI_exit (status=1) at exit.c:99
99 exit.c: No such file or directory.
in exit.c
(gdb) bt
#0  __GI_exit (status=1) at exit.c:99
#1  0x00855697 in _intel_batchbuffer_flush ()
   from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#2  0x008594f0 in intel_flush () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#3  0x00859532 in ?? () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#4  0x009354b0 in _mesa_flush () from /usr/lib/i386-linux-gnu/dri/libdricore.so
#5  0x00935bce in _mesa_Flush () from /usr/lib/i386-linux-gnu/dri/libdricore.so
#6  0x00167ac1 in sf::priv::RenderTextureImplFBO::UpdateTexture (
    this=0x8b5cc50)
    at /home/richy/Desktop/LaurentGomila-SFML-09854ba/src/SFML/Graphics/RenderTextureImplFBO.cpp:140
#7  0x001670e0 in sf::RenderTexture::Display (this=0xbfffdb00)
    at /home/richy/Desktop/LaurentGomila-SFML-09854ba/src/SFML/Graphics/RenderTexture.cpp:115
#8  0x080494e0 in main () at /home/richy/codeblocks/anoy/main.cpp:40
(gdb)


Also in linux I have noticed that unless you load textures once the current window has been created they are broken, however in windows you can load textures at any time and the images will be fine. not sure if this is meant to happen or what

59
Graphics / sf::Texture and OpenGL
« on: December 01, 2011, 10:44:59 pm »
no, but if I used renderTextures then they would

60
Graphics / sf::Texture and OpenGL
« on: December 01, 2011, 08:12:25 pm »
Yea but you mentioned that it wasnt good to call sf::Texture.getImage() each frame as it takes quite a bit of resources to swap from GPU to CPU, so I was wondering how you use the sf::Texture straight away

Pages: 1 2 3 [4] 5 6 ... 13
anything