yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV Themes and Apps] WhistlerNL:
Studied on Microsoft's XNA last half year, have been wanting to try if I could use any of it on the Diamond. If not, I guess this is the next best thing atm. Thanks :)
[Touch Diamond, MDA Compact IV Themes and Apps] dajudge01:
Played around a little bit with that and built something to load Milkshape 3D models and display them... Not too much horsepowers in the GPU though. I guess some really old-school 3D skills are required to get decent graphics out of the chip.

Is there any info on how much RAM is dedicated to the graphics chip? I wonder if things are mostly fillrate limited there or if texture count is the real impact. Maybe I'll try that later on with a number of simple but all differently textured models with loads of overdraw so the Z-Buffer can pretty much eliminate fillrate limitations to see if texture size is the real problem here. Once that is found out it shouldn't be too hard to get a little game-world up and running.

I'm thinking in the lines of a G-Sensor driven rollerball thingie for starters - a little bit like tweeter from a 3rd person perspective with some interesting levels? If that runs smoothly on the diamond it would be a real show-off kind of game :-)

The thing I haven't done before here is the physics part. Obviously you wouldn't want to run a fully fledged physics simulation (ODE comes to mind here) especially when doing it in C# - but there should be enough CPU power to handle some sphere-? collisions in a timely manner?

Cheers,

Alex
[Touch Diamond, MDA Compact IV Themes and Apps] JayZee2:
you may want to join this thread and participate in the project
[Touch Diamond, MDA Compact IV Themes and Apps] CutePinkSox:
16 MB 12 Pipe GFX Chip cannot remember where i read it...
[Touch Diamond, MDA Compact IV Themes and Apps] Jin187:
Here are the Direct 3D Drivers from the omnia, working great on the Diamond, check it out!!

http://xdaforums.com/showthread.php?t=416474
[Touch Diamond, MDA Compact IV Themes and Apps] Jorlin:
Anything that works better with these drivers installed?
[Touch Diamond, MDA Compact IV Themes and Apps] Radeon123:
Just doing a sprite backup then I am going to try those drivers, wonder what will happen :D
[Touch Diamond, MDA Compact IV Themes and Apps] TDO:
Yes, you can read the 3d text in the demos.

But with the drivers installed they run a lot slower!

Maybe vsync enabeld/disabled.

TDO
[Touch Diamond, MDA Compact IV Themes and Apps] Radeon123:
Same here, even the GL Benchmark seems slower, just running that test now, see what the difference is between the drivers.

Edit - Finished the test but not a lot of difference between the drivers using GL Benchmark.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
The Diamond does not need D3D drivers; it already has it and it is hardware accelerated. The Diamond stock D3D drivers are a wrapper around OpenGL ES. I would not be surprised if the Kaiser D3D drivers were actually just a copy of the Diamond drivers.

Edit:

Misread, they're the Omnia drivers, not Kaiser. Maybe they are better, dunno, haven't looked into it.

Incidentally, Direct3D and GAPI are being removed from Windows Mobile 7. Using either of them is pretty pointless from here on out. :)
[Touch Diamond, MDA Compact IV Themes and Apps] xdaking:
very koool finding many many thanks
[Touch Diamond, MDA Compact IV Themes and Apps] Jin187:
Hmmm, I see, just thought I'd post them here anyway just incase it could be useful for you guys.

p.s. I've noticed something quite strange, general scrolling in applications like iContacts, PCM Imageviewer, S2P(Coverflow) and opera seem faster with these drivers but video playback using coreplayer is definately slower.
[Touch Diamond, MDA Compact IV Themes and Apps] uniqueboy:
Has anyone got any demos working yet? I mean got the diamond to draw a nice complex shaded textured moving object. Lets see em please:D
[Touch Diamond, MDA Compact IV Themes and Apps] tafkatadd:
What about the classics?

Hi,

Can someone please program some of the classics, like Pac-Man, Tetris and such? It can be cool to play those with the sensor...
[Touch Diamond, MDA Compact IV Themes and Apps] koven:
rather q1,q2 maybe q3 with hardware acceleration :)
[Touch Diamond, MDA Compact IV Themes and Apps] charly_mx:
ohh i miss school

