Hi
I have made a start on developing an OS X app but would prefer not to use the built in graphics frameworks, such as Quartz and Quicktime.
Hi
I have made a start on developing an OS X app but would prefer not to use the built in graphics frameworks, such as Quartz and Quicktime.
So what would be the most basic and fundamental way of controlling screen pixels within an OS X app?
Thanks
What's your rationale for this?
If you want portability, you could draw in a bitmap and blit that to the screen; the latter would obviously be OS-specific for each platform you port to.
OpenGL and GLSL. They are the building block for which the whole graphical system of Mac OS X is built.
If you are looking for something else could you give a few more details please? Hard to make a recommendation otherwise.
All I need to know for now is the simplest way to draw pixels based on my own functions.
In that case, definitely OpenGL and GLSL is what you are looking for. You'll have to work with contexts etc, but it is by far the easiest solution for pixel manipulation using pixel buffer objects and pixel shaders.
Edit : You won't be able to change random pixels outside of your application though. It would be limited to what is in your window or just when the application is fullscreen.
Ok I'll look into that, although maybe there is a way to do this without OpenGL?
Seems like overkill just to change one pixel.
ok I'll read up on this, so would applications like Photoshop be using Open GL?
You could write a GPU driver, load that instead of the Apple-supplied one, and have full access to the framebuffer that way 😉
I doubt very much Photoshop is using OpenGL. The reason for suggesting OpenGL was because you want to read pixels from the screen directly.
Anyway, painting programs like Photoshop don't manipulate screen pixels, they work with offscreen buffers instead. Manipulating screen pixels directly doesn't fit in at all well with the model/view way of doing things in 'windowed' applications.
b e n
That would be more appropriate I think, so long as it's not to difficult?
Any ideas how I would start this?
Ok, well I'm more interested in how a paint program would alter or 'cerate' pixels rather than doing pixel effects, which is what OpenGL seems especially good at.
Basically if I wanted to make an app that upon opening changed the top left pixel of the screen to white, how could this be written using as little code and as few frameworks as possible?
That would be more appropriate I think, so long as it's not to difficult?
Any ideas how I would start this?
That would be more appropriate I think, so long as it's not to difficult?
Any ideas how I would start this?
Uh, I was joking. Please don't do that.