Primitives for the iphone with monogame - iphone

I am trying to draw some primitives with monogame. I am using the GraphicsDevice and the DrawUserPrimitives method. Although I can see the rectangle I am drawing in an Android device it is missing on the iPhone simulator. Am I missing something or is drawing primitives on the iPhone with monogame not supported?

Are you using the (develop3D branch)[https://github.com/mono/MonoGame/tree/develop3d]?

Related

SVG Drawing in iphone

Hope all of you folk will fine and doing there best. i have just started iphone app development this april.
I want to draw svg on CGContext in iphone just like in android we can do.
kindly follow the link for android SVG drawing Libraries.
SVG on Android
Lib No 1
My requirment,I just want to draw SVG on iphone CGContext for that i need any third party library. if any body have useful and exact information kindly help me out.
How to draw SVG in iPhone?
Thanks in advance.
mark Gjel.
If the SVG is fixed, you could try Qwarkee which will generate a -drawRect: implementation which draws the equivalent SVG using just quartz functions.
The current version works best with Illustrator generated SVG files, but the developers tell me an update is coming in the next few days which will make the app work with a larger variety of files.
not the perfect match for your question but check out SVGKit
SVGKit is a cross-platform Cocoa framework for rendering SVG files as
Core Animation layers. All shapes are represented by instances of the
CAShapeLayer class, and are, by design, animatable. SVGKit is
compatible with the latest OS X and iOS SDK's.
SVGgh has an SVGRenderer class which can draw into a CGContextRef, so you can use it to print, generate a PDF or draw to a UIView or CALayer.

Developing a talking app on iPhone/iPad

I want to develop a talking app for the iPhone and iPad. My question is regarding Animations only. I have an excellent 3D graphics designer who will do his part. Being a programmer, what would I need to be aware of? What should I ask the designer to provide and in what formats?
Which one to use Core Animation / Cocos 2d for development of 3d character?
I suggest that you look into OpenGL-ES if you are going to do 3D animation on iPhone/iPad.
Here is the Programming Guide for OpenGL ES on iOS devices.

cocos2D from iPhone to iPad

I'm developing a game using cocos2d. It's running now on iPhone and also supports Retina display. With retina i'm using images with "-hd" postfix. Now i want my application to be able to work on iPad using this images. How can i do that ?
PS: I don't have a real iPad and can only use a simulator. I will test the game on my friend's iPad after it will work well on a simulator. Is it possible to use hi-res images with simulator and how to do it?
I'm using cocos2D 0.99.5
inside CCFileUtils.m
inside method name +(NSString*) getDoubleResolutionImage:(NSString*)path
edit if( CC_CONTENT_SCALE_FACTOR() == 2)
to if( CC_CONTENT_SCALE_FACTOR() == 2 || (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad))
this will make the app to load the -hd image when running on ipad, remember to change your app targeted device family to iPhone/iPad.
this will solve the loading of -hd problem for ipad.
but after loading -hd file for ipad resolution, you will also notice that most of your image position should be off alignment, now either you go directly into the cocos2d folder to edit how CCNode,CCSprite,CClabel handle the positioning of thing or you code it in your code checking if its ipad or not.
if you are using CCSpriteBatchNote. this will also cause another problem because you will be reading from the -hd SpriteSheet. so the texture Rect u set to cut need to be double too.
another method is position everything according to winsize. i haven try this method.
I don't exactly understand the question but I will try to answer.
You can technically use the same graphics for the iPad, but they will not look as nice. For one, they will all blurry and pixelated, and two, the iPad has a different screen aspect ratio that the iPhone/iPod Touch. If you do make separate images for an iPad version of your game, it will not be extremely difficult to do. If you want to do this, I suggest posting a new question.

OpenGL light direction reversed while drawing into a framebuffer texture

I've got an iPhone (OpenGL ES 1.1) app that does some rendering into textures. I'm setting up a framebuffer object and using glFramebufferTexture2D to attach the texture to it.
Everything works fine except that the light directions are reversed when drawing into this framebuffer object. I'm specifying light directions like this:
float theDirection[4] = { x, y, z, 0 }
glLightf( lightIndex, GL_POSITION, theDirection )
When rendering without the framebuffer object, all my light directions are correct. When rendering with the framebuffer object, I have to negate theDirection for things to look the same.
As a side note, the light directions are also reversed (with or without a framebuffer object) when I'm running on an iPhone 3G with iOS 3.2. If I'm running on an iPhone or iPad on 4.x, the light directions are not reversed.
Any ideas?
Strangely, the solution here was to enable GL_CULL_FACE. If GL_CULL_FACE is disabled in a MonoTouch project using OpenGL ES 1.1, then the GL lighting direction (for a directional GL_LIGHT0) will be negated on some of the devices or OS versions, I'm not sure which.
xcode-based C++ projects do not have this problem. OpenGL ES 1.1 xcode projects light consistently across all devices and OS versions that I've tested regardless of your GL_CULL_FACE setting.
As compared to the result of identical GL code in a C++ xcode project (which is consistent across devices regardless of GL_CULL_FACE), here are the devices that I see inverted lighting happening on in MonoTouch:
iPad running iOS 4.2.1
iOS simulator running iOS 4.2
iPhone4 running iOS 4.2.1
The lighting is correct on my iPhone 3G running iOS 3.1.2.
I posted a bug report to Novell: https://bugzilla.novell.com/show_bug.cgi?id=679896

Editor for 2D graphical elements in iPhone App

I am going to be working with a graphic designer to develop an interactive children's iphone app. It will not be a game as such, but rather a series of backgrounds with some interactive objects that can be touched to display simple animation or sound.
These I would be striving for the quality that these guys produce http://duckduckmoosedesign.com/
I assume that they would be using Quartz2D rather than embedded jpegs for their design elements?
I was wondering what tools people would recommend for designers to use that can then be imported for use an iPhone app.
I have seen some references to creating SVG in Inkscape but was wondering whether there was any other alternatives for importing graphics into Quartz for use in an iPhone app?
Opacity is a design app, that is capable to output quartzCore source code suitable for iphone or mac.