Sign in to follow this  
Followers 0
SchneiH2

TextureID for map respectively terrain map

2 posts in this topic

Hi everybody

Basically, there are two parts of the question:

First is that I am trying to translate Ben's Gizmo64 code

for the terrian map into a SDK plugin, however so far without success. My below code basically works, however, does not display a terrain texture. I am wondering, how to get the texture id of the terrian, if there is any.

int efb_map_draw(
	XPLMDrawingPhase     inPhase,
	int                  inIsBefore,
	void *               inRefcon)
{
	XPLMBindTexture2d(map_texture, 1);
	
	XPLMSetGraphicsState(0, 1, 0, 1, 1, 0, 0);

	glColor3f(0.75, 0.75, 0.75);
	glTranslated(64, 15, 0);
	
	glPushMatrix();

	glBegin(GL_QUADS);

	glTexCoord2f(0, 1);        glVertex3f(0, 50, 0);         
	glTexCoord2f(0, 0);        glVertex3f(0, 230, 0);         
	glTexCoord2f(1, 0);        glVertex3f(240, 230, 0);         
	glTexCoord2f(1, 1);        glVertex3f(240, 50, 0);        
	
	glEnd();

	glPopMatrix();

	return 1;
}

Secondly, I am wondering whether there is a possibility to display the map from the map UI (i.e. aso differnt layers like VFR, IFR low/high) on an instrument/gauge. At least the G1000 gauge has this option. Having looked through the new map api I could not find any routine to get a texture id of the map. The map sample code on the SDK page creates to my understanding new layers in the map UI bu I do not see there any solution to display the map on an instrument on the 3d panel.

Thank you up front for possible help.

Best regards

SHJ

0

Share this post


Link to post
Share on other sites

There is no terrain texture. You have to build it using the SDK probes function.

 

These requests are getting ridiculous.

Gizmo is a commercial product composed of hard won knowledge.

I’m a little tired of you asking for cherry picked answers for short cuts to take for your own means.

Either use it or earn your own battle scars.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.