yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] ycavan:
Here's the code I'm currently working with: View attachment ngx.zip

Edit: I've scrapped Framebuffer and Pbuffer code and right now, just using updating the texture using glSubImageTex2D. For some reason, it's only updating 1 or 2 lines of the texture.

If you want to test it out, you can download GAPI Test:

http://www.adriansrojakpot.com/Speed_Demonz/GAPI_Benchmark/ARM_GAPI_Benchmark_2.0.zip and place nGAPIBench.exe and ngx.dll in that folder.

All I've done is to hexedit the app to load ngx.dll, rather than gx.dll.
[Windows Mobile Development and Hacking General] agt:
PBuffer

For those that might be interested, I attached the source files and binary of a very simple example (similar to the Triangle GL from HTC-CA) using a pbuffersurface instead of a windowsurface.

Once the OpenGL stuff is done, the PBuffer is copied to a buffer shared with a bitmap (via glReadPixels) and then the bitmap is BitBlt to the main window.

There is a global loop that ensure a constant frame rate at 30 fps.

While the frame rate is still acceptable (for this sample), other windows and menus can overlap the app window and be accessible (which is not the case with a windowsurface using the HTC-CA driver).
[Windows Mobile Development and Hacking General] 火武耀扬:
thank you for your SDK，I‘m a G900 user form china
[Windows Mobile Development and Hacking General] 火武耀扬:
My toshibo G900 cann't run this demo

Why
[Windows Mobile Development and Hacking General] ycavan:
I'm guessing that your G900 isn't an MSM7200/7500 device...

On another note, ngx.dll PROOF OF CONCEPT is ready for testing. :)

You can download the source code & .dll/.lib files here: View attachment 111066

I've also added a couple of hexedited applications that call ngx.dll rather than gx.dll.

What you would need to do is to install the actual application, ie FinalBurn and copy both ngx.dll and nburner.exe into that directory. Run nburner.exe and see how it runs.

This is an initial build that doesn't use fbo or pbuffers, just simple glTexSubImage to update the texture and glDrawTex to draw onto the screen.

Once ngx is up an running smoothly, I'll be adding 3d functions to allow the "traditional" GAPI buffer to be the "backdrop" of the 3d app. ( used for drawing the sky, background, etc... )

Please post what GAPI apps you guys know of and we can test those out as well. :)

Edit 2008-09-05:

Our implementation of Opengl ES is SEVERELY lacking in RTT ( render-to-texture ) enhancements... Every implementation I've thought of using, other than the "slow" glTexSubImage2D function, lacks important parts...

1. Pixel buffer Objects -- Ability to create them, but no ability to MAP them... glMapBufferARB returns a pointer to the pixel buffer and locks the Pixel buffer. glUnMapBufferARB unlocks the buffer. This is the closest to how "true" gapi works.

2. fbo's fail completeness, generally with the inability to bind a texture to the framebuffer. glFramebufferTexture2DOES always fails w/ 500 or 502.

If I'm doing something wrong, and you guys are able to correctly make use of pbo's or fbo's, please post here! :D

Edit:

PocketSnes now runs using ngx.dll! :) Here is the source, dll, lib and hexedited PocketSNES ( npocketsnes.exe ): View attachment ngx.zip
[Windows Mobile Development and Hacking General] 火武耀扬:
en ，my phone‘s CPU is Intel XScale DXA27X ，not 7200

a question ：“the actual application, ie FinalBurn , ngx.dll and nburner.exe”，how can i get it
[Windows Mobile Development and Hacking General] NuShrike:
Nice progress!

I've hinted before with the BREW docs: see what EGL_QUALCOMM_color_buffer does. Otherwise, I'll pick through FBOs with you when I'm not so busy.

Even then, IMO this is too many layers for 2D. Basically, we're using software OGL layer (with HW rendering) which sits on top of GDI which then makes surface calls through AHI.

Google for VNC for WinCE which seems to have available source code to directly use AHI surfaces.
[Windows Mobile Development and Hacking General] flysoftter:
hi! thank for you SDK and i am toshiba g900's user i am come from china

my g900 can not run demos, why? can you rebuilding you demo programs with g900? Thank you very much!
[Windows Mobile Development and Hacking General] toastedlogic:
This may be entirely inaccurate, but IIRC the ppc ports of games like quake, duke3d, etc have problems with wm6.1 roms due to the new gx.dll... any way you graphics programmers could look into getting these programs working again for our wm6.1 devices? Maybe even enhance them?