I used to program OpenGL in my school. I havent programmed anything since then. :) Hurra for the Dedicated Graphic Chip in our Diamonds
[Touch Diamond, MDA Compact IV Themes and Apps] _Edd_:
Hi,

I've downloaded ManagedOpenGLES.zip and I have problems running it in windows mobile sdk. It builds without errors but when I try to run it I get this exception:

I've downloaded Vincent 3D and took libgles_cm.dll from it. I've put this dll to my bin folder but I still get the same error. Of course I can copy exec files directly to my device and run it from there without problems (because it does not need libgles_cm.dll) but I want it to work in sdk too. Any ideas? Thanks.
[Touch Diamond, MDA Compact IV Themes and Apps] Dynomite232:
Touchless Control Interface for Nokia N95

has anyone seen this will it work on r diamond http://ca.youtube.com/watch?v=7DikbVmYLR0&feature=related
[Touch Diamond, MDA Compact IV Themes and Apps] GurneyHalleck:
... completely OT - but it's still awesome. There's no reason that wouldn't be possible with TD, just need some enterprising soul to figure out how to do it... or wait for those guys doing the demo to release a WM version.
[Touch Diamond, MDA Compact IV Themes and Apps] Radeon123:
Would love to see that kind of app on the Diamond to, looks amazing :)
[Touch Diamond, MDA Compact IV Themes and Apps] raptorgt:
you can try this 3d game if you want it works great on the diamond http://htc-touch-diamond.handster.com/product.php?id=905

another game
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
If you copy the file it to the emulator, that line should not fail. But Vincent 3d is fixed point only, so all the floating point GL functions that are available on the Diamond will fail.
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Possible problem ? RGB from BGR

I think I ran into a small problem with the OpenGL SDK.

When trying to load a .png or .bmp file, the byte order seems to be BGRA instead of RBGA or at least WM6.1 handles it like that.

It is hardly noticable in Sensory Overload, because the space ship is small. It is better visible with larger textures.

I created a "quick and dirty" fix by swapping the bytes, but this works currently only for 32bpp RGBA images. I don't think this is real a problem because most "modern" image programs will use RGBA.

I used Gimp 2.4.x for creating the images, but I got it also with images I downloaded from the NeHe tutorials.

I have included images of what I mean. The original is the picture I created with Gimp, the others are screendumps from my Diamond. Needless to say it is actually a rotating cube and pyramid (in landscape).

===============

If you like my applications, consider a donation to Koushik.

After all it is thanks to his (and the many other developers) work and readiness to share it that I can write these programs. I still get enough satisfaction in writing these programs.
[Touch Diamond, MDA Compact IV Themes and Apps] kultus:
I dont what does "great" mean for you but for me this game isnt great slow on my diamond with all options and only qvga so very ugly I was very dissapointed
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
You are correct, this is a bug in the Sensory Overload game that I knew about, but just didn't care to fix/document :).

The offending code in particular:

bitmap.LockBits(ref rect, ImageLockMode.ImageLockModeRead, PixelFormatID.PixelFormat32bppARGB, out data);

gl.TexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA, size.Width, size.Height, 0, gl.GL_RGBA, gl.GL_UNSIGNED_BYTE, data.Scan0);

PixelFormat32bppARGB is an int that is equivalent to GL_BGRA byte array, not GL_RGBA. You can view the memory pointer of data.Scan0 and verify this. However, GL_BGRA (0x80E1 when implemented as an extension) is not a valid OpenGL ES format; atleast not on the Diamond.

Your solution of doing a byte level swap per pixel is necessary. As far as I know, there is no way to solve this other than using non-GDI/IImage loading routines. There are two viable solutions:

Do the pixel swap in code as you are now.

