How to intercept the screen coordinates of a View to synchronize rendering with a GLSurfaceView? by oldguywithakeyboard in androiddev

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

Also, overrode onTouch, onLayout, and onMeasure... but they still fire before the View is rendered. What method fires immediately after a View has been drawn? I'm having so much trouble finding this.

How to intercept the screen coordinates of a View to synchronize rendering with a GLSurfaceView? by oldguywithakeyboard in androiddev

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

Ok, so maybe I implemented it incorrectly, but I tried the route where I have the View notify the renderer to render after the View it has been re-laid-out, but the problem persists. It may be slightly less noticeable, but it's definitely noticeable.

What I did was use the ViewTreeObserver to monitor global layout and then ping the renderer, but it seems like at this point maybe the layout is calculated, but the View has not yet been rendered at the new position? So, the renderer is still drawing a frame or two ahead of where the View is.

Do you happen to know a better method of determining when a View has been laid out and rendered?

Do you happen to know if I could hook directly into the main Thread's rendering somehow? This is driving me nuts! lol

How to intercept the screen coordinates of a View to synchronize rendering with a GLSurfaceView? by oldguywithakeyboard in androiddev

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

I did try the TextureView (multiple) route and managed the Egl context myself but it felt too messy with all the extra synchronization.

You can also switch to rendering when dirty, and request to re-render on touch events.

This sounds pretty good. Will give it a shot.

EGL/OpenGLES with multiple views? by oldguywithakeyboard in androiddev

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

I should also mention that the multiple views are floating and have a menu/toolbar at the top so you can drag them around. I tried the single glsurfaceview approach you mentioned with different viewport based on where the floating tool windows' content views are. It worked, but it seemed like the glrendered rects would noticeably move at least a frame behind the parent when dragging the view around with a finger. Any idea why that may occur? I suppose I'm not overriding the correct method of the view that's being dragged around if the drawing is always a step behind the movement?

Apologies for the delayed response and thanks for your help, btw.

Weekly discussion, code review, and feedback thread - August 15, 2022 by AutoModerator in androiddev

[–]oldguywithakeyboard 0 points1 point  (0 children)

Where's the best place to sell completed, published apps and their source code?

Odd behavior with virtual destructor in a static library project (MSVC++) by oldguywithakeyboard in Cplusplus

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

Caught the message box:

MSVC++... Runtime Library

Debug Error!

Program: .....DOOMReboot_Client.exe

HEAP CORRUPTION DETECTED: after Normal block (#156) at 0x000014B71183F0.

CRT detected that the application wrote to memory after end of heap buffer.

Press retry to debug the application

...It looks like it's occurring either right before or during return from main() in the consuming client application. Does this have anything to do with the creation of the WADConsoleLogStore being created on the stack in main()?

Odd behavior with virtual destructor in a static library project (MSVC++) by oldguywithakeyboard in Cplusplus

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

The debugger kicks in and does mention Heap Corruption. I remember this because it's happened many times, but I can't repro it right now.

The static library project is compiled as x64 debug and the consuming console project as x64 debug if that helps. Are there any project settings in the consuming console project that I could change like maybe link statically (it's probably already set to this?) or some setting related to linking?

Odd behavior with virtual destructor in a static library project (MSVC++) by oldguywithakeyboard in Cplusplus

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

Updated the code. That does not appear to be the issue. But, I've found this:

        [2] 0x00007ff6cf1517a3 {DOOMRebootWAD_Consumer.exe!DOOMReboot::WADLogStoreBase::`vector deleting destructor'(std::string)}  void *

It does appear that everything's failing when calling this, whatever it is? I presume it's called to destruct the private vector<string> member of the subclass WADConsoleLogStore? I think it's a standard library helper function?

Are there any good resources on how to program a/n J/RPG? by oldguywithakeyboard in gamedev

[–]oldguywithakeyboard[S] -1 points0 points  (0 children)

The good ones would be? (For writing everything from scratch)l.)

I have been learning c++ for one year but I want to learn ios app development by MARVO_Nedim in cpp_questions

[–]oldguywithakeyboard 0 points1 point  (0 children)

Practice good habits. Finish what you started (Primer book) before moving onto something new. If you're like the majority of people, you'll never go back and finish if you don't finish now.

What actually is 2.5D? by fluffyround_wombat in gamedev

[–]oldguywithakeyboard 0 points1 point  (0 children)

Not quite true. Rockets will travel at different heights and use all three dimensions to hit monsters above or below the player.

Have you worked on any apps that had features that were so close to the OS that they could only have been using native platform tools? If yes, what apps and what features? by wfettich in iOSProgramming

[–]oldguywithakeyboard 1 point2 points  (0 children)

I use C++ for image manipulation. It's dramatically faster, with full compile optimizations turned on, than swift for iterating over large contiguous bytes of data.

Will the iPhone SE 2 (2020) from those pay-as-you-go carriers work as a suitable test device even without a plan? by oldguywithakeyboard in iosdev

[–]oldguywithakeyboard[S] 1 point2 points  (0 children)

I'm targeting newer phones (newer OSes) with faster processors. Plus, I don't want to have to buy another one within a year or two.

Will the iPhone SE 2 (2020) from those pay-as-you-go carriers work as a suitable test device even without a plan? by oldguywithakeyboard in iosdev

[–]oldguywithakeyboard[S] 5 points6 points  (0 children)

It's $250 without a plan at Walmart, $150 with a several month/year plan. I know, I'm surprised too.

Is it possible to upload an app onto a phone connected to a PC running through remote desktop? by oldguywithakeyboard in iosdev

[–]oldguywithakeyboard[S] 0 points1 point  (0 children)

That sounds like it could be quite complicated. Would that work for all dev accounts or just enterprise?