I figured it was worth a shot, hehe :)
[Windows Mobile Development and Hacking General] liomojo:
when he finishes with the Kaiser development, Ycavan said that he will try to make the same thing for our nv5500 chip. so you have to wait.

you can run the nvidia demos he gave us, some pages before.
[Windows Mobile Development and Hacking General] NuShrike:
how-to catch when device is going into suspend

void PowerEvent(HANDLE hMsgQ, BYTE *buf, const size_t bufsize)
{
DWORD bread;
DWORD msgq_flags;

if (ReadMsgQueue(hMsgQ, buf, bufsize, &bread, INFINITE, &msgq_flags)
&& bread >= sizeof(POWER_BROADCAST) )
{
POWER_BROADCAST *pbc = (POWER_BROADCAST *) buf;
switch(pbc->Message)
{
case PBT_TRANSITION:
if (pbc->Flags & POWER_STATE_ON)
{	// going into suspend
}
break;
}
}
}
DWORD WINAPI PMNotifyThread(LPVOID param)
{
CSomeObject *frame = static_cast<CSomeObject *>(param);

static const unsigned bufrec_size = sizeof(POWER_BROADCAST) + MAX_PATH + 1;
MSGQUEUEOPTIONS_OS msq_options = {
sizeof(MSGQUEUEOPTIONS), MSGQUEUE_NOPRECOMMIT, 3, 4096, TRUE
};
HANDLE hPwr[2], msgQ;
hPwr[0] = frame->hPwr_exit;
msgQ = hPwr[1] = CreateMsgQueue(_T("<optional name>"), &msq_options);

if (hPwr[0] && msgQ && RequestPowerNotifications(msgQ, PBT_TRANSITION | PBT_RESUME))
{
BYTE buf[bufrec_size];
for(;;)
{
switch(WaitForMultipleObjects(2, hPwr, FALSE, INFINITE))
{
case 0 - WAIT_OBJECT_0:	// got exit event
goto exit;
case 1 - WAIT_OBJECT_0:	// got power event
PowerEvent(msgQ, buf, bufrec_size);
break;
}
}
exit:
CloseMsgQueue(msgQ);
}

return 0;
}

int foo()
{
hPwr_thr = CreateThread(NULL, 0, PMNotifyThread, this, 0, NULL);
}
[Windows Mobile Development and Hacking General] NuShrike:
surviving Suspend

For a GL app to survive suspend in the current HTC-CA GL driver state, it needs to catch the suspend (using the previous code framework) and then reinitialize the graphics state as if it was restarted. This is without throwing away any other (AI/program) states.

The problem is it means the current GL context and the associated GL window surface needs to be destroyed (eglDestroySurface() and eglDestroyContext() ) and recreated from scratch again.

This is workable for an app designed for this, but not for hacking existing apps such as TF3D that expects the driver to do all the work.

Hacking the driver would be a lot of work because the entire graphics state needs to be duplicated and tracked such as current texture object, current vertex object, vertex buffer objects, etc.
[Windows Mobile Development and Hacking General] dpwFalken:
Running 3D Apps concurrently?

Hi,

I've read about catching the suspend state, I'll try your code tonight after work, thanks :).

Have you tried running more than one 3D App at the same time? I tried to launch a 3D App from Manila 3D and it failed. This resulted in the device running at nearly 100% and Task Manager being unable to kill off the App process. I've tried two sample 3D Apps to confirm it is not an issue with Manila 3D and get the same result. I assume that this is a driver issue. I debugged the App and found that it failed to initialise the D3D device (its a Direct3D App) and then shutdown. It never fully exited though, got stuck somewhere in Windows. Wondering if you've seen something similar. At the moment I'm not that worried as I just make sure I'm not running more than one 3D App at the same time. It is something to be aware of as will require a soft reset if you try launching a 3D App while one is already running.
[Windows Mobile Development and Hacking General] NuShrike:
From what I remember, D3D is a COM interface where only one program can be using the COM interface at a time so this is why D3D is bad.

However, the OpenGL-ES driver underlying the ATI D3D driver may support multiple instances from looking at the way it initializes its data structures. I haven't really investigated this yet since it's up to the application to NOT call eglSwapBuffers() and such when it's not the foreground application (we're not multi-CPU here).

TF3D/Manila doesn't handle it's not "foreground" very well such as with pop-up dialogs.
[Windows Mobile Development and Hacking General] dpwFalken:
Thanks, that's given me some ideas to experiment with.

I've not found any info regarding restrictions on the use of COM, but the documentation is a little thin on the D3DMobile side compared to D3D on the PC. My App runs pretty well with the CA Drivers, just trying to address the things I've found that require a reset before posting it somewhere.
[Windows Mobile Development and Hacking General] NuShrike:
updates