Swap your R and B components in your image before saving so you don't waste time doing that in the application.
[Touch Diamond, MDA Compact IV Themes and Apps] Usper:
Same. Too slow. Bit laggy.
[Touch Diamond, MDA Compact IV Themes and Apps] tommm:
Really - to slow and only QVGA:(
[Touch Diamond, MDA Compact IV Themes and Apps] pix27:
OpenGL ES Tutorials

Some nice OpenGL|ES tutorials that I have found

25 Step tutorial with lots of screens

http://www.zeuscmd.com/tutorials/opengles/

7 Doc ZIP

http://www.khronos.org/developers/tutorials/typhoonlabs_tutorials.zip
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
My favorite OpenGL series (which works with OpenGLES too) is http://nehe.gamedev.net. It's a ~50ish tutorial series. You can start from basically nothing and get into some really advanced stuff by the end of it!
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
I like the wrapper!

It is a bit different than the original OpenGL (some small functions/methods in the NeHe beginner tut's are missing I guess? glVertex3f becomes drawing with glVertexPointer).

I wrote a little spinning piramid and now trying to make a building or a ball (or some other more complex struture).

In highschool I wrote a car-crashing game in OpenGL with Ageia PhysX engine attached to it. Would be fun on the Diamond :D
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Yeah, OpenGL ES is a subset of OpenGL, so not all functions are available. glVertex3f is really slow anyways! Multiple function calls per polygon = bad. :)
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
GLUT/ES for Diamond and/or C#

Has anybody ported the GLUT/ES libraries to the Diamond ? It could make programming a bit easier as far as I can see. I tried the sample program that comes with the GLUT/ES sources, but it scrambles the screen and fails with an error message during the initialization of the GLU window.

Any guidelines or pointers to documents that could help me out here are appreciated !
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
I've had the same problem. I think it is because the Glut_ES implementation is meant to link to the Vincent version of libGLES_CM.dll.
[Touch Diamond, MDA Compact IV Themes and Apps] toastedlogic:
Wishful thinking... :)

... so who's working on porting GLQuake to wm6.1? :)
[Touch Diamond, MDA Compact IV Themes and Apps] jaikben22:
glquake would be nice, the test demo also works on xda flame with goforce so comp will be great somebody please use this knowledge :)
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
I might try to make a c# .3ds loader to do some funny stuff :) without loading some basic 3d models openGL is half te fun ;)
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
OpenGL shading problems

I have a small example wich uses some C code together with C#. the code is from the GLUT_Shapes and draws, boxes, spheres and some other objects.

They are all based on the sample application coming with the OpenGL SDK here.

I have tried to use lights and fog, but the results are "disappointing". Probably because I do not really understand the concept.

When I enable lighting, all my objects are not colored, but just get a pure white color. It sems also that the lights rotate along with the axises, because sometimes only the "front" of an object is lighted.

Similar when I use "fog", I expect to see a haze on my screen, but the effect is merely that all my objects get a gray color (see picture: fog.png)

Could some kind OpenGL specialist look at my project and tell me what I am doing wrong ? I have looked at the tutorials from NeHe and Zeus, but seem to misinterpret them.

For the rest everything is working fine, translations and rotations do work correctly. (My only other experience with OpenGL is the AH64 lander game I wrote and posted here a few days ago in another thread, but that was using a 2D Orhtographic projection. It looks like the 3D is a bit to high for me ;)

I have included everything in the zip, except the OpenGL SDK.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Very cool!

The reason your lighting shows white is because when lighting is enabled, color is disregarded in favor of "Material". Check out the gl.Material calls. The Sensory Overload application I wrote demonstrates how to use both ambient and diffuse lights.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Oh, and your fog does not seem to work because your background is not a solid object to which Fog is applied (ie, the background has no depth). That's why only the objects seem to get fogged, and nothing else. Your fog end value of "5" might also be a little too close.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Incidentally, you are linking against libgles_cm.lib. Is that the Vincent3D one?
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
libgles_cm.lib

Yes that is correct. Is there another one available ?
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
I'm almost done writing a 3DS file loader.. I;m trying to wrap it up in a sort of resource loader and tidy up things a bit. When I've tested it I will make it openSource. Let the gaming begin :)
[Touch Diamond, MDA Compact IV Themes and Apps] itoYo:
i found this website, may be its useful for some of you, its got allot of examp[le code to play around with

http://www.codeproject.com
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Problem fixed

Your suggestions made everything work fine. I am currently rewriting the "SnowStorm" application with OpenGL to get better performance and I am slowly getting there. Still will be a few days before it is ready.
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Cool !

This is great, if you need a beta tester, put me on the list :)

Would be nice for the "Toy Plane", which I intend to rewrite also for OpenGL.
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
I'm still at the 'almost done' phase... files read ok as far as I know, reads vertices and faces (and some texture stuff). When I use glDrawArray with gl.GL_POINTS, all the dots are drawn right, but when I use GL_LINES or GL_TRIANGLES it gets messed up. Will post some screenshots asap. :)
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
Ok, fixed a bug.. while reading faces from a 3ds file, 1 tutorial I found just stated "read 3 ushorts, point a b and c"... while there was an EXTRA ushort ccontaining some additional info.

