Home News Forum Social Networking Support Us Advertise

Spanish Lesson 1 ($1.99)

aWake!Gently ($1.99)

The Bird & The Snail - Knock Knock - Deluxe ($4.99)

Match-It Trains ($0.99)

Tangled ($0.99)

iFlatter ($0.99)

The 15 puzzle ($0.99)

Tap Forms Database ($8.99)

Higher or Lower Card Game (Hi Lo) ($0.99)

Red Pixel ($0.99)

Time-Shift Radio ($0.99)

Want your application advertised here? Only $10/week!

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2008, 11:13 AM   #1 (permalink)
Junior Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
skooby is on a distinguished road
Default Platform Independent layer between C++ and Objective C

I have my platform independent layer that I have done most of my coding in and want to port that to the iphone to offer a multi-platform environment. The difficulty I am having is sharing some of the objects between Objective C and C++.

For instance I have an abstracted platform independent layer like :
void VideoServices:: DrawPoly (...)
{
ExternDrawPoly_OPENGLES();
}

Which I would like to call the Objective C stuff for the lower implementation.

So in my ExternDrawPoly_OPENGLES() I call drawPoly() which is located in my .mm EAGLView.mm area.

Inside of my ExternDrawPoly(...) in EAGLView.mm I want to reference the EAGLView implementation object but it gives me a warning and then it crashes when the code is being run.

I imagine that my difficulty is getting a pointer to the EAGLView object, but not quiet sure how to get it.

Any help would be appreciated.
skooby is offline   Reply With Quote
Old 10-15-2008, 12:28 PM   #2 (permalink)
Junior Member
 
Join Date: Oct 2008
Location: Netherlands
Posts: 24
Rep Power: 0
Fnurglewitz is on a distinguished road
Default

I don't remember its name but there is a guide on the iPhone Developer site from Apple that explains how to mix C++ and Objective-C with many examples. So you might want to check that out.
__________________
www.fnurglewitz.com
Fnurglewitz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements


» Stats
Members: 8,231
Threads: 20,199
Posts: 90,216
Top Poster: RickMaddy (2,121)
Welcome to our newest member, OneGlobe
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:35 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0