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 - Cuban-Pete

Pages: 1 [2] 3 4 5
17
Graphics / setParameter not working?
« on: July 08, 2011, 08:01:09 pm »
Yes, the problem is solved. Changing to uniform made it work.  :oops:

I also tried to write sf::Err() to a txt file, but only got numbers. I think the flag is off?

I did it this way:

Code: [Select]

std::ofstream file;
file.open("debug.txt");
file << "Error: " << sf::Err();
file.close();

18
Graphics / setParameter not working?
« on: July 07, 2011, 07:55:24 pm »
Where is that error output?  :roll:

I shall try uniforms, thanks.  :)

19
Graphics / CopyScreen y position not working
« on: July 07, 2011, 07:53:37 pm »
I use SFML 2.

If you cut the screen in 4 even parts and try to get the bottom right one with the copyscreen function, it wont work.

Or perhaps it has to do with the opengl perspective?

20
General / Button effect
« on: July 07, 2011, 06:40:04 pm »
I do it this way:

check for a click with mouse and that it is released.

start a function that gets mouse position and button position.

the function checks if the mouse is in the button position and if so, it updates the button struct bool for highlight or the pressed down effect.

struct button{
 string text;
 float x;
 float y;
 float width;
 float height;
 bool active;
 bool pressed;
};

during the "drawing loop" a different function gets the button struct and displays the button with the effects.

something like that. :) I hope it helps a little.

21
Graphics / setParameter not working?
« on: July 07, 2011, 06:32:32 pm »
The virus warning doesn't mather to me right now, but the parameter problem does. Did you try the example code and could you reproduce it?  :)

22
Graphics / CopyScreen y position not working
« on: July 07, 2011, 06:30:54 pm »
Nobody has this problem?  :roll:

23
Graphics / CopyScreen y position not working
« on: July 04, 2011, 07:30:21 pm »
Hi,

I'm using CopyScreen and the y position is off.

I tried to fix it to change this line in the source code:

Code: [Select]
   GLCheck(glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, srcRect.Left, srcRect.Top + myHeight, myWidth, myHeight));

The glCopyTexSubImage2D function starts at the left bottom and not the top left position. My fix however does not work, somehow it goes higher than it should...  :roll:

24
SFML projects / [RELEASED] SFMLUploads.Org
« on: July 03, 2011, 10:13:33 pm »
Quote from: "Hiura"
So let's share!  :)
 |
\/
-------------------------------------------------------
First Rule of Program Optimization : Don't do it !
Suport www.sfmluploads.org by using it.

SFML / OS X developer


It's "support" and the link goes to a "error" page, this one would be better: https://legacy.sfmluploads.org/index.php

just saying..  :roll:  :roll:

25
Graphics / setParameter not working?
« on: July 03, 2011, 06:16:54 pm »
I modified the window example to this: https://legacy.sfmluploads.org/index.php?page=view_code&id=42

It gets even crazier...  :shock: ... after compiling I get this message from my virus protector:


//the shader is the one above in shader.txt - but I guess you figured that out already

26
Graphics / setParameter not working?
« on: July 03, 2011, 03:59:49 pm »
I cannot get it to work. I have this very very complicated shader... :P

Code: [Select]

varying vec4 normalColor;

void main( void )
{  
   gl_FragColor = normalColor;
}


and I have this in my program:

Code: [Select]
sf::Shader shader;
if(!shader.LoadFromFile("shader.txt")){
return 0;}
if(shader.IsAvailable()) info = " shader available";
shader.SetParameter("normalColor", 1.f, 0.f, 0.f, .5f);


I also use:
Code: [Select]

shader.Bind(); //move into function?
// opengl stuff
shader.Unbind(); //move into function?


I know the shader is working because IsAvailable return true and my opengl content is completely black.

27
SFML projects / [RELEASED] SFMLUploads.Org
« on: July 02, 2011, 12:53:02 pm »
I tried uploading a file that is not allowed, after 10min of uploading I finally got the message...

Quote
File-extension not allowed!


Perhaps better to first check the extension before uploading.

28
SFML projects / SFML / Box2D Demo
« on: July 02, 2011, 12:29:14 pm »
Haha, this is awesome! :D A reset/restart option would be nice.


29
SFML projects / [RELEASED] SFMLUploads.Org
« on: July 01, 2011, 03:13:05 pm »
hehe, you should install an anti junk c++ code filter, now it allowed me to upload my crappy code...  :P

https://legacy.sfmluploads.org/index.php?page=view_code&id=41

works pretty nice and fast:

30
SFML projects / Groogy's Game Engine
« on: June 30, 2011, 08:37:27 am »
camstudio works decent.

Pages: 1 [2] 3 4 5
anything