On to the texture part!!
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
3ds file of a barrel:
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
face errors:
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
Working GL_POINTS:

Working LineLoop and TRIANGLES:
[Touch Diamond, MDA Compact IV Themes and Apps] danthekilla:
sweet it will be great once that is working im good at makeing games but not to good with c# or rendering stuff (im used to using engines like torque, xna, gamebryo etc...)
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
That looks like an issue with GL cull face. Try turning it off using

gl.Disable(gl.GL_CULL_FACE);
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
Hi Koush,

It was an error on my side :)
[Touch Diamond, MDA Compact IV Themes and Apps] Zeppie:
When I try to add a texture like this:

uint[] textures = new uint[1];

fixed (uint* texturesPointer = &textures[0])

{

gl.GenTextures(1, texturesPointer);

}

I get some kind of nullpointer and my phone crashes prety bad.. what am I overseeing here?
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
uint tex;

gl.GenTextures(1, &tex);

thats how I do it.

You can alternatively try it like:

uint[] textures = new uint[1];

fixed(uint* texturesPointer = textures)

{

gl.GenTextures(1, texturesPointer);

}
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Updated the SDK to allow an easy and feature rich way to rendering text.

http://www.koushikdutta.com/2008/10/drawing-text-in-opengl-es.html
[Touch Diamond, MDA Compact IV Themes and Apps] hellgod:
3D Engine

Hi all !

I wonder if there is a way to port a open source 3D engine from Windows to Windows Mobile.

This could realy help form making games.

Here some 3D engine :

Raydium

Ogre

I have started looking into Raydium to rebuild it with CeGCC but it seems to be a hard task.......
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
I'm going to take a wild guess and say your zues.bmp texture isn't a 2^N square texture. Textures must be 4x4, 8x8, 16x16, 32x32... 512x512. I provided a "Texture" class in that tutorial that allows you to easily load odd sized textures by automatically resizing them into squares for you behind the scenes.
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Rectangles are fine too

Actually textures don't have to be squares, they can be rectangles too:

4x8, 8x32, 512x256, as long as the sides are a 2^N number. I noticed that in the latest version of your OpenGL SDK, the texture will force dimensions to be squares, but that is not necessary.

I have used the 512x256, etc several times. Especially with the larger sizes, you can save some (mega)bytes of space if your image is rectangular instead of square.
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Examples

You might want to check the source code of the Beer program and the Diamond Cubes perhaps in one of the other threads, but the main reason is perhaps because you did not enable the lighting ?

Use something like this before you draw the texture:

gl.Enable(gl.GL_LIGHTING);

And of course you need to tell OpenGL about the Normal of your texture, so it can do the lighting correctly. Again have a look at the Diamond Cubes program for an example. It is also used in the Beer program, but there it is fixed, because all textures are facing the same direction.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Oh, wow, that square restriction is a Direct3D restriction, and not OpenGL! :) Didn't know about that, thanks for the tip! I'll update the code.
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
You don't need to enable lighting to use textures. Lighting is a pretty expensive operation, so I'd recommend leaving it off if you don't actually use it.
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
No lighting ?

Are you sure about this ? If I put a

gl.Disable(gl.GL_LIGHTING);

in my code, all I get is a black screen. (My app is only showing textures and no background at all).

Now, I do think that by default lighting is enabled, at least for LIGHT0, so maybe the call would not be necessary ?

I also only use LIGHT0, just to avoid too heavy calculations. (at least for the moment, just need to get the physics for my game right first :D )
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Yep, I just tried gl.Disable(gl.GL_LIGHTING); to explicitly disable lighting, and my stuff continued working fine.
[Touch Diamond, MDA Compact IV Themes and Apps] p1000:
HitTesting

Hi,

I am using your library (which is really great!) to do some game development for the HTC Diamond. But my game requires the user to both click on 3D buttons and drag 3D objects around the screen.

I am pretty new to 3D graphics programming, but I am trying to use:

glRenderMode(GL_SELECT);

which does not seem to be supported.

