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

Pages: 1 2 [3]
31
Graphics / Textures and RenderTextures broken
« on: August 25, 2011, 07:23:49 pm »
I tried using a renderTexture earlier but the program would just close straight away.
I am also using a Texture like this:

Code: [Select]
#include "TitleScreen.hpp"

TitleScreen::TitleScreen()
{

}

TitleScreen::TitleScreen(sf::RenderWindow &App)
{
    app = &App;
    titleImage.LoadFromFile("./data/Title.png");
    titleImage.Bind();
}

TitleScreen::~TitleScreen(){}

void TitleScreen::Update()
{

}

void TitleScreen::Draw()
{
    app->Draw(sf::Sprite(titleImage ));
}


but I just et this image

32
DotNet / SFML.Net 2 for linux download?
« on: August 25, 2011, 12:38:13 am »
I wanted to use SFML.Net on linux but everytime I try using it I get the "cant open csfml..." error, I tried some solutions on here but I couldnt fix it so I wanted to know if anyone on here has some recent libraries built that I could get a copy of?

33
Graphics / Batch drawing?
« on: August 23, 2011, 11:41:02 pm »
I wanted to know if there was anyway to load up everything you want to draw and then draw it all at once, instead of making a draw call for each object.

The main performance losses that you have with graphic API's isnt the amount of objects to draw but the amount of draw calls and I wanted to know if there was a way of makingg all my sprite/shape draw calls into one?

If not are there any plans for this in the future?

34
Window / Getting supported resolutions.
« on: August 22, 2011, 06:19:53 pm »
I just wanted to know if SFML2 had any sort of way to get the supported resolutions?

I have done this in windows (to get the maximum supported resolution) by doing:

Code: [Select]
DEVMODE dmode;
dmode.dmSize = sizeof(DEVMODE);
dmode.dmDriverExtra = 0;

unsigned short maxWidthSupported = 0;
unsigned short maxHeightSupported = 0;

unsigned short imode = 0;

while(EnumDisplaySettings(NULL, imode, &dmode ) != 0)
{
if(dmode.dmPelsWidth > maxWidthSupported) maxWidthSupported = (unsigned short)dmode.dmPelsWidth;
if(dmode.dmPelsHeight > maxHeightSupported) maxHeightSupported = (unsigned short)dmode.dmPelsHeight;

imode++;
}

if(w > maxWidthSupported) w = maxWidthSupported;
if(h > maxHeightSupported) h = maxHeightSupported;

GlobalSettings::WindowWidth = w;
GlobalSettings::WindowHeight = h;


but Ideally I would like to have a cross platform solution.[/code]

35
Window / sf::Joystick and 360 controllers
« on: August 07, 2011, 03:09:19 am »
Hi I just wondered if sfml can work with 360 controllers as that way I could use it without the need for xInput (and more importantly cross platform)

If so does anyone know of any example code?

And if not are there any lightwaigh and cross platfor libraries that allow you to use 360 controller?

36
Window / SFML and hDC
« on: July 25, 2011, 05:28:23 pm »
Im trying to learn some OpenGL but I have reached the point where I would like to use functions and stuff that need the hDC or other low level things and I just wondered if SFML provides any way to get this?

37
Graphics / Get image subrect
« on: July 08, 2011, 03:37:34 am »
Hi, in my game I am creating an animation class,
The class will take in a spritesheet and on request return an image from that sheet.

However I am unsure as to how I can get part of the main image.
I did think of having a sprite which has the main image and then setting its subrect to what I want and then getting the sprites image, but from what I read this would just return the original image so I am not sure as to how I could do this.

I am also unsure of how I can get a sprites position after moving it.
If I use sprite::move then IIRC it moves the sprite to an offset from its original position, but when using getPosition this just returns its original position, so is there a way to get its current position?
Or would i just have to not use move and do something like:
sprite.setPosition(sprite.getPos().x +5, sprite.getPos().y -3);

38
Window / 2d to 3d on the run
« on: July 07, 2011, 06:37:15 pm »
Hi, I have an idea for a game and I just wondered if it would be possible.
For part of the game I will use normal sprites and images, but I would also like to use 3d stuff (models and such)
Now I only intend to have either 2d or 3d on screen in one level so I wouldnt be mixing it up.

Anyway I was just wondering is it possible to swap from a render window to a normal window without the end user noticing?

39
Graphics / Downsizing image without quality loss
« on: April 23, 2011, 07:48:54 pm »
Just wondering if theres anything in SFML that allows you to downsize without loosing quality.
In VS/XNA i use the generate mipmaps option in the content importer:



But i didnt  know if SFML had anything like it

40
DotNet / SFML 2 problem
« on: April 20, 2011, 04:58:29 pm »
Hi im trying to use SFML with C# but when i try to run my program i get:

Could not load file or assembly 'sfmlnet-window-2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I built the DLL's myself if it matters

41
SFML projects / Map generator (perlin noise)
« on: April 19, 2011, 06:26:09 pm »
Made a some what simple map generator using SFML and perlin noise
It basically takes the perlin noise and applies color to the values.

Anyway heres a screen:



And heres the page if you want to see more screenshots
http://richy1913.byethost22.com/projects/perlin-noise-map-generator/

Pages: 1 2 [3]