Search found 248 matches

by arampl
Sun Dec 07, 2014 1:47 pm
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

Speed + cross-platformness + lightweightness are my main goal. Sorry for bad English. :)
by arampl
Sun Dec 07, 2014 1:36 pm
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

I will need extreme speed for object picking in the future because selection of several objects under cursor will be needed. So I will test selection after drawing each single object... EDIT: And I want universal way to do picking for whatever objects I'll deal with. Write code once and forget about...
by arampl
Sun Dec 07, 2014 1:33 pm
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

First of all, big thank you, guys! So many ideas, advices. Well, I explain little about project. (I work in Xubuntu 13.10 and use medit text editor). It will be someday "yet another LÖVE2D IDE" with content generation capabilities. As of now it can: - create/delete/drag&drop buttons (with caption) a...
by arampl
Sun Dec 07, 2014 6:11 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

Again. I still need to generate unique color for the mask of objects to differentiate them. In both methods. Objects not necessarily will be loaded from somewhere with prepared mask, they can be created inside application. And again love.graphics.setColor(k) is better then love.graphics.setColor(mat...
by arampl
Sun Dec 07, 2014 5:35 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

Oh! I like that idea with alpha = 0 and positive rgb values. Thank you! Will check it.

It seems that all my code useless at all.
by arampl
Sun Dec 07, 2014 5:27 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

Then how can I recognize which star was pressed if it will be only outlined and not filled? Like in vector editor for example.

EDIT: Oops. It can't be done with my method either...
by arampl
Sun Dec 07, 2014 5:17 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

OK. May be I'm reacting too fast, sorry! I'll check on it more carefully.
by arampl
Sun Dec 07, 2014 5:09 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

You simply test rectangular region + alpha. It will not work on non-rectangular objects, like buttons inside ellipse in IWD2 interface, because rectangular regions for them will cross each other. The IWD2 interface can be made exactly like the example I posted. It works for overlapping objects. Did...
by arampl
Sun Dec 07, 2014 5:07 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

Now, try your code with this stars:
by arampl
Sun Dec 07, 2014 5:04 am
Forum: Support and Development
Topic: Wrappers for glReadPixel, glColor3uiv / glColor4uiv
Replies: 46
Views: 8501

Re: Wrappers for glReadPixel, glColor3uiv / glColor4uiv

See this cross-section between two buttons? Which will be pressed if mouse cursor will be inside it?
It's just simple example.