Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Ashaira

Member Since 07 Feb 2010
Offline Last Active Apr 17 2012 06:14 AM

#4928691 Shader ';' : syntax error; parse error

Posted by Ashaira on 06 April 2012 - 01:02 AM

vec3 lightPos = (matWorld * vec4(0.0,1000.0,1000.0,1.0).xyz


I'm sure you need another closed bracket there.

"facepalm.jpg"
um im just go over to that corner and hang myself. ty for the help.


#4928166 Getting error C2819. Need some help.

Posted by Ashaira on 04 April 2012 - 05:28 AM

Well ive been working on a small game engine in OpenGL ES 2.0 and until today everything was fine. Today i decided to put my Scene Manager and Resource Manager clases as extern in a globals.h and declare them in the init in the main.cpp. After doing so i keep getting error C2819 for variable that until recently worked fine.

For example in the Scene Manager i have a pointer that holds all the objects declared as such
CGameObject * GameObjects;

And then use it in the cpp in various places. one example where i get the error is here
if(GameObjects[i]->shader == j+1)

as far as i understand this error can appear when using the -> operator on non pointer types but GameObjects is a pointer.

Could anyone help me?

If posting the whole files will help you understand better let me know.

EDIT: upon further investigation the cause seems to be the use of STL. i used STL to read from files and now since i turned the SM and RM into global extern it seem STL is overwriting some pointer operators. Could someone tell me how to block this overwrite? ide like to keep using the file reading i implemented if possible if not could someone point me towards some file reading that doesnt use the STL? all the examples i have found so far use STL.


PARTNERS