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

Pages: [1]
1
General / Re: sfml growing memory usage
« on: September 20, 2014, 10:12:40 am »
problem still exsist with


def text(msg,pos,c,s):
   
    create a text
    text = sf.Text(msg)

i print lot of text on screen and this causes memory grow rapidly

2
General / Re: sfml growing memory usage
« on: September 20, 2014, 08:37:04 am »
ha ha i find solution


sq=sf.graphics.RectangleShape()  <--- if this hapens every frame memory grows
def square(pos, angle,size):
    global sq
   
    sx=size.x
    sy=size.y
    sq.size=sf.Vector2(sx, sy)
    sq.fill_color=sf.Color.RED    

    sq.rotation=angle
    sq.position=pos
    window.draw(sq)

3
General / sfml growing memory usage
« on: September 19, 2014, 03:53:33 pm »
i realize my sfml constantly growing memory usage even for simple rectangle drawing
aprox 1000k /sec
and wery soon get in task menegers top list off all apps runing on my pc

import sfml as sf

# create the main window
window = sf.RenderWindow(sf.VideoMode(640, 480), "pySFML Window")





def square(pos, angle,size):
    sq=sf.graphics.RectangleShape()
   
    sx=size.x
    sy=size.y
    sq.size=sf.Vector2(sx, sy)
    sq.fill_color=sf.Color.RED    

    sq.rotation=angle
    sq.position=pos
    window.draw(sq)
    sq=0
   
# start the game loop
while window.is_open:
    # process events
    for event in window.events:
        # close window: exit
        if type(event) is sf.CloseEvent:
            window.close()

    window.clear() # clear screen
   
    square(sf.Vector2(10, 10),0,sf.Vector2(10, 10))

    window.display() # update the window

4
Graphics / Re: how to get pixel color ??
« on: September 10, 2014, 12:28:24 pm »
Thanks. Hope this will work. I use pysfml there litl bit different names .. but i figured this out :)

5
Graphics / Re: how to get pixel color ??
« on: September 10, 2014, 11:43:31 am »
i cant find actualy how to copy from renderTexture to image. in google ewery body says look in doc but there actualy nothing similar

there are functions to copy from memory from file stream etc..

6
Graphics / how to get pixel color ??
« on: September 10, 2014, 11:16:48 am »
is there simple fast way to get pixel data at given position ???   aka    pcolor(x,y)


i need to read colordatta  form allredy drawn screen

Pages: [1]
anything