latest fixes and changes to KaiserGL SDK:

o fixed missing eglCopyBuffers() in libgles_cm.lib

o add function pointer type for secret eglGetColorBufferQUALCOMM() function -- you need eglGetProcAddress() to get access

o removed function prototypes for unsupported glGetLight*() functions

o synchronized with OpenGL ES 1.1.12 and EGL 1.4
[Windows Mobile Development and Hacking General] NuShrike:
libgles_cl for Intel 2700g emulation

Added a forwarder to remap hardcoded CL calls to the Imageon CM dll (meaning it can be installed right alongside the device, or HTC-CA, libgles_cm.dll). Tested with GLBenchmark CL on the Kaiser.

Let me know if some app crashes or is incompatible with the wrapper.

edit:

I believe this is a forwarder compatible with the Intel 2700g, but not the GoForce 5500. I'll have to make a different forwarder for the GoForce.

Verified apps:

Cube 2005

Hexen GLES

Doom GLES

Tony Hawk Pro Skater 2
[Windows Mobile Development and Hacking General] mrvanx:
Thread moved to Dev and Hacking as requested ;)
[Windows Mobile Development and Hacking General] DSF:
NuShrike

I've tried THPS2, which is Dell Axim x51v compatible (so Intel 2700g), and I managed to get it work with hardware acceleration with your CL forwarder (even if the framerate is low). Thank you!
[Windows Mobile Development and Hacking General] NuShrike:
Tony Hawk? Cool! I'll add it to the list.
[Windows Mobile Development and Hacking General] DSF:
NuShrike yeap. I've tried also:

- GeoRally EX, it simply doesn't start, no errors or anything

- Quake Mobile, first it crashed at splah screen (loading screen) and now if I want to run it it give's me only a dialog saying "Another Game Is Already Running.". Tried with and without TouchFlo3D activated. If I press Ok, Touch Flo3D wouldn't run, it simply loops "Lauching TouchFlo3D.." / "Tap here to launch TouchFLO 3D". Soft reset needed (tried to manually disable/enable from Today.. but the same) .. Strange
[Windows Mobile Development and Hacking General] mmone3:
I tried.

- cube, just gives me a title bar with "SDL_app". If I run the sourcecode project it fails on SDL_SetVideoMode.

- quake mobile, at first it gave "eglCreateWindowSurface error". But now all it does is give me "already running error".
[Windows Mobile Development and Hacking General] ell82:
I have managed to work Tony Hawk accelerated on full screen, full speed on my Xperia X1 with your CL forwarded driver!! Many thanks. Else tested:

Quake Mobile - hangs on loading screen

Virtual Pool Mobile accelerated - not working

DoomGLES - working but almost all game screen is moved over lcd

Stuntcar Extreme - working but so slow (it was also working without your CL driver)
[Windows Mobile Development and Hacking General] mirq:
I have

error on each exe file

and when I rename .bak file to exe it's working
[Windows Mobile Development and Hacking General] player911:
So we should be able to play anything designed for a Dell Axim x51v (Intel 2700g). I have an x51v Axim that I play several accelerated games with. Interesting.
[Windows Mobile Development and Hacking General] Ben daniel:
I've also been trying to get Quake mobile running on the X1 using this version of libGLES_CL.dll, If you use WVGA a switch to change the screen resolution from 800*480 to 640*480 the and paste this CL.dll file into the windows directory the game will open up to the initial boot screen but then crashes whilst trying to load the game files.

After this a registry entry is created logging the game as running preventing it being run again.

The reg value is HKLM\software\game\Game running: 0 or 1

Change the value of the registry entry back to "0" and the game will load agian but no further than before.

