Author Topic: EDA075 - Mobile Graphics  (Read 64388 times)

Offline MikeD

  • Full Member
  • ***
  • Posts: 213
EDA075 - Mobile Graphics
« on: 2009-10-26 09:49:45 »
Hi,

Here you can post questions about the course, assignments and project. Magnus and I will monitor the forum.

Mike


Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #1 on: 2009-10-30 19:38:31 »
The first assignment is up on the main page. Have fun!

Report bugs and questions here.

Offline Katharina

  • Newbie
  • *
  • Posts: 16
Re: EDA075 - Mobile Graphics
« Reply #2 on: 2009-10-31 11:24:52 »
I get the following error message when I try to compile the code of the (yet unchanged) assignment:

[..]\mobile graphics, assignment 1\renderchimp\renderchimp.h(250) : fatal error C1083:File (Include) cannot be opened: "EGL/egl.h": No such file or directory


Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #3 on: 2009-10-31 17:15:09 »
Are you using Visual Studio? Which version?

egl.h can be found in RenderChimp\Include\EGL.

Try changing the lines:
   #include <EGL/egl.h>
   #include <GLES2/gl2.h>
 in RenderChimp.h to
   #include "EGL/egl.h"
   #include "GLES2/gl2.h"

Otherwise make sure that "..\Include" is set as an Additional Include Path in your Visual Studio project.

Hope it helps!

Offline klas

  • Newbie
  • *
  • Posts: 2
Re: EDA075 - Mobile Graphics
« Reply #4 on: 2009-10-31 19:39:42 »
In general I think the instructions for the assignment should be somewhat clearer on what actually needs to be installed on a computer to run the code. SDL is used but you don't need to install anything, right? Just one example.

On my computer with Nvidia 9400M graphics chip I had some trouble.
1) I installed Rendermonkey but got a black preview screen for all the OpenGL ES 2.0 shader examples
Solution: http://forums.amd.com/devforum/messageview.cfm?catid=347&threadid=106798
2) I installed the PowerVR SDK (which I am not sure if actually needed or not for the assignment ;) but the pre-compiled demos refused to run with an error message talking about missing DLLs
Solution: http://www.imgtec.com/forum/forum_posts.asp?TID=4

Maybe will be of use to some others out there.

Cheers!

Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #5 on: 2009-10-31 20:13:59 »
You shouldn't really need anything besides Visual Studio (freely available here: http://www.microsoft.com/Express/VC/). We've tested the assignment on a bunch of different machines with Visual Studio 2005, 2008 and 2005 Express. We also tried it out in Pluto, and it worked fine (although those machines are painfully slow).

All the libs and dlls are included in the package, so you shouldn't need to download anything. If you still experience any difficulty with any of the 3rd party libs, you could try downloading and installing them yourself. The ones used are: SDL, SDL_image and Imagination Technologies PowerVR OpenGL ES 2.0 SDK.

You don't need RenderMonkey for the assignment. However, for those of you who want to play around with it and have a nVidia card, tip number 1 above is very useful (I think Mike mentioned it in the second lecture?)

If you want to take a look at the GL ES 2.0 examples from the PowerVR SDK, you'll need to download the whole PowerVR package, yes, but again, it's not necessary for the assignment.

Good feedback, keep it coming :)

Offline Katharina

  • Newbie
  • *
  • Posts: 16
Re: EDA075 - Mobile Graphics
« Reply #6 on: 2009-10-31 20:55:24 »
I'm using Visual Express 2008 9.0, and I set ..\Include as an Reference Search Path and changed the code, but it still doesn't work.
« Last Edit: 2009-10-31 21:04:21 by Katharina »

Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #7 on: 2009-10-31 21:04:23 »
Hmm, to me there is no obvious reason why it shouldn't work.  :-\

In VS, if you right click on RenderChimp in the Solution Explorer and select Properties -> Configuration Properties -> C/C++ -> Genreral -> Additional Include Directories you should have "..\Include". If it doesn't work try using  $(SolutionDir)$Include . You could also try a less elegant solution and add the whole, absolute path to the include directory in the Additional Include Directories field. Alternatively you could add the whole path in RenderChimp.h, but then you'll probably have to do it in more places in other files as well.

Let me know if it helps!

Offline Katharina

  • Newbie
  • *
  • Posts: 16
Re: EDA075 - Mobile Graphics
« Reply #8 on: 2009-10-31 21:41:37 »
hmm,

RenderChip: you mean the file (.h) or the directory?

I don't get an option C/C++ there, just General -> Additional [...]

What are the initial steps for creating the project? I do File -> New -> Project from existing Code
then chose "Mobile Graphics, Assignment 1". 

Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #9 on: 2009-10-31 21:45:22 »
I use VS 2005 Express so it might be some differences in the "properties"-window..

If you create a new project then I'm not sure if all project settings will follow. All you should have to do is to open RenderChimp.sln from your explorer windows, and VS should handle the rest.

Offline Katharina

  • Newbie
  • *
  • Posts: 16
Re: EDA075 - Mobile Graphics
« Reply #10 on: 2009-10-31 21:50:10 »
solved: Assignment 1 -> Configuration Properties -> C/C++ -> General -> Additional Include Directories
and there full path of Include. Messy.

Oh and double clicking on RenderChimp worked fine as well.  ;D

Thanks for your time and patience, what a waste of two hours.  :)

Offline martinezgjuan

  • Newbie
  • *
  • Posts: 3
Re: EDA075 - Mobile Graphics
« Reply #11 on: 2009-11-03 15:37:13 »
Can you please upload the seminar slides?

Thanks  :)

Offline MikeD

  • Full Member
  • ***
  • Posts: 213

Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #13 on: 2009-11-04 16:15:11 »
I noticed that there seems to be some confusion how to initiate an IndexArray. In its constructor there is a parameter "n" which denotes the number of indices in the incoming u32 array. I.e. this is NOT the number of triangle that you expect to be drawn, but the actual number of indices you send in = length of the u32 array.

Offline MrAndersson

  • Full Member
  • ***
  • Posts: 142
Re: EDA075 - Mobile Graphics
« Reply #14 on: 2009-11-05 12:23:57 »
When you create a MaterialPhong you must also set its attributes: Ambient, Diffuse, Shininess, Specular, SpecularLevel, and Emissive. For the objects that are loaded from file, they will already have a MaterialPhong attached to them, but you must still set their DiffuseTexture to get them textured.

 

joke