The transform is a reasonable way to go. You can also change the contentMode to
get scaling for free. Fundamentally this all ends up as a texture draw on the
GPU so how you get the geometry for the draw there is nearly irrelevant.
The major performance gain from OpenGL (or Metal) in this case
On Nov 25, 2016, at 10:38 AM, Andreas Falkenhahn wrote:
> On 25.11.2016 at 16:29 David Duncan wrote:
>
>> The fastest method without OpenGL is to work with CGImage directly
>> and assign the image as the contents of a CALayer.
>
>> This will engage CoreAnimation t
On 25.11.2016 at 16:29 David Duncan wrote:
> The fastest method without OpenGL is to work with CGImage directly
> and assign the image as the contents of a CALayer.
> This will engage CoreAnimation to use the hardware to scale the
> image, but is still not quite as fast as OpenGL
The fastest method without OpenGL is to work with CGImage directly and assign
the image as the contents of a CALayer.
This will engage CoreAnimation to use the hardware to scale the image, but is
still not quite as fast as OpenGL for the same task.
Roughly you'll want to look at CGImageCreate
done using the GPU. But how can I
force iOS to draw and scale using the GPU without using OpenGL?
I've tried using CGContextDrawImage() but this is really slow, probably because
everything is done using the CPU.
I've also had a look at the CIImage APIs because these are apparently GPU
optimized
> On Jun 18, 2016, at 11:04 AM, Richard Charles wrote:
>
> So I think the takeaway is that draw calls operate within a graphic context.
> If the context you want and need is the current context then you are good to
> go.
Just to reiterate, if the context you want to
iew, because you are not
> really drawing in the view or even in the window. You are drawing in a
> separate "surface" that is normally in a layer above the window. See
> NSOpenGLCPSurfaceOrder.
A typical implementation of lockFocus for use with OpenGL might look like this.
- (void)l
> On Jun 11, 2016, at 7:13 AM, Stefano Pigozzi <stefano.pigo...@gmail.com>
> wrote:
>
> If using double buffering, do you have any idea if I can just lockFocus
> before calling `CGLFlushDrawable` and unlockFocus after it? Or do I have to
> wrap all the OpenGL calls dr
On 2015 Sep 22, at 19:51, Greg Parker <gpar...@apple.com> wrote:
> But at some point the timer callback will provoke an OpenGL buffer swap, and
> that will block until the next retrace when vertical synchronization is
> enabled. The gated buffer swap inside the timer callb
With Wizards For It Makes Us Soggy And Hard To Light.
On Tue, Sep 22, 2015 at 7:51 PM, Greg Parker <gpar...@apple.com> wrote:
>
>> On Sep 22, 2015, at 6:56 PM, Jerry Krinock <je...@ieee.org> wrote:
>>
>> In Apple document QA1385, in Listing 2, describing how to drive Op
In Apple document QA1385, in Listing 2, describing how to drive OpenGL
Rendering Loops 10 years ago, an NSTimer, repeating every 1 millisecond, is
added to an app’s run loop [1]. Referring to this timer, the text says that:
"When vertical synchronization is enabled in your OpenGL applic
> On Sep 22, 2015, at 6:56 PM, Jerry Krinock <je...@ieee.org> wrote:
>
> In Apple document QA1385, in Listing 2, describing how to drive OpenGL
> Rendering Loops 10 years ago, an NSTimer, repeating every 1 millisecond, is
> added to an app’s run loop [1].
Just
On Aug 13, 2015, at 10:48 AM, Laurent Daudelin laur...@nemesys-soft.com
wrote:
I've been googling all over the place. The only references I find are the
ones that say Metal is going to replace OpenGL. But I know that OpenGL is
still bundled. I haven't got around to install El Capitan
I've been googling all over the place. The only references I find are the
ones that say Metal is going to replace OpenGL. But I know that OpenGL is
still bundled. I haven't got around to install El Capitan on my system (I
only have one and I use it for production, having been burnt in the past, I
processing tasks.
ogles_gpgpu enables fast and portable, GPU-powered processing by using
OpenGL ES 2.0 shaders.
Since transferring data to and from the GPU is often a bottleneck for GPU
processing, platform-specific fast texture access is also implemented. The
library is written in well documented
per sec sq?
centimeters/s^2? millimeters? 1/10ths of an inch? or is it a percentage of
'g'=-9.81m/s^2 here on Earth, anyway?)
2) Is OpenGL(ES) fast enough for rendering material effects (like shining a
light source on a shiny piece of (simulated) aluminum panel)? Or should I rely
on a pre
the
gyroscope built into many devices since the iPhone 4. You may be able to fake
somethings with the accelerometer, but it will likely be much harder.
2) Is OpenGL(ES) fast enough for rendering material effects (like shining a
light source on a shiny piece of (simulated) aluminum panel)? Or should
On Jun 8, 2014, at 7:40 PM, Seth Willits sli...@araelium.com wrote:
Use mipmaps, and if that's still not high enough quality, anisotropic
filtering.
Thanks! That is much better.
Side note: when setting GLKTextureLoaderGenerateMipmaps to YES, the texture
(apparently) should be a power of 2
I've just started playing with OpenGL, and I'm trying to use GLKBaseEffect and
GLKTextureInfo in part to avoid writing my own shaders, but I'm getting a
crawling ants effect.
I have a texture that is a square with black edges. For the floor I essentially
have a series of rectangles on which
On Jun 8, 2014, at 6:50 PM, Todd Heberlein todd_heberl...@mac.com wrote:
http://www.toddheberlein.com/blog/2014/6/8/opengl-and-crawling-ants
Use mipmaps, and if that's still not high enough quality, anisotropic filtering.
--
Seth Willits
David,
BTW, is it possible to add subviews to a CAEAGLLayer backed view? I have been
fighting all day to show a progress indicator atop this backed view, in vain.
Thanks!
Vincent
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
On Jul 3, 2013, at 10:08 AM, Vincent Habchi vi...@macports.org wrote:
David,
BTW, is it possible to add subviews to a CAEAGLLayer backed view? I have been
fighting all day to show a progress indicator atop this backed view, in vain.
Yes, as long as you wrap the CAEAGLLayer with a UIView
David,
Yes, […]
Thanks for your quick answer and your kindness, as usual! Then something is
wrong with my setup, I’ll investigate further.
Have a great day!
Vincent
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
Hi folks,
I am trying to develop a demo application (DEM viewer) on iOS for educational
purposes. I am fairly fluent with OpenGL but this my first try at an iOS app (I
usually do OS X development). My problem is that albeit I seem to have abided
by all terms of what’s described in the ‘Drawing
Uh, I just realized I had overlooked the call to EAGLContext
presentRenderbuffer. It should work better when I add it.
Sorry for the noise, but this is a bit confusing at start!
Vincent
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please
to the render buffer. Maybe I should ask on the
OpenGL list instead.
Vincent
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins
Honestly my first question would be why not use GLKit (which the Xcode OpenGL
ES template should be using by default) instead? It pretty much sets up all the
expected bits for you.
On Jul 2, 2013, at 12:46 PM, Vincent Habchi vi...@macports.org wrote:
On 2 juil. 2013, at 17:54, Vincent Habchi
Hi David,
I made it work eventually. I just figured out both the frame buffer and the
render buffer must be bound before drawing. Now I have a fine blue screen, so I
guess I can go ahead after a good sleep. :)
Honestly my first question would be why not use GLKit (which the Xcode OpenGL
ES
presentRenderbuffer. It should work better when I add it.
It doesn’t work even with that call added. I don’t really grasp when the
CAEAGLLayer gets somehow hooked to the render buffer. Maybe I should ask on
the OpenGL list instead.
Vincent
On Jul 2, 2013, at 1:15 PM, Vincent Habchi vi...@macports.org wrote:
Just a further question: on a CAEAGLLayer backed view, [view setNeedDisplay]
does nothing, doesn’t it?
Correct. You'll get a log along the lines of -display does nothing in the
console.
--
David Duncan
Hello, all ...
I'm trying to create a sample buffer from an OpenGL view using glReadPixels(),
so I can write the sample buffer with an AVAssetWriter I set up. I'm recording
audio and video, and i'm really quite confused as to how to do this. So far,
i'm recording audio and video straight from
Dear All
I am trying to create a paint like program for iPad. I have downloaded and
played with Apple's sample code GLPaint, but I have come across one big issue.
When I use a brush image with alpha around the edge, like the apple example, I
start getting dark edges rather that having the
On Apr 10, 2011, at 12:18 PM, John Michael Zorko wrote:
I've been playing with Core Animation and AVFoundation to get some
interesting results. I've a question, though, with regards to AVFoundation
and OpenGL:
Can I make OpenGL work with AVPlayerLayer?
That depends on what you mean
) is required for OpenGL to interface with it i.e. if I
wanted to use OpenGL to make a 3D rotating sphere of many AVPlayerLayers (or
as many as an iPad 2 can handle, anyway), is this possible since
AVPlayerLayer doesn't derive from CAEGLayer?
CAEAGLLayers are required to render OpenGL
Hello, all ...
I've been playing with Core Animation and AVFoundation to get some interesting
results. I've a question, though, with regards to AVFoundation and OpenGL:
Can I make OpenGL work with AVPlayerLayer?
Regards,
John
___
Cocoa-dev
access to certain applications.
To have this , I am trying to intercept cocoa/quartz/opengl draw command
and reproduce them in the client (The input is redirected from the client to
the server).
But unable to figure out the way to get draw command.
On Windows , this can be done by using
Hi All,
I am developing application that allows remote access to
other applications (running on different machines). The idea is to
make give users transparent access to certain applications.
To have this , I am trying to intercept cocoa/quartz/opengl draw
command and reproduce
cocoa/quartz/opengl draw
command and reproduce them in the client (The input is redirected from the
client to the server).
But unable to figure out the way to get draw command.
On Windows , this can be done by using Windows metafile which captures
all GDI drawing commands
in
frames, but I'm wondering what the best strategy for blending many of these
frames together for the final image. I've worked in opengl before, but this
is somewhat new territory and I'm wondering what the pitfalls and
bottlenecks might be.
cheers,
evan
On Friday, 2010-06-25, at 21:18, vincent habchi wrote:
As far as my experience goes, it was perfectly possible to update a CALayer
from a background thread as long as you make this thread run its own runloop.
That's what I did some time ago before reverting to the classical method for
the
Markus,
Possible or Allowed? ;-)
Both, I think. If I am not mistaken, it was some Apple guy (David Duncan?) who
pointed out the role of the runloop. I therefore take for granted that, if it
is not allowed, it must at least be tolerated.
It is also possible to use Cocoa UI objects from
On Monday, 2010-06-28, at 14:43, vincent habchi wrote:
Possible or Allowed? ;-)
Both, I think. If I am not mistaken, it was some Apple guy (David Duncan?)
who pointed out the role of the runloop. I therefore take for granted that,
if it is not allowed, it must at least be tolerated.
Le 28 juin 2010 à 15:01, Markus Hanauska a écrit :
What does work, but I doubt it is allowed, is to directly call 'display' on
the CALayer. Apple says you should not call this method directly, but so
far it seems to work and has not crashed... on the other hand it might crash
if the
Let me shortly describe the current situation: We have a window and inside this
window is a layer-hosting NSView. This view is supposed to permanently display
a never ending OpenGL animation. Why did we use CALayers for that? For no
specific reason, it just sounded like starting with 10.5
So what are we supposed to do? Is there something I'm overlooking here or
should we maybe stop using CALayers and instead use NSOpenGLView or maybe
even manage our own OpenGL Context, render into a background buffer (e.g.
some kind of image) and then directly paint this image from within
Hi All,
I am getting really frustrated with a weird problem of rendering OpenGL from
a quicklook generator plugin. I hope some of you can give me a hint about
what I am doing wrong.
I am working with some 3D files for which I want to create a quicklook
generator for creating previews
On Tue, Apr 27, 2010 at 10:43 AM, Mads Paulin madspau...@gmail.com wrote:
Anyone got any ideas why I cannot allocate OpenGL pixel formats and
NSOpenGLContext from a quicklook generator ?
I believe QuickLook plugins (more accurately the generator processes
they're run in) are sandboxed. It would
On Apr 22, 2010, at 4:46 AM, varaha murthy wrote:
I have a Safari out of process plugin which draws some 3d content using
CAOpenGLLayer provided by Sfari by overriding darwInCglContext().
Inside darwInCglContext(), I draw content using opengl and call
'glFlush'(tried CGLFlushDrawable too
Hi All,
I hope I am in the right mailing list. Please point me to the correct one if
not.
I have a Safari out of process plugin which draws some 3d content using
CAOpenGLLayer provided by Sfari by overriding darwInCglContext().
Inside darwInCglContext(), I draw content using opengl and call
Hello All,
I've been developing a screensaver in Objective-C using OpenGL to
render an object in wavefront .obj format. The object is displayed
and rotated on the X, Y and Z axis. I have enabled lighting and I'm
calculating surface normals so that shading works properly.
I have been
Hi Thanks for your reply. .obj is an ASCII file format, I don't think byte
order would be an issue here.
On 2010-04-20, at 11:55 AM, A.M. wrote:
On Apr 19, 2010, at 12:33 PM, Peter Willsey wrote:
Hello All,
I've been developing a screensaver in Objective-C using OpenGL to render
I have a multithreaded Cocoa+OpenGL app that can reliably bring down
OSX. I am using the latest released/patched version of OSX, all
updates have been downloaded and applied.
The application has a thread that displays video frames as OpenGL
textures. When I resize the associated window
On Tue, Feb 9, 2010 at 1:38 PM, Shayne Wissler wiss...@gmail.com wrote:
Any tips?
File a bug at bugreport.apple.com.
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the
Le 9 févr. 2010 à 22:38, Shayne Wissler a écrit :
I have a multithreaded Cocoa+OpenGL app that can reliably bring down
OSX. I am using the latest released/patched version of OSX, all
updates have been downloaded and applied.
The application has a thread that displays video frames as OpenGL
Thanks for the tips, I will review my code according to your
suggestions. I did try the OpenGL profiler--that causes a kernel panic
almost instantly.
Shayne Wissler
On Tue, Feb 9, 2010 at 3:21 PM, Jean-Daniel Dupas
devli...@shadowlab.org wrote:
Le 9 févr. 2010 à 22:38, Shayne Wissler a écrit
class. Mesh loads vertices and indexed triangular faces
from a file, and stores them as NSData objects containing vertex arrays,
intended to be used with glVertexPointer etc. OpenGL calls.
The mesh is drawn in drawRect: of the view class using OpenGL. First call of
this method works fine
On Dec 8, 2009, at 6:42 PM, David Duncan wrote:
More than likely this is a memory management problem. Specifically, you
probably aren't claiming ownership of the NSData object that you store in
your instance variable, and thus it is being deallocated out from under you.
I was under the
If you don't turn GC on, then you likely don't have it on. Check your
project settings, as most if the project templates do not enable GC.
--
David Duncan @ My iPhone
On Dec 8, 2009, at 3:52 PM, Henri Häkkinen hen...@henuxsoft.com
wrote:
On Dec 8, 2009, at 6:42 PM, David Duncan wrote:
On Dec 8, 2009, at 4:52 PM, Henri Häkkinen wrote:
I was under the impression that automatic garbage collection was used in Mac
OS X 10.5 and over, so retaining and releasing objects was handled
automatically?
No; you have to turn it on in the application, for two reasons:
1. Tiger and
On 12/9/09 1:52 AM, Henri Häkkinen said:
I was under the impression that automatic garbage collection was used in
Mac OS X 10.5 and over, so retaining and releasing objects was handled
automatically?
Mostly automatic. :)
This is the initializer method of my Mesh class (I'm using OpenCTM
library
On Dec 9, 2009, at 2:05 AM, Sean McBride wrote:
And these are ivars I guess? If so, they should live as long as 'self' does.
Yes, they are ivars.
I was able to resolve the issue by adding invocation to retain: for both
_vertices and _indices. So yep, it was a memory management issue. I
On 12/9/09 2:25 AM, Henri Häkkinen said:
On Dec 9, 2009, at 2:05 AM, Sean McBride wrote:
And these are ivars I guess? If so, they should live as long as
'self' does.
Yes, they are ivars.
I was able to resolve the issue by adding invocation to retain: for both
_vertices and _indices. So yep,
You'll probably want to check out cocos2d-iphone, a great objective-c
framework for writing opengl games on the iphone. You can find more
info at http://www.cocos2d-iphone.org.
-Brian
On Mon, Dec 7, 2009 at 2:46 AM, Chunk 1978 chunk1...@gmail.com wrote:
cool game, patrick. i especially liked
a version for plain old OS X...
So before I do this, I wanted to ask the opinions of every one here-- Should
I
use OpenGL or quartz/core animation for my graphics drawing? I am thinking
that I want to use OpenGL-- even though the game is 2D, I still would like to
be able to do gradients and shading
Everyone seems to have already pointed you in the right direction, but
as someone who has specific experience making such a game solo
(http://bravobug.com/megabrickbash3000) I wanted to just throw in my
.02 that OpenGL is definitely the way to go. NeHe's tutorials will be
very handy along the way
), and the document has a reference
to a Mesh class. Mesh loads vertices and indexed triangular faces from a file,
and stores them as NSData objects containing vertex arrays, intended to be used
with glVertexPointer etc. OpenGL calls.
The mesh is drawn in drawRect: of the view class using OpenGL
wanted to ask the opinions of every one here-- Should I
use OpenGL or quartz/core animation for my graphics drawing? I am thinking
that I want to use OpenGL-- even though the game is 2D, I still would like to
be able to do gradients and shading and glowing, etc.. Which I am assuming
isn't going
On Dec 6, 2009, at 10:48 PM, Patrick J. Collins wrote:
So before I do this, I wanted to ask the opinions of every one here-- Should
I
use OpenGL or quartz/core animation for my graphics drawing?
OpenGL. Come join the party:
http://www.idevgames.com/forum/
--
Seth Willits
use OpenGL or quartz/core animation for my graphics drawing?
This thread is probably going to go OT, but I'd recommend OpenGL. There are
plenty of examples of great 2D games that were implemented using a 3D API of
some sort; World of Goo immediately comes to mind.
Also if anyone recommends any
to just make a version for plain old OS X...
So before I do this, I wanted to ask the opinions of every one here--
Should I
use OpenGL or quartz/core animation for my graphics drawing?
This thread is probably going to go OT, but I'd recommend OpenGL. There are
plenty of examples of great 2D
that is a
document based core data application that uses OpenGL.
There is no strictly correct way of solving your problem. Below are my
recommendations.
Design your model objects as data containers. Hence no drawing behavior in
model objects. If you add behavior to your model objects, make
For a variety of reasons, I use Core Data with OpenGL all of the time. One of
my presentations this weekend at Voices That Matter: iPhone Developers
Conference uses a Core Data application with two different Views as an example
of the MVC design pattern. One View presents information about
On Oct 13, 2009, at 9:58 AM, Erik Buck wrote:
I think that the Core Data model and any generated classes should be
left untouched because you may want to regenerate the classes later.
I use Categories to add View specific drawing methods to the objects
that represent Core Data entities.
On Mon, Oct 12, 2009 at 7:47 AM, Richard Somers
rsomers.li...@infowest.com wrote:
Any suggestions or comments?
This is typically where the controller layer would come in. A
controller-layer object would know of the GL context and of the
insertion/removal of objects in the MOC, and create
Sluder's remarks of putting the OpenGL resource creation
and disposal stuff in the controller-layer might be the way to go. I
am currently using off the shelf NSObjectController and
NSArrayController classes to add and remove model objects from the
managed object context. I could subclass
On Oct 12, 2009, at 4:27 PM, Ben Trumbull wrote:
but in this case it must draw itself.
No, it doesn't must do anything. Views draw themselves, model
objects are state, and controllers are intermediaries.
...
What problem are you trying to solve by knowingly violating the MVC
design
and NSArrayController.
This is hard, because you're going in the wrong direction. Put a
stake in the ground, that your model objects will never ever call
directly into OpenGL.
I have a collection of model objects in a core data store. I enumerate
all the objects in the store one by one and draw
Apologies if this is not on the right list.
I have an app with several views, one of which is an OpenGLES view
implemented by subclassing OpenGLES2DView.
When I switch from a normal view to the OpenGL view it draws the textured
sprite as expected, but when I switch from the OpenGL view back
The traditional way of doing an OpenGL (gCGLPFAFullScreen,
CGLSetFullScreen()) have been deprecated. At WWDC this year, in the
Snow Leopard OpenGL session, a new all-Cocoa method was shown where
you basically just resize the window containing the NSOpenGLView and
layer it above the menu
Le 5 sept. 2009 à 06:06, Development a écrit :
I'm using opengl to do screen captures because that seems to be the
fastest way. The problem is that I need the cursor to be visible but
it is not. Is there a flag I can set with opengl to make the cursor
visible? Or am I going to have
I'm using opengl to do screen captures because that seems to be the
fastest way. The problem is that I need the cursor to be visible but
it is not. Is there a flag I can set with opengl to make the cursor
visible? Or am I going to have to attach an image to it during capture
Thank you David for the tip!
On Wed, Jul 22, 2009 at 5:11 AM, David Duncan david.dun...@apple.comwrote:
On Jul 21, 2009, at 10:18 AM, Wilson Chen wrote:
My question is: since an EAGLView is a subclass of UIView, is there a
particular reason for the template to not follow the common pattern
this pattern since it adheres the MVC pattern. However, inside
the OpenGL ES Application XCode template, the EAGLView is added directly
to the window in the nib file, leaving the controller out.
My question is: since an EAGLView is a subclass of UIView, is there a
particular reason
On Tue, Jul 21, 2009 at 10:18 AM, Wilson Chencanti.m...@gmail.com wrote:
My question is: since an EAGLView is a subclass of UIView, is there a
particular reason for the template to not follow the common pattern to
adhere the beloved MVC?
Speed? If you're using OpenGL, you're probably
On Jul 21, 2009, at 10:18 AM, Wilson Chen wrote:
My question is: since an EAGLView is a subclass of UIView, is there a
particular reason for the template to not follow the common pattern to
adhere the beloved MVC?
There is really no difference in if you want to have the view
controller or
very interested to know
- why it should be faster to do it in OpenGL
- how you do it in OpenGL
Thanx,
atze
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
On Jul 21, 2009, at 2:01 PM, Alexander Spohr wrote:
I am very interested to know
- why it should be faster to do it in OpenGL
If you use the built in orientation support, then we place a transform
on the view's layer. A transform on OpenGL content will force your
rendering onto a slower
dear all,
i am new on OpenGL Framework, i dnt know to that how to display the simple 3D
image using OpenGL.
Thanks in advance.
Regards,
Fawad Shafi
_
Rediscover Hotmail®: Get quick friend updates right in your inbox.
http
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display the
simple 3D image using OpenGL.
This doesn't appear to be relevant to Cocoa development, at least
until the Cocoa OpenGL views get involved. If you're just getting
started
On Apr 20, 2009, at 4:23 PM, Andrew Farmer wrote:
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display
the simple 3D image using OpenGL.
This doesn't appear to be relevant to Cocoa development, at least
until the Cocoa OpenGL views get
On 20 Apr 09, at 06:59, fawad shafi wrote:
i am new on OpenGL Framework, i dnt know to that how to display the
simple 3D image using OpenGL.
On Mon, Apr 20, 2009 at 5:27 PM, Steve Christensen puns...@mac.com wrote:
...and subscribe to the mac-opengl mailing list, which is also a better
place
That did it, adding
[[ self openGLContext ] flushBuffer ];
To the end of getFrameForTime: did the trick.
Thanks.
On 12/04/2009, at 03:13 , Michael Ash wrote:
On Sat, Apr 11, 2009 at 2:20 AM, Brian Bruinewoud
br...@darknova.com wrote:
Ok. That works. I was coming from an NSOpenGLView example
calling OpenGL functions like that. OpenGL
depends on having a context set up, and each call is executed in that
context. This CoreVideo callback does nothing like that. All it does
is notify you each time the monitor is done refreshing. It's up to you
to set up your own GL context before you start making
All,
I'm trying to run an OpenGL animation. At first I tried an NSTimer,
but couldn't get the output to appear unless I resized the window. It
was as if the redraw caused by NSTimer wasn't swapping buffers or
whatever whereas the redraw caused by resize was. Note, however
On Apr 10, 2009, at 6:15 PM, Brian Bruinewoud wrote:
However, if I place any openGL code (even just glGetError) in the
// Add your drawing code here location, the program crashes (NSLog
calls work fine). Note that the openGL code isn't called until after
applicationDidFinishLaunching so its
/
FirstOpenGLtest', process 1053.
[Switching to process 1053 thread 0x4c03]
On 11/04/2009, at 11:22 , Greg Parker wrote:
On Apr 10, 2009, at 6:15 PM, Brian Bruinewoud wrote:
However, if I place any openGL code (even just glGetError) in the
// Add your drawing code here location, the program
Note that this thread is stopping on the line:
GLint e = glGetError();
And that getFrameForTime looks like this:
- (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime
{
NSLog( @getFrameForTime );
if( !shouldRun ) return kCVReturnError;
redcomp = redcomp + 0.01;
kCVReturnSuccess;
}
If I remove the glGetError() line, everything works (NSLog messages come
spurting out at high speed).
You can't just go and start calling OpenGL functions like that. OpenGL
depends on having a context set up, and each call is executed in that
context. This CoreVideo callback does
to compile shaders. The real problem I
have here is:
If I create an application linking to A and B, the code in library B
is not able to make use of the OpenGL context which is obviously
created through library A (simply by loading a nib file with an
embedded NSOpenGLView). After trying a lot
shaders. The real problem I have here is:
If I create an application linking to A and B, the code in library B is
not able to make use of the OpenGL context which is obviously created
through library A (simply by loading a nib file with an embedded
NSOpenGLView). After trying a lot of different
1 - 100 of 123 matches
Mail list logo