I'm stuck for ideas on how to get past this point.
[Windows Mobile Development and Hacking General] DSF:
Wow, you really got full speed on the XPERIA?? Nice, I wish I can get that too on the Touch PRO! :(

About Stuntcar Extreme, try to delete libles_*.dll from its folder via Total Commander or other file manager that can see hidden files.
[Windows Mobile Development and Hacking General] rflmnz:
Overclock

Maybe now you guys could develop an OC application to Kaiser... Good luck for anyone who's trying to do it!
[Windows Mobile Development and Hacking General] nuke1:
An overclocking app would be in high demand, but with our beautiful Q chipsets, everything (read: nothing) is possible, in comparison to other phones :(.
[Windows Mobile Development and Hacking General] 341840633:
thank you very much
[Windows Mobile Development and Hacking General] iRiKi:
i experienced the same with Quake Mobile and also found the reg key, but i've been unable to edit the config files in order to troubleshoot why it doesn't run further than the starting screen.

i tried another game original for Axim's, Enigmo, and tho no longer gives the "untrusted app" error, it brings a new one:

prolly some checksums inserted in the code that prevent it to run, so it's also a no-go.

now, about the Cube game, almost all is accelerated nicely except the black bars on the wall (you can check it above the left barrel):

finally, i havent congratulated NuShrike yet for the wrapper, so here comes a very much appreciated Thank You m8 :)
[Windows Mobile Development and Hacking General] Quake3000:
Damn had hope this would run quake on htc touch pro..tryed mobile quake get almost ingame then it jump out of the game and when i try again il get another game are running..keep up the good work maybe some day i could run quake on the phone:D

BTW can somone pm me a upload on hexen gles and doomgles complete cant understand how to convert this files?
[Windows Mobile Development and Hacking General] mmo92:
HI,

I want to choose best OpenGL es SDK for my XPERIA X1.

KAISERGL don't work on my phone,same problem with Vincent 3D Library and GLUT|ES !

Is there a working version for this phone?

mmo92

hardware spec: Qualcomm MSM 7200A
[Windows Mobile Development and Hacking General] noellenchris:
I've been trying to find the cause of GPS lag, I now have TT7 working without lag, however Garmin Mobile XT lags a lot. So I ended up here. Do you think this wrapper will affect the redraw of the Garmin software on a TP? What's the best way to install....Commander and replace the files in the windows directory? Thanks for any suggestions:)
[Windows Mobile Development and Hacking General] NuShrike:
Garmin doesn't use OpenGL so wrapper or dll has no effect, unfortunately. Garmin has many many issues with its rendering/mapping engine which I think has very little to do with the actual graphics. I hope they have a revamp planned (carried over from the Nuviphone maybe) because it should not take 2-5 minutes to just map a route when traffic information is inserted.

This is why I like iGo a little better because it uses the faster GAPI and besides a faster and less laggy mapping engine, but Garmin is still better in some other respects.

Install is just Commander and drop libgles_cl.dll into the \Windows directory.

The attached libgles_cm is not for any other use than for developers to link against in order to use the ROM's libgles_cm.

@mmo92: you already have the best libgles_cm.dll you can get built into your ROM. The files here are only for linking, or fooling libgles_cl apps.
[Windows Mobile Development and Hacking General] noellenchris:
Thanks for the info, I got stuck using Garmin on my Hermes (it worked better on 320x240) and the google search/traffic etc is really very useful. Otherwise I used to have IGuidance and it would give me great directions, but no traffic. I still have it so who knows. I also hope Garmin can smooth out their product.....Time will tell...thanks again:)
[Windows Mobile Development and Hacking General] mmo92:
KAISERGL configuration for XPERIA X1

I'm testing kaiserGL on my XPERIA

first version off testapp2.exe doesn't wolrk (errors when loading texture)

Can you share the sources to the second version or testapp2.exe?, she work perfectly( I also want to rebuild it for my WVGA resolution)

THanks

MMO92
[Windows Mobile Development and Hacking General] l3v5y:
I would also like the sources...

The first version doesn't work at all, but the second compiled one works fine (at 110-130 fps) on my Diamond...
[Windows Mobile Development and Hacking General] trainedwreck:
THPS 2 on Kaiser

Hey has anyone tried this method to get it working on the Kaiser? I may be barking up the wrong tree I'm just curious, it seems to just run momentarily for me and then just disappear even after keeping my QVGA resolution

any suggestions?
[Windows Mobile Development and Hacking General] NuShrike:
It's been a while ycavan, but I confirm the RTT problems with FBOs. I've been able to create a Complete texture-backed FBO (BTW, a depth render-buffer is required no matter what), but any operations on a texture-backed FBO freezes the device such as a simple glClear(xxx). I have no idea how the original ATI demos even worked, and why they would ship an incomplete implementation, but these are the drivers we got in this war.

I've confirmed this on the Kaiser (Q3Dimension MSM7500W 4.0.0) and the FUZE (Q3Dimension MSM7500W 5.1.2) so it must be a Q3Dimension problem and endemic to all MSM7500W platform devices (including the Touch Pro 2).

I'm testing to see if the standard color renderbuffer and then copy to a texture with CopyTexImage2D is any good since glClear/glFlush doesn't freeze the device. Probably NOT to the way to go for high FPS, but would be enough for other non-realtime RTT needs.