If someone could either post a small piece of code for a HitTest function or simply explain how I can do this it would be a great help. The Diamond has a really cool touch screen and I would really like to be able to use it to interact with my 3D scene.

Thanks a lot!
[Touch Diamond, MDA Compact IV Themes and Apps] Joppiz HTC LOVER:
Hi how can i update my framework i have tryed to download it but i cant make it to work on my htc.
[Touch Diamond, MDA Compact IV Themes and Apps] guizmox:
Hi,

I have a question for those who are developping OpenGLES apps...

I don't find any information on the 3D chipset in the MSM7201 chipset.

Is it an Imageon 2300 modified ? And what about specifications (shared memory ? OpenglES 1.0 or 1.1 ?)

In my opinion it's an OpenglES 1.1 compatible chipset but the driver only seems to support 1.0 instructions (GlBenhmark informations)... Am I right ?

GL_VENDOR	QUALCOMM, Inc.

GL_VERSION	OpenGL ES-CM 1.0

GL_RENDERER	Q3Dimension MSM7500W 01.02.03 0 5.1.2

I'm asking this question for Koush and other guys who are working with OpenGLES... You probably have more informations than me !

I found this datasheet, but perhaps it's only "paper" and not real specs...

http://brew.qualcomm.com/bnry_brew/pdf/brew_2007/Tech-303_Ligon.pdf
[Touch Diamond, MDA Compact IV Themes and Apps] cgeboers:
Looking for 3DS Loader

How far did you get with this ? I am looking for a 3DS loader for my "Diamond Cubes" program, it would be great if I could have a look at your program.

You also mentioned a 3DS tutorial, could you tell me where it is ?

Edit: In the mean time I wrote my own 3DS loader, but I fear that it is just a bit too much for the diamond and OpenGL, because of some floating point errors ?
[Touch Diamond, MDA Compact IV Themes and Apps] baallrog:
Performance

Hi Koush,

I have tested your wrapper through your pyramide application.

The fps are 4.5 on my diamond.

This is low i think.

And i have a question for you.

Why this is low ? is there a way to increase this ?

Thank you in advance !!!!
[Touch Diamond, MDA Compact IV Themes and Apps] Koush:
Did you replace your libgles_cm.dll on your device by installing drivers for another phone?

If not, does the pyramid application have a libgles_cm.dll in the directory? If so, remove it.

I get around 60fps.
[Touch Diamond, MDA Compact IV Themes and Apps] xeirwn:
Hi guys!

I have an Xda Flame that also supports OpenGLES...

Today I found a small benchmark that initially run on Axim x50v, but it runs smoothly on my phone as well.

Can you please try to run this on your Diamond?

download here: http://www.ims.tuwien.ac.at/~daniel/download/BenchGLES_0_2.zip

more info at initial thread:

http://pocketmatrix.com/forums/viewtopic.php?p=246425#246425

compare our scores here:

http://xdaflameusers.com/viewtopic.php?id=1318
[Touch Diamond, MDA Compact IV Themes and Apps] jamesd256:
I will try that when I get home.

In the mean time, can anyone tell me how to get GLBenchmark running?

It looks like it must run, as there are scores posted on the site, but it don't work on my Raphael.

It runs the full page rendering test, then draws a horizontal line across the screen before hanging.
[Touch Diamond, MDA Compact IV Themes and Apps] itoYo:
try running it with TF3D off!

i get 1259 on my diamond xda with ignito stock rom

the first time i have been impressed with the diamonds 3d performance

too bad i can program suff like this
[Touch Diamond, MDA Compact IV Themes and Apps] jamesd256:
Not sure which post you're replying to.
[Touch Diamond, MDA Compact IV Themes and Apps] itoYo:
the benchmark software!

i tried it with tf3d on first and it didnt work proper

then tried the bench mark test with it off and worked

may be im confused ! lol
[Touch Diamond, MDA Compact IV Themes and Apps] xeirwn:
this little benchmark runs on imate ppcs as well..

so this 3d engine proves that it is feasible to make hardware-accelerated games & apps, compatible with different devices!

really hope to see some cool apps coming some day!! :D
[Touch Diamond, MDA Compact IV Themes and Apps] harweyko:
runs smoothly on Diamond, 1240 points after softreset on stock ROM with TF3D on, after whole day of usage 1224 points....