My experience so far with a color renderbuffer in FBOs is the renderbuffer is unchanged with: glClear, rendering some triangles, and then checking a specific pixel with glReadPixels().

edit:

Well, glReadPixels just returns 0xFFFF/white when any operation is performed on the FBO color renderbuffer (even when clearing to black). So FBOs are unusable (thank you Qualcomm/ATI!), and will have to revert to CopyTexImage2D for RTT.
[Windows Mobile Development and Hacking General] lukexda:
I had similar problems on the blackstone, and RTT whould help me in so many ways but CopyTexImage2D is a bit too slow for most things. Reading this forum mostly made me give up wasting to much time trying to get this to work...

Did you really actually manage to create an FBO? I thougtht that these drivers didn't even attempt to support FBOs?? I thought you need GL_OES_framebuffer_object extention for that but that the drivers don't report that they support it. I did notice that the functions exist in the .dll, but I had come to the conclusion that they do nothing.

I had tried getting PBuffers to work, you can create one fine, however, once you set the context to point to the pbuffer and call any rendering related opengl function, the device crashed during that function call. Just like a bug in the drivers or something. I tried many different combinations of changing the way I intialised and the order... but nomatter what... I got the same crash.

I also notice that I crash closing down opengl every time... I wonder if its because I havn't deleted all my textures and VBOs. Also, after running my app multiple times... eventually it wont start anymore. Must be because resources arn't being freed. Very dodgy drivers. Reminds me of the old ATI drivers back in the day for Windows. While debugging, had to run some special clean up app... and restart windows ocasionally. So painful.

Maybe these drivers only ever worked 100% with a spacific ATI prototype version of windows mobile... but, otherwise, I think all the ATI demos where done in brew which frustratingly sounds like it might have fully working drivers that fully support the chipset.
[Windows Mobile Development and Hacking General] NuShrike:
Yes, I have gotten FBOs calls to work all the way up to the check-for-completeness. Renderbuffers (instead of texture-backed) actually work further beyond that but I can't get any useful data back yet, nor have I mined the depth-buffer attachment for info yet.

Also, the official Direct3D wrapper also uses OpenGL ES FBOs to support what I can only assume to be the renderbuffers of Direct3D. I'll have to trace through it sometime to see if it really works and what needs to be done to get it working in native OGLES.

My few OGLES apps don't crash on exit at all, although I really miss having a MapBuffer() call. For restarting, I'm having more problems with EnumWindows() than anything else. I suggest stripping down your program to bare minimal and tracing to the point where crashes start. I've noticed I can't do DeleteTexture/DeleteBuffer in a destructor for instance so I clean up earlier and manually.

Also, I've noticed that I can't have a custom object maintaining GL context in a global context on the Raphael. I have to new and free a pointer to it. Pretty annoying since it works just fine on the Kaiser.
[Windows Mobile Development and Hacking General] NuShrike:
I've done some more testing and here's some limitations I've gotten past to get a texture-backed FBO that will get past glFinish() -- it would freeze the device previously. I'll do some other testing to see if it actually returns anything useful.

o make sure the texture is NOT using any mipmap settings for MIN and MAG filtering; GL_LINEAR is your best bet

o glFrameBufferTexture2DOES will not accept any textures above 256x256

o GL_RGBA texture will freeze the device (making it useless for rendering for alphas)

I don't know why 256x256 is the limit since the normal max texture size is 1024x1024 and I've been using such large textures for other uses. Makes it pretty useless as an actual framebuffer also. The original Imageon specs has the texture cache at 256x128 or so (read the docs on first post), so I'm not sure if they've ever been expanded for the Diamond/Raphael/HD anyways.
[Windows Mobile Development and Hacking General] lukexda:
Hmm, I might have to revisit this my self. Sounds like your actually making progress. Sounds very promising to me.

As for my crash on exit bug... I have just been to lazy to try fix it yet. Havn't done any work on this device for a while.

256 x 256 limit might be ok as a frame buffer if you upscale. However you would have to upscale alot on the bigger screens. On the other hand, I have noticed big slowdowns for big textures anyway...

Looking forward to see your progress!
[Windows Mobile Development and Hacking General] NeoS:
That should explain the slowdowns on the WVGA devices, right?
[Windows Mobile Development and Hacking General] carz2:
NuShrike,

What does GARMIN use then, and is is there any way at all to improve the map rendering on the Touch Pro ?
[Windows Mobile Development and Hacking General] hamdir:
is Doom really working? i tried it, it boots with a messed up title screen, then when i get to the game all the textures are messed up in violet green colors, good FPS though

and where can we find Hexen GLES?